Skip to content

Commit 92e7a04

Browse files
authored
refactor: split :where() and :is() for better performance (#10312)
1 parent acf4f65 commit 92e7a04

File tree

111 files changed

+256
-126
lines changed

Some content is hidden

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

111 files changed

+256
-126
lines changed

packages/aura/aura.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
@import './src/components/tabs.css';
3535
@import './src/components/upload.css';
3636

37-
:where(:root, :host) {
37+
:where(:root),
38+
:where(:host) {
3839
cursor: default;
3940
/* TODO: slightly smaller chevron than the one in base styles - consider if we should do this in base styles */
4041
--_vaadin-icon-chevron-down: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>');

packages/aura/src/color-scheme.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
:where(:root, :host) {
1+
:where(:root),
2+
:where(:host) {
23
--aura-color-scheme: light;
34
--aura-content-color-scheme: var(--aura-color-scheme);
45
--aura-notification-color-scheme: var(--aura-color-scheme);

packages/aura/src/color.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
:where(:root, :host) {
1+
:where(:root),
2+
:where(:host) {
23
--aura-contrast: 1;
34

45
--aura-accent-light: hsl(220, 80%, 47%);
@@ -80,7 +81,8 @@
8081
background-attachment: fixed;
8182
}
8283

83-
:where(:root, :host),
84+
:where(:root),
85+
:where(:host),
8486
vaadin-button,
8587
vaadin-context-menu-item,
8688
vaadin-crud-edit,
@@ -115,7 +117,8 @@ vaadin-tab {
115117
}
116118

117119
@supports (color: hsl(0 0 0)) {
118-
:where(:root, :host) {
120+
:where(:root),
121+
:where(:host) {
119122
--_safari-17-deg: 1;
120123
}
121124
}

packages/aura/src/components/app-layout.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
:where(:root, :host) {
1+
:where(:root),
2+
:where(:host) {
23
--aura-app-layout-inset: 1.5vmin;
34
--aura-app-layout-radius: var(--vaadin-radius-l);
45
--_aura-mdl-border: 1px;

packages/aura/src/components/avatar.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
:where(:root, :host) {
1+
:where(:root),
2+
:where(:host) {
23
--vaadin-avatar-border-color: var(--vaadin-border-color-secondary);
34
--vaadin-avatar-background: var(--vaadin-background-container);
45
--vaadin-avatar-font-weight: var(--aura-font-weight-medium);

packages/aura/src/components/button.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
:where(:root, :host) {
1+
:where(:root),
2+
:where(:host) {
23
--vaadin-button-shadow: 0 1px 4px -1px hsla(0, 0%, 0%, 0.07);
34
}
45

packages/aura/src/components/card.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
:where(:root, :host) {
1+
:where(:root),
2+
:where(:host) {
23
--vaadin-card-title-font-weight: var(--aura-font-weight-medium);
34
--vaadin-card-padding: var(--vaadin-padding-l);
45
--vaadin-card-gap: var(--vaadin-gap-m) var(--vaadin-gap-l);

packages/aura/src/components/checkbox-radio.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
:where(:root, :host) {
1+
:where(:root),
2+
:where(:host) {
23
--vaadin-radio-button-dot-size: 6px;
34
--vaadin-checkbox-size: round(1lh - 2px, 2px);
45
--vaadin-radio-button-size: round(1lh - 2px, 2px);

packages/aura/src/components/crud.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
:where(:root, :host) {
1+
:where(:root),
2+
:where(:host) {
23
--vaadin-crud-background: var(--aura-surface) padding-box;
34
}
45

packages/aura/src/components/dashboard.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
:where(:root, :host) {
1+
:where(:root),
2+
:where(:host) {
23
--vaadin-dashboard-widget-title-font-weight: var(--aura-font-weight-medium);
34
--vaadin-dashboard-widget-header-padding: var(--vaadin-padding-s) var(--vaadin-padding-m);
45
--vaadin-dashboard-header-gap: var(--vaadin-gap-xs);

0 commit comments

Comments
 (0)