Skip to content

Conversation

@Kiarokh
Copy link
Contributor

@Kiarokh Kiarokh commented Aug 6, 2025

We now have an internal CSS variable called
--limel-theme-default-small-font-size, that can unify all font sizes that
are 0.8125rem (13px) across all components.

Summary by CodeRabbit

  • Style
    • Updated various components to use a theme-based variable for small font sizes, replacing hardcoded values for improved consistency and easier theming.
    • Introduced a new CSS custom property for the default small font size, enabling better customization across the application.

Review:

  • Commits are atomic
  • Commits have the correct type for the changes made
  • Commits with breaking changes are marked as such

Browsers tested:

(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)

Windows:

  • Chrome
  • Edge
  • Firefox

Linux:

  • Chrome
  • Firefox

macOS:

  • Chrome
  • Firefox
  • Safari

Mobile:

  • Chrome on Android
  • iOS

Kiarokh added 2 commits August 6, 2025 11:42
…font-sizes

We now have an internal CSS variable called
`--limel-theme-default-small-font-size`, that can unify all font sizes that
are `0.8125rem` (`13px`) across all components.
…font-sizes

Using `--limel-theme-default-small-font-size`, we now unify all font sizes that
are `0.8125rem` (`13px`), in various components.
@Kiarokh Kiarokh requested a review from LucyChyzhova August 6, 2025 09:44
@Kiarokh Kiarokh self-assigned this Aug 6, 2025
Copilot AI review requested due to automatic review settings August 6, 2025 09:44
@Kiarokh Kiarokh added the maintenance Things that are important but not urgent, and not directly related to any specific bug or feature label Aug 6, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 6, 2025

📝 Walkthrough

Walkthrough

A new CSS custom property --limel-theme-default-small-font-size was introduced and applied across multiple component stylesheets, replacing hardcoded small font sizes with this theme-based variable. No changes were made to component logic or exported entities; all updates are limited to SCSS files.

Changes

Cohort / File(s) Change Summary
Theme Variable Introduction
src/global/core-styles.scss
Added --limel-theme-default-small-font-size: 0.8125rem as a CSS custom property to the :root selector.
Button Group Styling
src/components/button-group/button-group.scss
Replaced fixed font size for .mdc-chip__text with the new CSS variable.
Dynamic Label Styling
src/components/dynamic-label/dynamic-label.scss
Updated label font size to use the theme variable instead of a fixed value.
Form Row Styling
src/components/form/row/row.scss
Changed .description font size to use the new theme variable.
Header Subheading Styling
src/components/header/header.scss
Updated .subheading font size to use the theme variable.
List Component Styling
src/components/list/list.scss
Changed font sizes for .mdc-deprecated-list-item__secondary-text and .limel-list-divider-title to use the theme var.
Markdown Code Styling
src/components/markdown/partial-styles/_pre-code.scss
Updated code font size to use the theme variable.
Menu List Styling
src/components/menu-list/menu-list.scss
Updated menu item font size to use the theme variable.
Slider Value Indicator Styling
src/components/slider/slider.scss
Changed .mdc-slider__value-indicator-text font size to use the theme variable.
Snackbar Label Styling
src/components/snackbar/snackbar.scss
Changed .label font size to use the theme variable.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • LucyChyzhova

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a74c49 and 5082625.

