-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix LibSass calc()
compatibility in Radios and Checkboxes
#4784
Conversation
See GitHub issue: #4782 Co-authored-by: Oscar Duignan <100650+oscarduignan@users.noreply.github.com>
calc()
for LibSasscalc()
compatibility in Radios and Checkboxes
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for 8715b9a |
13365c6
to
9297bf9
Compare
d0cc456
to
824557b
Compare
Just to confirm the understanding of the grep flags, for future documentation. Is the following correct?
EDIT: Last push made this irrelevant |
824557b
to
6e89b2e
Compare
6e89b2e
to
81f66a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad we ended with a nice output in the end by splitting the grep in its own step 🥳 ⛵
81f66a5
to
8715b9a
Compare
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss b/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss
index eb2ce95b0..d34fc39f5 100644
--- a/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/checkboxes/_index.scss
@@ -41,7 +41,7 @@
// container minus the input width minus the padding on either side of
// the label. This prevents the label from going onto the next line due to
// __item using flex-wrap because we want hints on a separate line.
- max-width: calc(100% - (($govuk-checkboxes-label-padding-left-right * 2) + $govuk-touch-target-size));
+ max-width: calc(100% - #{(($govuk-checkboxes-label-padding-left-right * 2) + $govuk-touch-target-size)});
margin-bottom: 0;
padding: (govuk-spacing(1) + $govuk-border-width-form-element) govuk-spacing(3);
cursor: pointer;
diff --git a/packages/govuk-frontend/dist/govuk/components/radios/_index.scss b/packages/govuk-frontend/dist/govuk/components/radios/_index.scss
index edb04303b..51fc8055d 100644
--- a/packages/govuk-frontend/dist/govuk/components/radios/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/radios/_index.scss
@@ -43,7 +43,7 @@
// container minus the input width minus the padding on either side of
// the label. This prevents the label from going onto the next line due to
// __item using flex-wrap because we want hints on a separate line
- max-width: calc(100% - ($govuk-radios-label-padding-left-right + $govuk-touch-target-size + govuk-spacing(3)));
+ max-width: calc(100% - #{($govuk-radios-label-padding-left-right + $govuk-touch-target-size + govuk-spacing(3))});
margin-bottom: 0;
padding: (govuk-spacing(1) + $govuk-border-width-form-element) govuk-spacing(3);
cursor: pointer;
Action run for 8715b9a |
Fix LibSass `calc()` compatibility in Radios and Checkboxes
This PR interpolates Sass
calc()
contents for compatibility with LibSassIt fixes #4782 using the suggestion from @oscarduignan
LibSass compatibility
Our Sass tests didn't catch LibSass
calc()
differences in #4093This was unintentional and compatibility with LibSass and Ruby Sass should be maintained
Updated tests
I've added new checks for
$govuk-*
in Sass output, using grep with!
to throw when matches arenotfound:This ensures we break the build and would output the following with
$govuk-*
matches:This partially closes #4783 but does not check for
govuk-spacing()
etc