-
Notifications
You must be signed in to change notification settings - Fork 21
[KZN-3760 + KZN-3761] Update Label and LabelledMessage components to CSS from SCSS #6438
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
Changes from all commits
645c6dc
65405de
94b3018
f096e94
b240300
95fbbc8
a020a36
efb1549
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@kaizen/components': patch | ||
| --- | ||
|
|
||
| Update Label and LabelledMessage components to CSS from SCSS |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| @layer kz-components { | ||
| :root { | ||
| --label-start-margin: var(--spacing-xs); | ||
| --dt-color-form-text-color: var(--color-purple-800); | ||
| } | ||
|
|
||
| .label { | ||
| --icon-vertical-align: text-bottom; | ||
| } | ||
|
|
||
| .label, | ||
| :global(.ideal-sans) .label { | ||
| /* override Murmur global styles :( */ | ||
| opacity: inherit; | ||
| color: var(--dt-color-form-text-color); | ||
| visibility: visible; | ||
| width: 100%; | ||
| text-align: start; | ||
| } | ||
|
|
||
| .reversed { | ||
| color: var(--color-white); | ||
|
|
||
| a { | ||
| color: var(--color-white); | ||
|
|
||
| &:hover { | ||
| text-decoration: none; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .disabled { | ||
| opacity: 0.3; | ||
| } | ||
|
|
||
| /* /////////////////////////////////////////////////// | ||
| //// LABEL TYPES | ||
| //////////////////////////////////////////////////// */ | ||
|
|
||
| /* This is to override bootstrap styles. Remove when appropriate */ | ||
| .text, | ||
| :global(.ideal-sans) .text { | ||
| font-family: var(--typography-heading-6-font-family); | ||
| font-size: var(--typography-heading-6-font-size); | ||
| line-height: var(--typography-heading-6-line-height); | ||
| letter-spacing: var(--typography-heading-6-letter-spacing); | ||
| font-weight: var(--typography-heading-6-font-weight); | ||
| } | ||
|
|
||
| .checkboxOrRadio, | ||
| .checkbox, | ||
| .radio, | ||
| :global(.ideal-sans) .checkboxOrRadio { | ||
| display: flex; | ||
| font-family: var(--typography-paragraph-body-font-family); | ||
| font-size: var(--typography-paragraph-body-font-size); | ||
| line-height: var(--typography-paragraph-body-line-height); | ||
| letter-spacing: var(--typography-paragraph-body-letter-spacing); | ||
| font-weight: var(--typography-paragraph-body-font-weight); | ||
| } | ||
|
|
||
| .toggle { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| font-family: var(--typography-paragraph-body-font-family); | ||
| font-size: var(--typography-paragraph-body-font-size); | ||
| line-height: var(--typography-paragraph-body-line-height); | ||
| letter-spacing: var(--typography-paragraph-body-letter-spacing); | ||
| font-weight: var(--typography-paragraph-body-font-weight); | ||
| } | ||
|
|
||
| .checkbox, | ||
| .radio, | ||
| .toggle { | ||
| /* apply padding when label is inline with form control */ | ||
| .prependedLabel { | ||
| order: -1; /* place label before the control */ | ||
| margin-inline-end: var(--label-start-margin); | ||
| } | ||
|
|
||
| .appendedLabel { | ||
| margin-inline-start: var(--label-start-margin); | ||
| } | ||
| } | ||
|
|
||
| .prominent { | ||
| font-family: var(--typography-heading-4-font-family); | ||
| font-weight: var(--typography-heading-4-font-weight); | ||
| font-size: var(--typography-heading-4-font-size); | ||
| line-height: var(--typography-heading-4-line-height); | ||
| letter-spacing: var(--typography-heading-4-letter-spacing); | ||
| display: block; | ||
| margin-bottom: var(--spacing-xs); | ||
| } | ||
| } |
This file was deleted.
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Update: After confirmed with team, the component behaves as expected and inherits page styles, so leaving it as-is is fine |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,10 @@ | ||
| @import '~@kaizen/design-tokens/sass/spacing'; | ||
|
|
||
| @layer kz-components { | ||
| .labelledMessage { | ||
| display: inline-flex; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
| .labelSeparator { | ||
| margin-inline-end: $spacing-6; | ||
| margin-inline-end: var(--spacing-6); | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
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.
Changes on Storybook and Chromatic checks are approved because these changes are expected.