Skip to content

Commit

Permalink
Added styling to radio GOVUK
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascumsille committed Jan 15, 2024
1 parent b16df27 commit d4d47d0
Showing 1 changed file with 44 additions and 15 deletions.
59 changes: 44 additions & 15 deletions web/cobrands/sass/_report_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ $govuk-small-input-visible-size: 24px;

.govuk-multi-select__label {
display: inline-block;
padding: 8px 0px 5px $govuk-small-input-size;
padding: 10px 0px 10px $govuk-small-input-size;
cursor: pointer;
touch-action: manipulation;
font-size: 1.1875rem;
Expand All @@ -179,6 +179,35 @@ $govuk-small-input-visible-size: 24px;
}
}

&:has(> input[type="checkbox"]){
&:after {
// Check icon
content: "";
box-sizing: border-box;
position: absolute;
top: $govuk-small-input-visible-size / 2;
left: $govuk-small-input-visible-size / 2;
clip-path: polygon(28% 38%, 41% 53%, 75% 24%, 86% 38%, 40% 78%, 15% 50%);
border: solid 10px $govuk-input-border-color;
opacity: 0;
}
}

&:has(> input[type="radio"]){
&:after {
// Circle icon
content: "";
position: absolute;
top: 15px;
left: 15px;
width: 14px;
height: 14px;
clip-path: circle(50%);
opacity: 0;
background-color: $govuk-input-border-color;
}
}

&:before {
content: "";
box-sizing: border-box;
Expand Down Expand Up @@ -211,20 +240,20 @@ $govuk-small-input-visible-size: 24px;
}
}

.govuk-multi-select--checkboxes {
.govuk-multi-select__label {
&:after {
content: "";
box-sizing: border-box;
position: absolute;
top: $govuk-small-input-visible-size / 2;
left: $govuk-small-input-visible-size / 2;
clip-path: polygon(28% 38%, 41% 53%, 75% 24%, 86% 38%, 40% 78%, 15% 50%);
border: solid 10px $govuk-input-border-color;
opacity: 0;
}
}
}
// .govuk-multi-select--checkboxes {
// .govuk-multi-select__label {
// &:after {
// content: "";
// box-sizing: border-box;
// position: absolute;
// top: $govuk-small-input-visible-size / 2;
// left: $govuk-small-input-visible-size / 2;
// clip-path: polygon(28% 38%, 41% 53%, 75% 24%, 86% 38%, 40% 78%, 15% 50%);
// border: solid 10px $govuk-input-border-color;
// opacity: 0;
// }
// }
// }

.govuk-multi-select--radio, .multi-select-presets {
.govuk-multi-select__label {
Expand Down

0 comments on commit d4d47d0

Please sign in to comment.