Skip to content

Commit

Permalink
refactor: using default hubspot checkbox button
Browse files Browse the repository at this point in the history
  • Loading branch information
mudassir-hafeez committed Apr 1, 2024
1 parent 768df72 commit cbf2181
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 100 deletions.
64 changes: 14 additions & 50 deletions static/scss/detail/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@
height: auto;

.hs-form-field {
padding-bottom: 16px;
> label:first-child > span {
padding-top: 16px;
display: inline-block;
}

label {
color: #495057;
Expand Down Expand Up @@ -279,78 +282,39 @@
align-items: center;

.hs-form-radio {

label {
position: relative;

input {
height: 22px;
left: 0;
opacity: 0;
position: absolute;
top: 0;
width: 22px;
}

span {
display: inline-block;
margin-left: 28px;
margin-right: 32px;

&::before {
color: $hs-form-field-radio-gray;
border: 2px solid;
content: "";
height: 22px;
left: 0;
position: absolute;
top: 0;
width: 22px;
border-radius: 50%;
}

&::after {
color: $primary;
content: "";
opacity: 0;
border: 6px solid;
border-radius: 50%;
position: absolute;
left: 5px;
top: 5px;
transition: opacity 0.2s ease-in-out;
}
}

input:checked + span::after {
opacity: 1;
}

input:checked + span::before {
color: $primary;
}

input:not(:checked):hover + span::before {
background: $close-hover-background;
color: $primary;
}

input:not(:checked):hover + span {
cursor: pointer;
}
}
}

.hs-form-checkbox {
span {
display: inline-block;
margin-left: 8px;
margin-right: 32px;
}
}

.hs-form-radio,.hs-form-checkbox {
input, span {
cursor: pointer;
}
}
}
}

.hs-recaptcha, .hs-submit {
padding-top: 16px;

Check failure on line 315 in static/scss/detail/header.scss

View workflow job for this annotation

GitHub Actions / javascript-tests

Expected indentation of 6 spaces but found 8
}

.hs-submit {
padding-bottom: 10px;
text-align: right;
Expand Down
64 changes: 14 additions & 50 deletions static/scss/detail/subnav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@
height: auto;

.hs-form-field {
padding-bottom: 16px;
> label:first-child > span {
padding-top: 16px;
display: inline-block;
}

label {
color: #495057;
Expand Down Expand Up @@ -244,78 +247,39 @@
align-items: center;

.hs-form-radio {

label {
position: relative;

input {
height: 22px;
left: 0;
opacity: 0;
position: absolute;
top: 0;
width: 22px;
}

span {
display: inline-block;
margin-left: 28px;
margin-right: 32px;

&::before {
color: $hs-form-field-radio-gray;
border: 2px solid;
content: "";
height: 22px;
left: 0;
position: absolute;
top: 0;
width: 22px;
border-radius: 50%;
}

&::after {
color: $primary;
content: "";
opacity: 0;
border: 6px solid;
border-radius: 50%;
position: absolute;
left: 5px;
top: 5px;
transition: opacity 0.2s ease-in-out;
}
}

input:checked + span::after {
opacity: 1;
}

input:checked + span::before {
color: $primary;
}

input:not(:checked):hover + span::before {
background: $close-hover-background;
color: $primary;
}

input:not(:checked):hover + span {
cursor: pointer;
}
}
}

.hs-form-checkbox {
span {
display: inline-block;
margin-left: 8px;
margin-right: 32px;
}
}

.hs-form-radio,.hs-form-checkbox {
input, span {
cursor: pointer;
}
}
}
}

.hs-recaptcha, .hs-submit {
padding-top: 16px;
}

.hs-submit {
padding-bottom: 10px;
text-align: right;
Expand Down

0 comments on commit cbf2181

Please sign in to comment.