Skip to content

Commit

Permalink
chore: fix checkboxes when using long text. (#4366)
Browse files Browse the repository at this point in the history
* fix long text issue

---------

Co-authored-by: Dave Samojlenko <[email protected]>
  • Loading branch information
timarney and dsamojlenko authored Oct 7, 2024
1 parent 2c791f4 commit afb161e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
5 changes: 3 additions & 2 deletions styles/_checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Based on GC Design System Checkbox
See: https://design-system.alpha.canada.ca/en/components/checkbox/
*/

@import '../node_modules/@cdssnc/gcds-tokens/build/web/css/components/checkbox.css';
@import "../node_modules/@cdssnc/gcds-tokens/build/web/css/components/checkbox.css";

.gc-input-checkbox {
position: relative;
Expand Down Expand Up @@ -73,7 +73,8 @@ See: https://design-system.alpha.canada.ca/en/components/checkbox/
}

.checkbox-label-text {
width: auto !important;
// @todo look at applying making the width auto here
// so the user only clicks on the text not white space.
font: var(--gcds-label-font-desktop);
@apply font-noto-sans;
-webkit-font-smoothing: antialiased;
Expand Down
16 changes: 4 additions & 12 deletions styles/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Import CSS variables from gcds-tokens
@import "../node_modules/@cdssnc/gcds-tokens/build/web/css/components/heading.css";
@import '../node_modules/@cdssnc/gcds-tokens/build/web/css/components/label.css';
@import "../node_modules/@cdssnc/gcds-tokens/build/web/css/components/label.css";
@import "./_input";
@import "./_textarea";
@import "./checkbox";
Expand Down Expand Up @@ -177,29 +177,21 @@
}
}



.gc-input-radio,
.gc-input-checkbox {
@apply flex pt-3 pb-1 px-0 items-center;
@apply flex pt-3 pb-1 px-0;
}

.gc-radio-label,
.gc-checkbox-label {
@apply md:text-sm font-normal text-base flex items-center;

.radio-label-text {
@apply md:mt-10px mt-2;
}
@apply md:text-sm font-normal text-base flex;

.checkbox-label-text,
.radio-label-text {
@apply xxs:w-cr-label-fold xs:w-cr-label-5s sm:w-cr-label-6s md:w-cr-label-duo lg:w-cr-label-ipad xl:w-cr-label-1025 w-cr-label-desktop;
@apply xxs:w-cr-label-fold xs:w-cr-label-5s sm:w-cr-label-6s md:w-cr-label-duo lg:w-cr-label-ipad xl:w-cr-label-1025 w-cr-label-desktop md:mt-10px mt-2;
}
}



.gc-file-input {
@apply w-full md:text-sm text-base text-gray-700 py-3 pr-2 mt-2 mb-14;

Expand Down

0 comments on commit afb161e

Please sign in to comment.