Skip to content
Merged
2 changes: 1 addition & 1 deletion guides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Guide } from 'kompendium';
export default [
{
name: 'Home',
children: ['src/contributing.md', 'src/events.md'],
children: ['src/contributing.md', 'src/events.md', 'src/theming.md'],
},
{
name: 'DesignGuidelines',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ button {
color: var(--limel-action-bar-item-text-color);

border-radius: var(--action-bar-item-height);
font-size: functions.pxToRem(14);
font-size: var(--limel-theme-default-font-size);
padding: 0 0.25rem;

&:has(.text) {
Expand All @@ -55,7 +55,10 @@ button {
&:not(:hover) {
box-shadow: var(--button-shadow-inset);
}
color: var(--mdc-theme-primary) !important;
color: var(
--lime-primary-color,
var(--limel-theme-primary-color)
) !important;
}
}

Expand Down
1 change: 0 additions & 1 deletion src/components/badge/badge.scss
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';

/**
Expand Down
4 changes: 1 addition & 3 deletions src/components/banner/banner.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@use '../../style/internal/lime-theme';
@use '../../style/internal/variables';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be a wrong reference, please just check here
Screenshot 2025-08-04 at 14 43 58
Screenshot 2025-08-04 at 14 45 14

@use '../../style/functions';

/**
Expand All @@ -8,7 +6,7 @@
*/

.lime-banner {
min-height: variables.$lime-banner-height;
min-height: 3.25rem;
display: none;
background-color: rgba(var(--contrast-100), 0.7);
backdrop-filter: blur(functions.pxToRem(5));
Expand Down
2 changes: 1 addition & 1 deletion src/components/breadcrumbs/breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ol {

color: var(--limel-breadcrumbs-item-text-color);
border-radius: 100vw;
font-size: 0.875rem;
font-size: var(--limel-theme-default-font-size);
padding: 0 0.25rem;

&:not(:has(.text)) {
Expand Down
6 changes: 3 additions & 3 deletions src/components/button-group/button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -113,7 +113,7 @@
}

&.mdc-chip--selected {
background-color: var(--mdc-theme-surface);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some icon missing it now:
Screenshot 2025-08-04 at 14 25 28

background-color: var(--limel-theme-surface-background-color);
box-shadow: var(--button-shadow-inset);

&:active {
Expand Down
19 changes: 10 additions & 9 deletions src/components/button/button.scss
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;
}
Expand Down Expand Up @@ -56,10 +54,13 @@ button {

:host(limel-button[primary]) & {
&:not(:disabled) {
color: var(--mdc-theme-on-primary, rgb(var(--color-white)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-08-04 at 14 25 34

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this behaviour we could fix on go:
(it's not related to this pr)

Screen.Recording.2025-08-04.at.14.25.05.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Factor-out the repeated primary color fallback chain

The same var(--lime-primary-color, var(--limel-theme-primary-color)) / --lime-on-primary-color fallback appears three times. Defining a resolved variable once on :host and re-using it would avoid copy-paste drift and keep future edits atomic.

: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
In src/components/button/button.scss around lines 55 to 65, the fallback color
variables for primary color and on-primary color are repeated multiple times. To
fix this, define CSS custom properties on the :host selector that resolve these
fallback chains once, then use these custom properties throughout the styles
instead of repeating the var() calls. Apply the same refactoring for the lines
73 and 147 as well to ensure consistency and easier maintenance.

&:disabled {
Expand All @@ -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);
Expand All @@ -79,7 +80,7 @@ button {
}

.label {
font-size: 0.875rem;
font-size: var(--limel-theme-default-font-size);
font-weight: 600;
letter-spacing: functions.pxToRem(0.5);
padding: 0 0.25rem;
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ header {
}

h2 {
font-size: 0.875rem;
font-size: var(--limel-theme-default-font-size);
font-weight: 400;
color: var(--card-subheading-color, rgb(var(--contrast-1000)));
}
Expand Down
13 changes: 9 additions & 4 deletions src/components/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use '../../style/internal/lime-theme';
@use '@material/checkbox';
@use '@material/form-field';

Expand All @@ -8,7 +7,10 @@

@mixin custom-checkbox-styles {
// This is used in other components too, such as `limel-list`
--mdc-checkbox-checked-color: var(--mdc-theme-primary);
--mdc-checkbox-checked-color: var(
--lime-primary-color,
var(--limel-theme-primary-color)
);
--mdc-checkbox-unchecked-color: var(
--checkbox-unchecked-border-color,
rgb(var(--contrast-900))
Expand Down Expand Up @@ -38,6 +40,7 @@ limel-dynamic-label {
// other font-related styles that might be set by MDC,
// such as `letter-spacing` or `font-size`.
font-family: inherit;
font-size: var(--limel-theme-default-font-size);
}

.mdc-form-field {
Expand All @@ -61,7 +64,7 @@ limel-dynamic-label {
:indeterminate
)
~ .mdc-checkbox__background {
border-color: var(--lime-error-text-color);
border-color: var(--limel-theme-error-color);
}
}
.mdc-checkbox__native-control {
Expand Down Expand Up @@ -91,13 +94,15 @@ limel-dynamic-label {
padding-top: 0.75rem;
padding-left: 0;

color: var(--limel-theme-text-primary-on-background-color);

&.mdc-checkbox--required::after {
margin-left: 0.0625rem;
content: '*';
}

&.mdc-checkbox--invalid {
color: var(--lime-error-text-color);
color: var(--limel-theme-error-text-color);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/checkbox/checkbox.template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const CheckboxTemplate: FunctionalComponent<CheckboxTemplateProps> = (
if (props.checked) {
icon = {
name: 'ok',
color: 'var(--mdc-theme-primary)',
color: 'var(--lime-primary-color, var(--limel-theme-primary-color))',
};
}

Expand Down
4 changes: 1 addition & 3 deletions src/components/chip-set/chip-set.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
@use '../../style/internal/shared_input-select-picker';
@use '../../style/mixins';

@use '../../style/internal/lime-theme';

@use '@material/textfield';
@use '@material/textfield/icon';

Expand Down Expand Up @@ -159,7 +157,7 @@ $leading-icon-space: 1.5rem;
.delimiter {
opacity: 0.5;
padding: 0 functions.pxToRem(2);
color: var(--mdc-theme-on-surface);
color: var(--limel-theme-on-surface-color);
}

limel-chip {
Expand Down
3 changes: 2 additions & 1 deletion src/components/chip/chip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
}
}
.text {
color: var(--mdc-theme-primary);
color: var(--lime-primary-color, var(--limel-theme-primary-color));
}
}

Expand Down Expand Up @@ -183,6 +183,7 @@ limel-badge {
@include mixins.truncate-text;
line-height: 1.2;
padding: 0 0.5rem;
font-size: var(--limel-theme-default-font-size);
}

.trailing-button {
Expand Down
6 changes: 4 additions & 2 deletions src/components/circular-progress/circular-progress.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@use '../../style/functions';
@use '../../style/mixins';
@use '../../style/internal/lime-theme';

/**
* @prop --circular-progress-size: Determines the visual size of the visualization. This does not override the `size` property if it is specified.
Expand Down Expand Up @@ -50,7 +49,10 @@

.lime-circular-progress {
--size: var(--circular-progress-size, 3rem);
--fill-color: var(--circular-progress-fill-color, var(--mdc-theme-primary));
--fill-color: var(
--circular-progress-fill-color,
var(--lime-primary-color, var(--limel-theme-primary-color))
);
--track-color: var(
--circular-progress-track-color,
rgb(var(--contrast-400))
Expand Down
3 changes: 1 addition & 2 deletions src/components/collapsible-section/collapsible-section.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use '../../style/internal/lime-theme';
@use '../../style/mixins';
@use '../../style/internal/shared_input-select-picker';

Expand Down Expand Up @@ -101,7 +100,7 @@ limel-icon {
.title {
font-size: 1rem;
font-weight: 300;
color: var(--mdc-theme-on-surface);
color: var(--limel-theme-on-surface-color);

justify-self: flex-start;

Expand Down
35 changes: 25 additions & 10 deletions src/components/date-picker/flatpickr-adapter/flatpickr-adapter.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@use '../../../style/internal/lime-theme';
@use '../../../style/functions';
@use '../../../style/mixins';

Expand Down Expand Up @@ -84,19 +83,32 @@ svg {
&.endRange,
&.inRange,
&.selected:hover {
border-color: var(--mdc-theme-primary);
color: var(--mdc-theme-on-primary);
background: var(--mdc-theme-primary);
border-color: var(
--lime-primary-color,
var(--limel-theme-primary-color)
);
color: var(
--lime-on-primary-color,
var(--limel-theme-on-primary-color)
);
background: var(--lime-primary-color, var(--limel-theme-primary-color));
}

&.today {
border-color: var(--mdc-theme-on-primary);
box-shadow: 0 0 0 0.125rem var(--mdc-theme-primary);
border-color: var(
--lime-on-primary-color,
var(--limel-theme-on-primary-color)
);
box-shadow: 0 0 0 0.125rem
var(--lime-primary-color, var(--limel-theme-primary-color));

&:hover {
&:not(.selected) {
background-color: transparent;
color: var(--mdc-theme-primary);
color: var(
--lime-primary-color,
var(--limel-theme-primary-color)
);
}
&:before {
top: -60%;
Expand Down Expand Up @@ -139,7 +151,7 @@ svg {
border-top: 1px solid rgb(var(--contrast-400));

input {
color: var(--mdc-theme-on-surface);
color: var(--limel-theme-on-surface-color);
}

input,
Expand Down Expand Up @@ -274,8 +286,11 @@ svg {
text-align: center;

&.selected {
color: var(--mdc-theme-on-primary);
background: var(--mdc-theme-primary);
color: var(
--lime-on-primary-color,
var(--limel-theme-on-primary-color)
);
background: var(--lime-primary-color, var(--limel-theme-primary-color));
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/components/dialog/dialog.scss
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';

@use '@material/dialog';

/**
Expand Down Expand Up @@ -91,7 +89,7 @@ $responsive-body-padding: 3vw; // 3% of viewport's width
);
@include mixins.fade-out-overflowed-content-on-edges(vertically);

color: var(--mdc-theme-on-surface);
color: var(--limel-theme-on-surface-color);
padding-left: var(
--dialog-padding-left-right,
min(1.25rem, $responsive-body-padding)
Expand Down
3 changes: 1 addition & 2 deletions src/components/dock/dock-button/dock-button.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@use '../../../style/mixins';
@use '../../../style/functions';
@use '../../../style/internal/variables';

.button {
all: unset;
Expand All @@ -21,7 +20,7 @@
height: var(--dock-item-height);

border-radius: functions.pxToRem(6);
font-size: functions.pxToRem(14);
font-size: var(--limel-theme-default-font-size);
padding: 0 0.5rem;
min-width: var(--dock-item-height);

Expand Down
1 change: 0 additions & 1 deletion src/components/dock/dock.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@use '../../style/mixins';
@use '../../style/functions';
@use '../../style/internal/variables';

/**
* @prop --dock-expanded-max-width: The maximum width of the Dock when it is expanded. Defaults to `max-content` which means the Dock will adjust its width to the widest dock item.
Expand Down
2 changes: 1 addition & 1 deletion src/components/dynamic-label/dynamic-label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ label {
flex-grow: 1;
font-size: 0.8125rem; // `13px`, Like Checkbox & Switch
line-height: normal;
color: var(--mdc-theme-on-surface);
color: var(--limel-theme-on-surface-color);
padding-top: 0.375rem;
}
Loading