-
Notifications
You must be signed in to change notification settings - Fork 29
Remove -sem to see if people like it better. #6656
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -3,128 +3,100 @@ if (globalThis.document !== undefined && !globalThis.document.head.querySelector | |
| style.id = 'd2l-colors'; | ||
|
|
||
| const lightPalette = ` | ||
| --d2l-sem-background-color-base: #ffffff; | ||
| --d2l-sem-background-color-elevated: var(--d2l-sem-background-color-base); | ||
| --d2l-sem-background-color-floating: var(--d2l-sem-background-color-base); | ||
| --d2l-sem-background-color-interactive-faint-default: var(--d2l-color-regolith); | ||
| --d2l-sem-background-color-interactive-faint-hover: var(--d2l-color-sylvite); | ||
| --d2l-sem-background-color-interactive-highlighted: var(--d2l-sem-brand-color-highlight); | ||
| --d2l-sem-background-color-interactive-primary-default: var(--d2l-sem-brand-color-primary-default); | ||
| --d2l-sem-background-color-interactive-primary-hover: var(--d2l-sem-brand-color-primary-hover); | ||
| --d2l-sem-background-color-interactive-secondary-default: var(--d2l-color-gypsum); | ||
| --d2l-sem-background-color-interactive-secondary-hover: var(--d2l-color-mica); | ||
| --d2l-sem-background-color-interactive-tertiary-default: #ffffff; | ||
| --d2l-sem-background-color-interactive-tertiary-hover: var(--d2l-sem-background-color-interactive-secondary-default); | ||
| --d2l-sem-background-color-interactive-translucent-default: #000000; | ||
| --d2l-sem-background-color-interactive-translucent-hover: var(--d2l-sem-brand-color-primary-default); | ||
| --d2l-sem-background-color-sunken: #f6f7f8; | ||
| --d2l-sem-border-color-emphasized: var(--d2l-color-galena); | ||
| --d2l-sem-border-color-focus: var(--d2l-color-celestine); | ||
| --d2l-sem-border-color-standard: var(--d2l-color-mica); | ||
| --d2l-sem-border-color-subtle: var(--d2l-color-gypsum); | ||
| --d2l-sem-brand-color-highlight: var(--d2l-color-celestine-plus-2); | ||
| --d2l-sem-brand-color-primary-default: var(--d2l-color-celestine); | ||
| --d2l-sem-brand-color-primary-hover: var(--d2l-color-celestine-minus-1); | ||
| --d2l-sem-icon-color-faint: var(--d2l-sem-border-color-standard); | ||
| --d2l-sem-icon-color-inverted: #ffffff; | ||
| --d2l-sem-icon-color-standard: var(--d2l-color-tungsten); | ||
| --d2l-sem-status-color-default: var(--d2l-color-celestine); | ||
| --d2l-sem-status-color-error: var(--d2l-color-cinnabar); | ||
| --d2l-sem-status-color-success-text: var(--d2l-color-olivine-minus-1); | ||
| --d2l-sem-status-color-success: var(--d2l-color-olivine); | ||
| --d2l-sem-status-color-warning-text: var(--d2l-color-carnelian-minus-1); | ||
| --d2l-sem-status-color-warning: var(--d2l-color-carnelian); | ||
| --d2l-sem-text-color-interactive-default: var(--d2l-sem-brand-color-primary-default); | ||
| --d2l-sem-text-color-interactive-hover: var(--d2l-sem-brand-color-primary-hover); | ||
| --d2l-sem-text-color-static-faint: var(--d2l-color-galena); | ||
| --d2l-sem-text-color-static-inverted: #ffffff; | ||
| --d2l-sem-text-color-static-standard: var(--d2l-color-ferrite); | ||
| --d2l-sem-text-color-static-subtle: var(--d2l-color-tungsten); | ||
|
|
||
| --d2l-sem-opacity-disabled-control: 0.5; | ||
| --d2l-sem-opacity-disabled-link: 0.74; | ||
| --d2l-sem-opacity-disabled-linkicon: 0.64; | ||
|
|
||
| --d2l-sem-shadow-attached-color: rgba(0, 0, 0, 0.03); | ||
| --d2l-sem-shadow-attached-offset-x: 0; | ||
| --d2l-sem-shadow-attached-offset-y: 2px; | ||
| --d2l-sem-shadow-attached-blur: 4px; | ||
| --d2l-sem-shadow-attached-spread: 0; | ||
| --d2l-sem-shadow-attached: var(--d2l-shadow-attached-offset-x) var(--d2l-shadow-attached-offset-y) var(--d2l-shadow-attached-blur) var(--d2l-shadow-attached-spread) var(--d2l-shadow-attached-color); | ||
| --d2l-sem-shadow-floating-color: rgba(0, 0, 0, 0.15); | ||
| --d2l-sem-shadow-floating-offset-x: 0; | ||
| --d2l-sem-shadow-floating-offset-y: 2px; | ||
| --d2l-sem-shadow-floating-blur: 12px; | ||
| --d2l-sem-shadow-floating-spread: 0; | ||
| --d2l-sem-shadow-floating: var(--d2l-shadow-floating-offset-x) var(--d2l-shadow-floating-offset-y) var(--d2l-shadow-floating-blur) var(--d2l-shadow-floating-spread) var(--d2l-shadow-floating-color); | ||
| --d2l-sem-shadow-inset-color: rgba(177, 185, 190, 0.2); /* corundum */ | ||
| --d2l-sem-shadow-inset-offset-x: 0; | ||
| --d2l-sem-shadow-inset-offset-y: 2px; | ||
| --d2l-sem-shadow-inset-blur: 0; | ||
| --d2l-sem-shadow-inset-spread: 0; | ||
| --d2l-sem-shadow-inset: inset var(--d2l-shadow-inset-offset-x) var(--d2l-shadow-inset-offset-y) var(--d2l-shadow-inset-blur) var(--d2l-shadow-inset-spread) var(--d2l-shadow-inset-color); | ||
| --d2l-background-color-base: #ffffff; | ||
| --d2l-background-color-elevated: var(--d2l-background-color-base); | ||
| --d2l-background-color-floating: var(--d2l-background-color-base); | ||
|
Member
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. We could also tighten up the
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. Yeah I wouldn't mind that - in effort to keep them a bit shorter, more readable, etc. With that, would
Member
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. It gets a little murky yeah.
Member
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. So three options I think:
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. I nudged @geurts since there an effort to keep the language in Figma fairly aligned with the vocabulary in code. Removing
Member
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. I think 3) above covers that?
Contributor
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. I didn't really understand 3 ... so you're saying we could add "fg" or "bg" after "text" and "icon", so that they have both "fg" and "bg" variables (though initially we don't have any use for "bg" variables for these)?
Contributor
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. One solution we didn't discuss, but which is constantly rattling around in my head, is to update icons to use the same "standard" colour as text. This would bring them closer together so we could just have a "fg" top level category that addresses both icons and text. I remember making them different was a tough call at the time, and I could have gone either way.
Member
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. Yeah exactly, and Dave's example of where we might have a background for text would be selected. But yeah, if that discrepancy between text & icon colours went away, then it could just be
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. Although if we did that, consider what it might mean if we need them to be distinct later. |
||
| --d2l-background-color-interactive-faint-default: var(--d2l-color-regolith); | ||
| --d2l-background-color-interactive-faint-hover: var(--d2l-color-sylvite); | ||
| --d2l-background-color-interactive-highlighted: var(--d2l-brand-color-highlight); | ||
| --d2l-background-color-interactive-primary-default: var(--d2l-brand-color-primary-default); | ||
| --d2l-background-color-interactive-primary-hover: var(--d2l-brand-color-primary-hover); | ||
| --d2l-background-color-interactive-secondary-default: var(--d2l-color-gypsum); | ||
| --d2l-background-color-interactive-secondary-hover: var(--d2l-color-mica); | ||
| --d2l-background-color-interactive-tertiary-default: #ffffff; | ||
| --d2l-background-color-interactive-tertiary-hover: var(--d2l-background-color-interactive-secondary-default); | ||
| --d2l-background-color-interactive-translucent-default: #000000; | ||
| --d2l-background-color-interactive-translucent-hover: var(--d2l-brand-color-primary-default); | ||
| --d2l-background-color-sunken: #f6f7f8; | ||
| --d2l-border-color-emphasized: var(--d2l-color-galena); | ||
| --d2l-border-color-focus: var(--d2l-color-celestine); | ||
| --d2l-border-color-standard: var(--d2l-color-mica); | ||
| --d2l-border-color-subtle: var(--d2l-color-gypsum); | ||
| --d2l-brand-color-highlight: var(--d2l-color-celestine-plus-2); | ||
| --d2l-brand-color-primary-default: var(--d2l-color-celestine); | ||
| --d2l-brand-color-primary-hover: var(--d2l-color-celestine-minus-1); | ||
| --d2l-icon-color-faint: var(--d2l-border-color-standard); | ||
| --d2l-icon-color-inverted: #ffffff; | ||
| --d2l-icon-color-standard: var(--d2l-color-tungsten); | ||
| --d2l-status-color-default: var(--d2l-color-celestine); | ||
| --d2l-status-color-error: var(--d2l-color-cinnabar); | ||
| --d2l-status-color-success-text: var(--d2l-color-olivine-minus-1); | ||
| --d2l-status-color-success: var(--d2l-color-olivine); | ||
| --d2l-status-color-warning-text: var(--d2l-color-carnelian-minus-1); | ||
| --d2l-status-color-warning: var(--d2l-color-carnelian); | ||
| --d2l-text-color-interactive-default: var(--d2l-brand-color-primary-default); | ||
| --d2l-text-color-interactive-hover: var(--d2l-brand-color-primary-hover); | ||
| --d2l-text-color-static-faint: var(--d2l-color-galena); | ||
| --d2l-text-color-static-inverted: #ffffff; | ||
| --d2l-text-color-static-standard: var(--d2l-color-ferrite); | ||
| --d2l-text-color-static-subtle: var(--d2l-color-tungsten); | ||
|
|
||
| --d2l-opacity-disabled-control: 0.5; | ||
| --d2l-opacity-disabled-link: 0.74; | ||
| --d2l-opacity-disabled-linkicon: 0.64; | ||
|
|
||
| --d2l-shadow-attached-block-start: 0 2px 4px 0 rgba(0, 0, 0, 0.03); | ||
| --d2l-shadow-attached-block-end: 0 -2px 4px 0 rgba(0, 0, 0, 0.03); | ||
| --d2l-shadow-floating: 0 2px 12px 0 rgba(0, 0, 0, 0.15); | ||
| --d2l-shadow-inset: inset 0 2px 0 0 rgba(177, 185, 190, 0.2); /* corundum */ | ||
| `; | ||
| const darkPalette = ` | ||
| --d2l-sem-background-color-base: #161718; | ||
| --d2l-sem-background-color-elevated: var(--d2l-color-ferrite); | ||
| --d2l-sem-background-color-floating: var(--d2l-color-ferrite); | ||
| --d2l-sem-background-color-interactive-faint-default: var(--d2l-color-ferrite); | ||
| --d2l-sem-background-color-interactive-faint-hover: #303335; | ||
| --d2l-sem-background-color-interactive-highlighted: var(--d2l-sem-brand-color-highlight); | ||
| --d2l-sem-background-color-interactive-primary-default: var(--d2l-sem-brand-color-primary-default); | ||
| --d2l-sem-background-color-interactive-primary-hover: var(--d2l-sem-brand-color-primary-hover); | ||
| --d2l-sem-background-color-interactive-secondary-default: #303335; | ||
| --d2l-sem-background-color-interactive-secondary-hover: var(--d2l-color-ferrite); | ||
| --d2l-sem-background-color-interactive-tertiary-default: #000000; | ||
| --d2l-sem-background-color-interactive-tertiary-hover: var(--d2l-sem-background-color-interactive-secondary-default); | ||
| --d2l-sem-background-color-interactive-translucent-default: #000000; | ||
| --d2l-sem-background-color-interactive-translucent-hover: var(--d2l-sem-brand-color-primary-default); | ||
| --d2l-sem-background-color-sunken: #000000; | ||
| --d2l-sem-border-color-emphasized: var(--d2l-color-galena); | ||
| --d2l-sem-border-color-focus: var(--d2l-color-celestine-plus-1); | ||
| --d2l-sem-border-color-standard: var(--d2l-color-tungsten); | ||
| --d2l-sem-border-color-subtle: #303335; | ||
| --d2l-sem-brand-color-highlight: #161718; | ||
| --d2l-sem-brand-color-primary-default: var(--d2l-color-celestine-plus-1); | ||
| --d2l-sem-brand-color-primary-hover: var(--d2l-color-celestine); | ||
| --d2l-sem-icon-color-faint: var(--d2l-sem-border-color-standard); | ||
| --d2l-sem-icon-color-inverted: #ffffff; | ||
| --d2l-sem-icon-color-standard: var(--d2l-color-corundum); | ||
| --d2l-sem-status-color-default: var(--d2l-sem-brand-color-primary-default); | ||
| --d2l-sem-status-color-error: var(--d2l-color-cinnabar-plus-1); | ||
| --d2l-sem-status-color-success-text: #ffffff; | ||
| --d2l-sem-status-color-success: var(--d2l-color-olivine); | ||
| --d2l-sem-status-color-warning-text: var(--d2l-color-carnelian); | ||
| --d2l-sem-status-color-warning: var(--d2l-color-carnelian); | ||
| --d2l-sem-text-color-interactive-default: var(--d2l-sem-brand-color-primary-default); | ||
| --d2l-sem-text-color-interactive-hover: var(--d2l-sem-brand-color-primary-hover); | ||
| --d2l-sem-text-color-static-faint: var(--d2l-color-galena); | ||
| --d2l-sem-text-color-static-inverted: #161718; | ||
| --d2l-sem-text-color-static-standard: var(--d2l-color-mica); | ||
| --d2l-sem-text-color-static-subtle: var(--d2l-color-chromite); | ||
|
|
||
| --d2l-sem-opacity-disabled-control: 0.5; | ||
| --d2l-sem-opacity-disabled-link: 0.74; | ||
| --d2l-sem-opacity-disabled-linkicon: 0.64; | ||
|
|
||
| --d2l-sem-shadow-attached-color: rgba(0, 0, 0, 0.03); | ||
| --d2l-sem-shadow-attached-offset-x: 0; | ||
| --d2l-sem-shadow-attached-offset-y: 2px; | ||
| --d2l-sem-shadow-attached-blur: 4px; | ||
| --d2l-sem-shadow-attached-spread: 0; | ||
| --d2l-sem-shadow-attached: var(--d2l-shadow-attached-offset-x) var(--d2l-shadow-attached-offset-y) var(--d2l-shadow-attached-blur) var(--d2l-shadow-attached-spread) var(--d2l-shadow-attached-color); | ||
| --d2l-sem-shadow-floating-color: rgba(0, 0, 0, 0.85); | ||
| --d2l-sem-shadow-floating-offset-x: 0; | ||
| --d2l-sem-shadow-floating-offset-y: 2px; | ||
| --d2l-sem-shadow-floating-blur: 12px; | ||
| --d2l-sem-shadow-floating-spread: 0; | ||
| --d2l-sem-shadow-floating: var(--d2l-shadow-floating-offset-x) var(--d2l-shadow-floating-offset-y) var(--d2l-shadow-floating-blur) var(--d2l-shadow-floating-spread) var(--d2l-shadow-floating-color); | ||
| --d2l-sem-shadow-inset-color: rgba(177, 185, 190, 0.2); /* corundum */ | ||
| --d2l-sem-shadow-inset-offset-x: 0; | ||
| --d2l-sem-shadow-inset-offset-y: 2px; | ||
| --d2l-sem-shadow-inset-blur: 0; | ||
| --d2l-sem-shadow-inset-spread: 0; | ||
| --d2l-sem-shadow-inset: inset var(--d2l-shadow-inset-offset-x) var(--d2l-shadow-inset-offset-y) var(--d2l-shadow-inset-blur) var(--d2l-shadow-inset-spread) var(--d2l-shadow-inset-color); | ||
| --d2l-background-color-base: #161718; | ||
| --d2l-background-color-elevated: var(--d2l-color-ferrite); | ||
| --d2l-background-color-floating: var(--d2l-color-ferrite); | ||
| --d2l-background-color-interactive-faint-default: var(--d2l-color-ferrite); | ||
| --d2l-background-color-interactive-faint-hover: #303335; | ||
| --d2l-background-color-interactive-highlighted: var(--d2l-brand-color-highlight); | ||
| --d2l-background-color-interactive-primary-default: var(--d2l-brand-color-primary-default); | ||
| --d2l-background-color-interactive-primary-hover: var(--d2l-brand-color-primary-hover); | ||
| --d2l-background-color-interactive-secondary-default: #303335; | ||
| --d2l-background-color-interactive-secondary-hover: var(--d2l-color-ferrite); | ||
| --d2l-background-color-interactive-tertiary-default: #000000; | ||
| --d2l-background-color-interactive-tertiary-hover: var(--d2l-background-color-interactive-secondary-default); | ||
| --d2l-background-color-interactive-translucent-default: #000000; | ||
| --d2l-background-color-interactive-translucent-hover: var(--d2l-brand-color-primary-default); | ||
| --d2l-background-color-sunken: #000000; | ||
| --d2l-border-color-emphasized: var(--d2l-color-galena); | ||
| --d2l-border-color-focus: var(--d2l-color-celestine-plus-1); | ||
| --d2l-border-color-standard: var(--d2l-color-tungsten); | ||
| --d2l-border-color-subtle: #303335; | ||
| --d2l-brand-color-highlight: #161718; | ||
| --d2l-brand-color-primary-default: var(--d2l-color-celestine-plus-1); | ||
| --d2l-brand-color-primary-hover: var(--d2l-color-celestine); | ||
| --d2l-icon-color-faint: var(--d2l-border-color-standard); | ||
| --d2l-icon-color-inverted: #ffffff; | ||
| --d2l-icon-color-standard: var(--d2l-color-corundum); | ||
| --d2l-status-color-default: var(--d2l-brand-color-primary-default); | ||
| --d2l-status-color-error: var(--d2l-color-cinnabar-plus-1); | ||
| --d2l-status-color-success-text: #ffffff; | ||
| --d2l-status-color-success: var(--d2l-color-olivine); | ||
| --d2l-status-color-warning-text: var(--d2l-color-carnelian); | ||
| --d2l-status-color-warning: var(--d2l-color-carnelian); | ||
| --d2l-text-color-interactive-default: var(--d2l-brand-color-primary-default); | ||
| --d2l-text-color-interactive-hover: var(--d2l-brand-color-primary-hover); | ||
| --d2l-text-color-static-faint: var(--d2l-color-galena); | ||
| --d2l-text-color-static-inverted: #161718; | ||
| --d2l-text-color-static-standard: var(--d2l-color-mica); | ||
| --d2l-text-color-static-subtle: var(--d2l-color-chromite); | ||
|
|
||
| --d2l-opacity-disabled-control: 0.5; | ||
| --d2l-opacity-disabled-link: 0.74; | ||
| --d2l-opacity-disabled-linkicon: 0.64; | ||
|
|
||
| --d2l-shadow-attached-block-start: 0 2px 4px 0 rgba(0, 0, 0, 0.03); | ||
| --d2l-shadow-attached-block-end: 0 -2px 4px 0 rgba(0, 0, 0, 0.03); | ||
| --d2l-shadow-floating: 0 2px 12px 0 rgba(0, 0, 0, 0.85); | ||
| --d2l-shadow-inset: inset 0 2px 0 0 rgba(177, 185, 190, 0.2); /* corundum */ | ||
| `; | ||
|
|
||
| style.textContent = ` | ||
|
|
||


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.
I'll admit that it does feel a bit naked now, but I think I still prefer it to
sem.What about something like
-theme-? So--d2l-theme-background-color-base.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.
Definitely an option I think.
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.
Other ones I'd thought of were
--d2l-core-*or--d2l-ui-*. Don't necessarily love them, but they're short and I like them more thansem.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.
d2l-mode-*is also an option if four letters is fine and we're set on different color/spacing "modes" 🤷♀️