Skip to content

Commit 9d38026

Browse files
authored
refactor: lint CSS in Lumo mixins, fix Stylelint warnings (#10564)
1 parent c976d87 commit 9d38026

File tree

5 files changed

+5
-11
lines changed

5 files changed

+5
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dev:start": "yarn workspace dev start",
1414
"icons": "lerna run icons",
1515
"lint": "npm-run-all --parallel lint:*",
16-
"lint:css": "stylelint --ignore-path .gitignore \"packages/**/src/**/*.js\" \"packages/**/*.css\" \"dev/**/*.html\"",
16+
"lint:css": "stylelint --ignore-path .gitignore \"packages/**/src/**/*.js\" \"packages/vaadin-lumo-styles/mixins/*.js\" \"packages/**/*.css\" \"dev/**/*.html\"",
1717
"lint:js": "eslint",
1818
"lint:types": "tsc",
1919
"postinstall": "patch-package",

packages/vaadin-lumo-styles/mixins/input-field-shared.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ const inputField = css`
130130
25% {
131131
transform: translateX(4px);
132132
}
133+
133134
75% {
134135
transform: translateX(-4px);
135136
}

packages/vaadin-lumo-styles/mixins/menu-overlay.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ const menuOverlayExt = css`
4848
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
4949
@media (max-width: 450px), (max-height: 450px) {
5050
:host {
51-
top: 0 !important;
52-
right: 0 !important;
53-
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
54-
left: 0 !important;
51+
inset: 0 0 var(--vaadin-overlay-viewport-bottom, 0) 0 !important;
5552
align-items: stretch !important;
5653
justify-content: flex-end !important;
5754
}

packages/vaadin-lumo-styles/mixins/overlay.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ issueWarning('Lumo .js mixins are deprecated and will be removed in V26');
1010

1111
const overlay = css`
1212
:host {
13-
top: var(--lumo-space-m);
14-
right: var(--lumo-space-m);
15-
bottom: var(--lumo-space-m);
16-
left: var(--lumo-space-m);
13+
inset: var(--vaadin-overlay-viewport-inset, var(--lumo-space-m));
1714
/* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
1815
/* stylelint-disable-next-line */
1916
outline: 0px solid transparent;

packages/vaadin-lumo-styles/mixins/required-field.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ const requiredField = css`
1616
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
1717
transition: color 0.2s;
1818
line-height: 1;
19-
padding-inline-start: calc(var(--lumo-border-radius-m) / 4);
20-
padding-inline-end: 1em;
19+
padding-inline: calc(var(--lumo-border-radius-m) / 4) 1em;
2120
padding-bottom: 0.5em;
2221
/* As a workaround for diacritics being cut off, add a top padding and a
2322
negative margin to compensate */

0 commit comments

Comments
 (0)