📒 Files selected for processing (10)
  • src/components/button-group/button-group.scss (1 hunks)
  • src/components/dynamic-label/dynamic-label.scss (1 hunks)
  • src/components/form/row/row.scss (1 hunks)
  • src/components/header/header.scss (1 hunks)
  • src/components/list/list.scss (2 hunks)
  • src/components/markdown/partial-styles/_pre-code.scss (1 hunks)
  • src/components/menu-list/menu-list.scss (1 hunks)
  • src/components/slider/slider.scss (1 hunks)
  • src/components/snackbar/snackbar.scss (1 hunks)
  • src/global/core-styles.scss (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/components/**/*.scss

📄 CodeRabbit Inference Engine (.cursor/rules/css-class-names-in-components-using-shadow-dom.mdc)

Do not use BEM-style class names in CSS for components, as components use shadow-DOM.

Files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/slider/slider.scss
  • src/components/form/row/row.scss
  • src/components/menu-list/menu-list.scss
  • src/components/markdown/partial-styles/_pre-code.scss
  • src/components/button-group/button-group.scss
  • src/components/list/list.scss
  • src/components/header/header.scss
  • src/components/snackbar/snackbar.scss
**/*.{tsx,scss}

⚙️ CodeRabbit Configuration File

**/*.{tsx,scss}: Almost all our components use shadow-DOM. Therefore, we have no need of BEM-style class names in our CSS.

Files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/slider/slider.scss
  • src/components/form/row/row.scss
  • src/global/core-styles.scss
  • src/components/menu-list/menu-list.scss
  • src/components/markdown/partial-styles/_pre-code.scss
  • src/components/button-group/button-group.scss
  • src/components/list/list.scss
  • src/components/header/header.scss
  • src/components/snackbar/snackbar.scss
🧠 Learnings (14)
📓 Common learnings
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:24-28
Timestamp: 2025-04-25T14:22:02.157Z
Learning: In lime-elements, CSS custom properties follow a specific naming convention:
1. Internal use variables (not for consumers) are prefixed with `--limel-component-name-`
2. External use variables (intended for consumers) are prefixed with `--component-name-`
Variables documented with JSDoc comments are typically meant for external use.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3624
File: src/components/button-group/button-group.scss:115-118
Timestamp: 2025-07-30T14:20:41.791Z
Learning: In lime-elements, CSS custom properties like `--limel-theme-surface-background-color` are applied at :root level via `core-styles.scss` and should be expected to be available without fallbacks. The library's architecture guarantees these theme variables are present, so adding fallbacks would be redundant and go against the design intention.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3624
File: src/components/button-group/button-group.scss:115-118
Timestamp: 2025-07-30T14:20:41.791Z
Learning: In lime-elements, CSS custom properties like `--limel-theme-surface-background-color` are applied at :root level via `core-styles.scss` and should be expected to be available without fallbacks. The library's architecture guarantees these theme variables are present, so adding fallbacks would be redundant and go against the design intention.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:1-3
Timestamp: 2025-04-25T14:23:56.018Z
Learning: In the lime-elements repository, CSS custom properties prefixed with `--lime-` are considered internal implementation details and should not be documented in JSDoc comments, while other custom properties should be documented as they are part of the public API.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3464
File: src/components/text-editor/prosemirror-adapter/plugins/image/view.scss:14-17
Timestamp: 2025-03-11T13:31:46.958Z
Learning: Lime Elements generally does not support unreasonably old browsers, so modern CSS properties like `scale` that have good support in current browsers are preferred over older alternatives.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3539
File: src/components/text-editor/text-editor.scss:14-14
Timestamp: 2025-04-24T10:16:05.891Z
Learning: In SCSS, prefer using `calc()` function over native SCSS arithmetic operations (like `$variable / 2`) as it aligns with modern SASS recommendations for better CSS compatibility and interoperability with CSS variables.
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3530
File: src/components/text-editor/examples/text-editor-composite.tsx:4-7
Timestamp: 2025-04-17T09:39:36.254Z
Learning: For lime-elements, example files should import types from the public API using 'limetech/lime-elements' rather than defining duplicate types locally. This includes types like `EditorUiType` which are part of the component's public API.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3518
File: src/components/notched-outline/examples/notched-outline-basic.scss:11-22
Timestamp: 2025-04-14T10:01:18.721Z
Learning: Examples in Lime Elements use Shadow DOM (with `shadow: true` in the component decorator) for style encapsulation, making additional class-based selectors unnecessary. This ensures styles are automatically scoped to each component without leaking to the rest of the application.
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3464
File: src/components/text-editor/prosemirror-adapter/plugins/image/view.scss:14-17
Timestamp: 2025-03-11T14:00:26.264Z
Learning: The CSS `scale` property (as used in the scale: 0.98 syntax) is fully supported in modern browsers including Firefox (since v72). This is different from the CSSScale JavaScript API, which has more limited browser support.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:96-122
Timestamp: 2025-04-25T14:18:07.755Z
Learning: In Lime Elements components that use Shadow DOM (with `shadow: true` in the component decorator), keyframe animation names don't need to be namespaced as they are automatically scoped to the component and won't collide with animations from other components.
📚 Learning: in lime-elements, css custom properties follow a specific naming convention: 1. internal use variabl...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:24-28
Timestamp: 2025-04-25T14:22:02.157Z
Learning: In lime-elements, CSS custom properties follow a specific naming convention:
1. Internal use variables (not for consumers) are prefixed with `--limel-component-name-`
2. External use variables (intended for consumers) are prefixed with `--component-name-`
Variables documented with JSDoc comments are typically meant for external use.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/slider/slider.scss
  • src/components/form/row/row.scss
  • src/global/core-styles.scss
  • src/components/menu-list/menu-list.scss
  • src/components/markdown/partial-styles/_pre-code.scss
  • src/components/button-group/button-group.scss
  • src/components/list/list.scss
  • src/components/header/header.scss
  • src/components/snackbar/snackbar.scss
📚 Learning: in the lime-elements repository, css custom properties prefixed with `--lime-` are considered intern...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:1-3
Timestamp: 2025-04-25T14:23:56.018Z
Learning: In the lime-elements repository, CSS custom properties prefixed with `--lime-` are considered internal implementation details and should not be documented in JSDoc comments, while other custom properties should be documented as they are part of the public API.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/slider/slider.scss
  • src/components/form/row/row.scss
  • src/global/core-styles.scss
  • src/components/menu-list/menu-list.scss
  • src/components/markdown/partial-styles/_pre-code.scss
  • src/components/button-group/button-group.scss
  • src/components/list/list.scss
  • src/components/snackbar/snackbar.scss
📚 Learning: in lime-elements, css custom properties like `--limel-theme-surface-background-color` are applied at...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3624
File: src/components/button-group/button-group.scss:115-118
Timestamp: 2025-07-30T14:20:41.791Z
Learning: In lime-elements, CSS custom properties like `--limel-theme-surface-background-color` are applied at :root level via `core-styles.scss` and should be expected to be available without fallbacks. The library's architecture guarantees these theme variables are present, so adding fallbacks would be redundant and go against the design intention.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/slider/slider.scss
  • src/components/form/row/row.scss
  • src/global/core-styles.scss
  • src/components/menu-list/menu-list.scss
  • src/components/markdown/partial-styles/_pre-code.scss
  • src/components/button-group/button-group.scss
  • src/components/list/list.scss
  • src/components/header/header.scss
  • src/components/snackbar/snackbar.scss
📚 Learning: examples in lime elements use shadow dom (with `shadow: true` in the component decorator) for style ...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3518
File: src/components/notched-outline/examples/notched-outline-basic.scss:11-22
Timestamp: 2025-04-14T10:01:18.721Z
Learning: Examples in Lime Elements use Shadow DOM (with `shadow: true` in the component decorator) for style encapsulation, making additional class-based selectors unnecessary. This ensures styles are automatically scoped to each component without leaking to the rest of the application.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/global/core-styles.scss
  • src/components/list/list.scss
📚 Learning: for lime-elements, example files should import types from the public api using '@limetech/lime-eleme...
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3530
File: src/components/text-editor/examples/text-editor-composite.tsx:4-7
Timestamp: 2025-04-17T09:39:36.254Z
Learning: For lime-elements, example files should import types from the public API using 'limetech/lime-elements' rather than defining duplicate types locally. This includes types like `EditorUiType` which are part of the component's public API.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/slider/slider.scss
  • src/global/core-styles.scss
  • src/components/menu-list/menu-list.scss
  • src/components/markdown/partial-styles/_pre-code.scss
  • src/components/button-group/button-group.scss
  • src/components/list/list.scss
📚 Learning: in lime elements components that use shadow dom (with `shadow: true` in the component decorator), ke...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:96-122
Timestamp: 2025-04-25T14:18:07.755Z
Learning: In Lime Elements components that use Shadow DOM (with `shadow: true` in the component decorator), keyframe animation names don't need to be namespaced as they are automatically scoped to the component and won't collide with animations from other components.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/global/core-styles.scss
📚 Learning: lime elements generally does not support unreasonably old browsers, so modern css properties like `s...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3464
File: src/components/text-editor/prosemirror-adapter/plugins/image/view.scss:14-17
Timestamp: 2025-03-11T13:31:46.958Z
Learning: Lime Elements generally does not support unreasonably old browsers, so modern CSS properties like `scale` that have good support in current browsers are preferred over older alternatives.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/global/core-styles.scss
  • src/components/markdown/partial-styles/_pre-code.scss
📚 Learning: the lime-elements codebase must use relative imports (even with multiple "../") rather than alias im...
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3464
File: src/components/text-editor/prosemirror-adapter/plugins/image/inserter.ts:1-11
Timestamp: 2025-03-04T13:48:44.712Z
Learning: The lime-elements codebase must use relative imports (even with multiple "../") rather than alias imports or re-exports because they export types to `<repo-root>/dist/types`. Using non-relative imports breaks type generation as import paths from generated type files point to full .ts files rather than .d.ts files.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/global/core-styles.scss
  • src/components/markdown/partial-styles/_pre-code.scss
📚 Learning: in limel-chip-set, the onclick handler should be placed on the content div (
) ra...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3518
File: src/components/chip-set/chip-set.tsx:367-385
Timestamp: 2025-04-14T12:22:22.298Z
Learning: In limel-chip-set, the onClick handler should be placed on the content div (<div slot="content">) rather than on the limel-notched-outline component, and should only be applied when type is 'input'.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
📚 Learning: in example components (typically found in `src/components/*/examples/`), imports of lime-elements ex...
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3464
File: src/components/text-editor/prosemirror-adapter/plugins/image/inserter.ts:1-11
Timestamp: 2025-03-04T14:27:29.714Z
Learning: In example components (typically found in `src/components/*/examples/`), imports of lime-elements exports should use `limetech/lime-elements` instead of relative paths. This is because example components aren't included in type declarations and are used in documentation to show developers how to properly use lime-elements components.

Applied to files:

  • src/global/core-styles.scss
📚 Learning: for lime-elements, example files should be self-contained and avoid importing internal implementatio...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3530
File: src/components/text-editor/examples/text-editor-composite.tsx:4-7
Timestamp: 2025-04-16T14:14:18.253Z
Learning: For lime-elements, example files should be self-contained and avoid importing internal implementation details. Example files should only import public exports from 'limetech/lime-elements' or use relative imports for other files within the examples folder. Duplicating simple type definitions in example files is preferred over importing internal types.

Applied to files:

  • src/global/core-styles.scss
📚 Learning: in scss, prefer using `calc()` function over native scss arithmetic operations (like `$variable / 2`...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3539
File: src/components/text-editor/text-editor.scss:14-14
Timestamp: 2025-04-24T10:16:05.891Z
Learning: In SCSS, prefer using `calc()` function over native SCSS arithmetic operations (like `$variable / 2`) as it aligns with modern SASS recommendations for better CSS compatibility and interoperability with CSS variables.

Applied to files:

  • src/components/markdown/partial-styles/_pre-code.scss
📚 Learning: applies to src/components/**/*.scss : do not use bem-style class names in css for components, as com...
Learnt from: CR
PR: Lundalogik/lime-elements#0
File: .cursor/rules/css-class-names-in-components-using-shadow-dom.mdc:0-0
Timestamp: 2025-07-21T00:27:58.489Z
Learning: Applies to src/components/**/*.scss : Do not use BEM-style class names in CSS for components, as components use shadow-DOM.

Applied to files:

  • src/components/list/list.scss
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Docs / Publish Docs
  • GitHub Check: Build
  • GitHub Check: Test
🔇 Additional comments (10)
src/global/core-styles.scss (1)

28-31: Document new small‐font variable and replace remaining hard-coded 13px

Two quick follow-ups now that we’ve centralized the 13 px size as --limel-theme-default-small-font-size:

  1. Add JSDoc for the new theme variable in src/global/core-styles.scss so it shows up in our public docs. For example:

    --- src/global/core-styles.scss
    @@ :root {
      // The default font size for Lime Elements components.
      --limel-theme-default-font-size: 0.875rem; // 14px
    + /**
    +  * @prop {string} --limel-theme-default-small-font-size - Default small font size for Lime Elements (0.8125rem / 13px).
    +  */
      --limel-theme-default-small-font-size: 0.8125rem; // 13px
    }
  2. Replace the two remaining hard-coded 0.8125rem usages with the theme variable:

    • src/components/chip/chip.scss (around line 42):
      Replace
      0.8125rem /* 13px */,
      with
      var(--limel-theme-default-small-font-size),
    • src/components/code-editor/code-editor.scss:
      • Update the JSDoc on line 9 to reflect the new default:
        - * @prop --code-editor-font-size: Defines the font size of the code, defaults to `0.8125rem`.
        + * @prop --code-editor-font-size: Defines the font size of the code, defaults to `var(--limel-theme-default-small-font-size)`.
      • Change the fallback on line 125:
        - font-size: var(--code-editor-font-size, 0.8125rem); // 13px
        + font-size: var(--code-editor-font-size, var(--limel-theme-default-small-font-size));

With those in place, all 13 px references will be centrally driven by our new theme variable.

⛔ Skipped due to learnings
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:24-28
Timestamp: 2025-04-25T14:22:02.157Z
Learning: In lime-elements, CSS custom properties follow a specific naming convention:
1. Internal use variables (not for consumers) are prefixed with `--limel-component-name-`
2. External use variables (intended for consumers) are prefixed with `--component-name-`
Variables documented with JSDoc comments are typically meant for external use.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:1-3
Timestamp: 2025-04-25T14:23:56.018Z
Learning: In the lime-elements repository, CSS custom properties prefixed with `--lime-` are considered internal implementation details and should not be documented in JSDoc comments, while other custom properties should be documented as they are part of the public API.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3624
File: src/components/button-group/button-group.scss:115-118
Timestamp: 2025-07-30T14:20:41.791Z
Learning: In lime-elements, CSS custom properties like `--limel-theme-surface-background-color` are applied at :root level via `core-styles.scss` and should be expected to be available without fallbacks. The library's architecture guarantees these theme variables are present, so adding fallbacks would be redundant and go against the design intention.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3624
File: src/components/button-group/button-group.scss:115-118
Timestamp: 2025-07-30T14:20:41.791Z
Learning: In lime-elements, CSS custom properties like `--limel-theme-surface-background-color` are applied at :root level via `core-styles.scss` and should be expected to be available without fallbacks. The library's architecture guarantees these theme variables are present, so adding fallbacks would be redundant and go against the design intention.
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3530
File: src/components/text-editor/examples/text-editor-composite.tsx:4-7
Timestamp: 2025-04-17T09:39:36.254Z
Learning: For lime-elements, example files should import types from the public API using 'limetech/lime-elements' rather than defining duplicate types locally. This includes types like `EditorUiType` which are part of the component's public API.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3581
File: src/components/chip-set/chip-set.tsx:626-626
Timestamp: 2025-07-02T12:49:21.522Z
Learning: When contributors add new props to existing components in the lime-elements repository, they should always add documentation examples that demonstrate the new prop's usage and explain how it works. This helps with user adoption, feature discoverability, and maintains comprehensive documentation.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3464
File: src/components/text-editor/prosemirror-adapter/plugins/image/view.scss:14-17
Timestamp: 2025-03-11T13:31:46.958Z
Learning: Lime Elements generally does not support unreasonably old browsers, so modern CSS properties like `scale` that have good support in current browsers are preferred over older alternatives.
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3464
File: src/components/text-editor/prosemirror-adapter/plugins/image/inserter.ts:1-11
Timestamp: 2025-03-04T14:27:29.714Z
Learning: In example components (typically found in `src/components/*/examples/`), imports of lime-elements exports should use `limetech/lime-elements` instead of relative paths. This is because example components aren't included in type declarations and are used in documentation to show developers how to properly use lime-elements components.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:96-122
Timestamp: 2025-04-25T14:18:07.755Z
Learning: In Lime Elements components that use Shadow DOM (with `shadow: true` in the component decorator), keyframe animation names don't need to be namespaced as they are automatically scoped to the component and won't collide with animations from other components.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3518
File: src/components/notched-outline/examples/notched-outline-basic.scss:11-22
Timestamp: 2025-04-14T10:01:18.721Z
Learning: Examples in Lime Elements use Shadow DOM (with `shadow: true` in the component decorator) for style encapsulation, making additional class-based selectors unnecessary. This ensures styles are automatically scoped to each component without leaking to the rest of the application.
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3530
File: src/components/text-editor/examples/text-editor-composite.tsx:4-7
Timestamp: 2025-04-16T14:14:18.253Z
Learning: For lime-elements, example files should be self-contained and avoid importing internal implementation details. Example files should only import public exports from 'limetech/lime-elements' or use relative imports for other files within the examples folder. Duplicating simple type definitions in example files is preferred over importing internal types.
src/components/slider/slider.scss (1)

61-63: Consistent theming applied – no issues spotted

Replacing the literal with the shared --limel-theme-default-small-font-size keeps the component in sync with the design-tokens set.
No further action required.

src/components/dynamic-label/dynamic-label.scss (1)

25-30: Dynamic-label now inherits the shared small font size – LGTM

The switch to the theme variable removes a magic number and matches other components. Implementation is correct.

src/components/header/header.scss (1)

67-70: Subheading font size unified with theme token

Good change; keeps header typography in line with the new design system variable.

src/components/snackbar/snackbar.scss (1)

50-55: Snackbar label updated to theme variable – looks correct

Adopts the shared token; no functional or styling issues detected.

src/components/form/row/row.scss (1)

81-86: Consistent theming – replacement looks good

Replacing the hard-coded 0.8125rem with var(--limel-theme-default-small-font-size) aligns this file with the new global theme variable and keeps typography centrally configurable. No further issues spotted.

src/components/menu-list/menu-list.scss (1)

21-27: Good adoption of the new theme variable

The font-size for menu items now references --limel-theme-default-small-font-size, keeping styling consistent across components. Implementation is correct and follows the established naming conventions.

src/components/markdown/partial-styles/_pre-code.scss (1)

4-8: Typography centralisation applied correctly

code elements now use the shared small-font variable, matching the rest of the PR. No functional or naming concerns here.

src/components/button-group/button-group.scss (1)

125-129: Chip text now theme-aware

The change to var(--limel-theme-default-small-font-size) makes chip labels obey the new global small-font size. Looks good.

src/components/list/list.scss (1)

54-57: List secondary text & divider titles updated correctly

Both occurrences of the 13 px font size have been migrated to the new variable. Consistent with the library’s theming strategy—no issues detected.

Also applies to: 96-101

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch unify-small-font-sizes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new CSS variable --limel-theme-default-small-font-size to standardize the 13px font size across all components in the Lime Elements library.

  • Defines a new CSS variable for small font sizes (13px/0.8125rem)
  • Replaces hardcoded font-size values with the new CSS variable across multiple components
  • Ensures consistent theming for small text elements throughout the component library

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/global/core-styles.scss Defines the new CSS variable for small font size
src/components/snackbar/snackbar.scss Updates snackbar text to use the new variable
src/components/slider/slider.scss Updates slider value indicator text to use the new variable
src/components/menu-list/menu-list.scss Updates menu item font size to use the new variable
src/components/markdown/partial-styles/_pre-code.scss Updates code element font size to use the new variable
src/components/list/list.scss Updates secondary text and other small text elements to use the new variable
src/components/header/header.scss Updates subheading font size to use the new variable
src/components/form/row/row.scss Updates description text font size to use the new variable
src/components/dynamic-label/dynamic-label.scss Updates label font size to use the new variable
src/components/button-group/button-group.scss Updates chip text font size to use the new variable

@coderabbitai coderabbitai bot changed the title @coderabbitai Replace hardcoded small font sizes with theme variable in SCSS files Aug 6, 2025
@github-actions
Copy link

github-actions bot commented Aug 6, 2025

Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3635/

@LucyChyzhova LucyChyzhova merged commit 3d22d12 into main Aug 6, 2025
12 checks passed
@LucyChyzhova LucyChyzhova deleted the unify-small-font-sizes branch August 6, 2025 09:52
@lime-opensource
Copy link
Collaborator

🎉 This PR is included in version 38.21.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Things that are important but not urgent, and not directly related to any specific bug or feature released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants