-
Notifications
You must be signed in to change notification settings - Fork 16
Refactor theming system to use centralized Lime Elements CSS variables #3624
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
5710adb
54a3261
f133ca2
16c79a0
44e931f
14ec7b0
408440b
3085095
a40d70e
c6c4d36
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 |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| @use '../../style/functions'; | ||
| @use '../../style/internal/lime-theme'; | ||
| @use '../../style/mixins'; | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| @use '../../style/internal/lime-theme'; | ||
| @use '../../style/internal/variables'; | ||
|
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. |
||
| @use '../../style/functions'; | ||
|
|
||
| /** | ||
|
|
@@ -8,7 +6,7 @@ | |
| */ | ||
|
|
||
| .lime-banner { | ||
| min-height: variables.$lime-banner-height; | ||
| min-height: 3.25rem; | ||
| display: none; | ||
Kiarokh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| background-color: rgba(var(--contrast-100), 0.7); | ||
| backdrop-filter: blur(functions.pxToRem(5)); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ | |
| display: inline-grid; | ||
| grid-auto-flow: column; | ||
| margin: functions.pxToRem(2) !important; | ||
| font-size: functions.pxToRem(14); | ||
| font-size: var(--limel-theme-default-font-size); | ||
|
|
||
| &:not(:last-child) { | ||
| &:after { | ||
|
|
@@ -96,7 +96,7 @@ | |
| // which gets focused, which is inside this element… | ||
| // and we are removing or hiding the visual appearance of the button | ||
| outline: none; | ||
| color: var(--mdc-theme-primary); | ||
| color: var(--lime-primary-color, var(--limel-theme-primary-color)); | ||
| } | ||
|
|
||
| &:only-child { | ||
|
|
@@ -113,7 +113,7 @@ | |
| } | ||
|
|
||
| &.mdc-chip--selected { | ||
| background-color: var(--mdc-theme-surface); | ||
|
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. |
||
| background-color: var(--limel-theme-surface-background-color); | ||
| box-shadow: var(--button-shadow-inset); | ||
|
|
||
Kiarokh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| &:active { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,6 @@ | ||
| @use '../../style/functions'; | ||
| @use '../../style/mixins'; | ||
|
|
||
| @use '../../style/internal/lime-theme'; | ||
|
|
||
| :host { | ||
| display: inline-block; | ||
| } | ||
|
|
@@ -56,10 +54,13 @@ button { | |
|
|
||
| :host(limel-button[primary]) & { | ||
| &:not(:disabled) { | ||
| color: var(--mdc-theme-on-primary, rgb(var(--color-white))); | ||
|
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.
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. and this behaviour we could fix on go: Screen.Recording.2025-08-04.at.14.25.05.mov
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. thanks for these 🙏 . I think I know why this happens. I'm gonna fix them soon |
||
| color: var( | ||
| --lime-on-primary-color, | ||
| var(--limel-theme-on-primary-color) | ||
| ); | ||
| background-color: var( | ||
| --mdc-theme-primary, | ||
| rgb(var(--color-teal-default)) | ||
| --lime-primary-color, | ||
| var(--limel-theme-primary-color) | ||
| ); | ||
| } | ||
|
Comment on lines
55
to
65
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. 🧹 Nitpick (assertive) Factor-out the repeated primary color fallback chain The same :host {
+ /* Centralise resolved theme colours */
+ --limel-primary-resolved: var(--lime-primary-color, var(--limel-theme-primary-color));
+ --limel-on-primary-resolved: var(--lime-on-primary-color, var(--limel-theme-on-primary-color));
}
…
- color: var(--lime-on-primary-color, var(--limel-theme-on-primary-color));
+ color: var(--limel-on-primary-resolved);
…
- background-color: var(--lime-primary-color, var(--limel-theme-primary-color));
+ background-color: var(--limel-primary-resolved);
…
- color: var(--lime-primary-color, var(--limel-theme-primary-color));
+ color: var(--limel-primary-resolved);
…
- border-color: var(--lime-primary-color, var(--limel-theme-primary-color));
+ border-color: var(--limel-primary-resolved);Also applies to: 73-73, 147-147 🤖 Prompt for AI Agents |
||
| &:disabled { | ||
|
|
@@ -69,7 +70,7 @@ button { | |
|
|
||
| :host(limel-button:not([primary])) & { | ||
| &:not(:disabled) { | ||
| color: var(--mdc-theme-primary, rgb(var(--color-teal-default))); | ||
| color: var(--lime-primary-color, var(--limel-theme-primary-color)); | ||
| } | ||
| &:disabled { | ||
| color: rgba(var(--contrast-1600), 0.37); | ||
|
|
@@ -79,7 +80,7 @@ button { | |
| } | ||
|
|
||
| .label { | ||
| font-size: 0.875rem; | ||
| font-size: var(--limel-theme-default-font-size); | ||
| font-weight: 600; | ||
Kiarokh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| letter-spacing: functions.pxToRem(0.5); | ||
| padding: 0 0.25rem; | ||
|
|
@@ -137,13 +138,13 @@ svg { | |
| } | ||
|
|
||
| .just-failed { | ||
| background-color: var(--lime-error-text-color) !important; | ||
| background-color: var(--limel-theme-error-color) !important; | ||
| animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; | ||
| } | ||
|
|
||
| .outlined { | ||
| border: 1px solid; | ||
| border-color: var(--mdc-theme-primary); | ||
| border-color: var(--lime-primary-color, var(--limel-theme-primary-color)); | ||
| } | ||
|
|
||
| @keyframes shake { | ||
|
|
||



Uh oh!
There was an error while loading. Please reload this page.