Skip to content

Commit ca6a71c

Browse files
authored
refactor: remove usage of CSS layers from base styles (#9659)
1 parent a3b7054 commit ca6a71c

File tree

67 files changed

+3789
-3989
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+3789
-3989
lines changed

.stylelintrc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,10 @@
22
"extends": ["stylelint-config-vaadin"],
33
"plugins": [
44
"./custom-rules/stylelint/no-shorthand-with-unresolved-longhand.js",
5-
"./custom-rules/stylelint/license-header.js",
6-
"./custom-rules/stylelint/use-layers.js"
5+
"./custom-rules/stylelint/license-header.js"
76
],
87
"overrides": [
98
{ "files": ["**/*.js"], "customSyntax": "postcss-lit" },
10-
{
11-
"files": ["**/*-base-styles.js"],
12-
"rules": {
13-
"custom-rules/use-layers": ["^(vaadin\\.)?base$"]
14-
}
15-
},
169
{
1710
"files": ["packages/vaadin-lumo-styles/**/*.css"],
1811
"rules": {

custom-rules/stylelint/use-layers.js

Lines changed: 0 additions & 54 deletions
This file was deleted.

packages/accordion/src/styles/vaadin-accordion-heading-base-styles.js

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,19 @@ import { detailsSummary } from '@vaadin/details/src/styles/vaadin-details-summar
99
export const accordionHeading = [
1010
detailsSummary('vaadin-accordion-heading'),
1111
css`
12-
@layer base {
13-
button {
14-
align-items: center;
15-
appearance: none;
16-
background: transparent;
17-
border: 0;
18-
color: inherit;
19-
cursor: inherit;
20-
display: flex;
21-
font: inherit;
22-
gap: inherit;
23-
outline: none;
24-
padding: 0;
25-
touch-action: manipulation;
26-
}
12+
button {
13+
align-items: center;
14+
appearance: none;
15+
background: transparent;
16+
border: 0;
17+
color: inherit;
18+
cursor: inherit;
19+
display: flex;
20+
font: inherit;
21+
gap: inherit;
22+
outline: none;
23+
padding: 0;
24+
touch-action: manipulation;
2725
}
2826
`,
2927
];

packages/accordion/src/styles/vaadin-accordion-panel-base-styles.js

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,23 @@
66
import { css } from 'lit';
77

88
export const accordionPanel = css`
9-
@layer base {
10-
:host {
11-
display: block;
12-
}
9+
:host {
10+
display: block;
11+
}
1312
14-
:host([hidden]) {
15-
display: none !important;
16-
}
13+
:host([hidden]) {
14+
display: none !important;
15+
}
1716
18-
[part='content'] {
19-
box-sizing: border-box;
20-
}
17+
[part='content'] {
18+
box-sizing: border-box;
19+
}
2120
22-
:host(:not([opened])) [part='content'] {
23-
display: none !important;
24-
}
21+
:host(:not([opened])) [part='content'] {
22+
display: none !important;
23+
}
2524
26-
:host([focus-ring]) {
27-
--_focus-ring: 1;
28-
}
25+
:host([focus-ring]) {
26+
--_focus-ring: 1;
2927
}
3028
`;

0 commit comments

Comments
 (0)