-
Notifications
You must be signed in to change notification settings - Fork 86
refactor: remove usage of CSS layers from base styles #9659
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
Conversation
@@ -3,62 +3,60 @@ | |||
* Copyright (c) 2020 - 2025 Vaadin Ltd. | |||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | |||
*/ | |||
import '@vaadin/component-base/src/style-props.js'; |
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.
Added missing import since the component uses --vaadin-focus-ring-width
defined in style-props.js
.
@@ -3,270 +3,269 @@ | |||
* Copyright (c) 2024 - 2025 Vaadin Ltd. | |||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | |||
*/ | |||
import '@vaadin/component-base/src/style-props.js'; |
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.
Added missing import.
html { | ||
/* Background color */ | ||
--vaadin-background-color: light-dark(#fff, #222); | ||
:where(html) { |
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.
Changed to align with the approach used in Lumo.
@@ -3,57 +3,56 @@ | |||
* Copyright (c) 2021 - 2025 Vaadin Ltd. | |||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | |||
*/ | |||
import '@vaadin/component-base/src/style-props.js'; |
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.
Added missing import as the component uses --vaadin-clickable-cursor
defined in style-props.js
.
@@ -3,30 +3,29 @@ | |||
* Copyright (c) 2021 - 2025 Vaadin Ltd. | |||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | |||
*/ | |||
import '@vaadin/component-base/src/style-props.js'; |
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.
Added missing import.
|
vaadin-side-nav-item:has(> vaadin-icon[slot='prefix'])::part(link) { | ||
--_has-prefix-icon:; | ||
} | ||
:where(vaadin-side-nav-item:has(> vaadin-icon[slot='prefix']))::part(link) { |
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.
Not sure if we need :where
here but I added it to align with other components using SlotStylesMixin
.
Description
As previously agreed, let's remove
@layer
from base styles to make it easier for themes to override certain properties without having specificity issues. This also removes corresponding Stylelint rule.Note: please review with "hide whitespaces" option enabled.
Type of change