Skip to content

Commit 37eab97

Browse files
authored
refactor: rename component-specific text-related custom properties (#10307)
1 parent 397e219 commit 37eab97

File tree

22 files changed

+68
-68
lines changed

22 files changed

+68
-68
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:where(:root),
22
:where(:host) {
3-
--vaadin-radio-button-dot-size: 6px;
3+
--vaadin-radio-button-marker-size: 6px;
44
--vaadin-checkbox-size: round(1lh - 2px, 2px);
55
--vaadin-radio-button-size: round(1lh - 2px, 2px);
66
}
@@ -32,13 +32,13 @@ vaadin-radio-button:not([checked])::part(radio) {
3232

3333
vaadin-checkbox:is([checked], [indeterminate]):not([readonly], [disabled])::part(checkbox) {
3434
--vaadin-checkbox-background: var(--aura-accent-color);
35-
--vaadin-checkbox-color: var(--aura-accent-contrast);
35+
--vaadin-checkbox-marker-color: var(--aura-accent-contrast);
3636
--vaadin-checkbox-border-color: var(--vaadin-border-color-secondary);
3737
}
3838

3939
vaadin-radio-button[checked]:not([readonly], [disabled])::part(radio) {
4040
--vaadin-radio-button-background: var(--aura-accent-color);
41-
--vaadin-radio-button-color: var(--aura-accent-contrast);
41+
--vaadin-radio-button-marker-color: var(--aura-accent-contrast);
4242
--vaadin-radio-button-border-color: var(--vaadin-border-color-secondary);
4343
}
4444

packages/aura/src/components/side-nav.css

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ vaadin-side-nav-item::part(content) {
2020
}
2121

2222
vaadin-side-nav-item:not([disabled])::part(content):hover {
23-
--vaadin-side-nav-item-color: var(--vaadin-text-color);
23+
--vaadin-side-nav-item-text-color: var(--vaadin-text-color);
2424
}
2525

2626
vaadin-side-nav-item[current]::part(content) {
@@ -33,34 +33,34 @@ vaadin-side-nav-item[current]::part(content) {
3333
oklch(from var(--aura-accent-dark) l calc(c / 2) h / calc(min(0.15, 0.05 + c / 2) + 0.1 * var(--aura-contrast)))
3434
);
3535
--vaadin-side-nav-item-background: linear-gradient(var(--_accent), var(--_accent)) var(--aura-surface) padding-box;
36-
--vaadin-side-nav-item-color: var(--aura-accent-text);
36+
--vaadin-side-nav-item-text-color: var(--aura-accent-text);
3737
--vaadin-side-nav-item-border-color: var(--_accent-border);
3838
}
3939

4040
/* Filled variant */
4141

4242
vaadin-side-nav[theme~='filled'] vaadin-side-nav-item[current]::part(content) {
4343
--vaadin-side-nav-item-background: var(--aura-accent-color) border-box;
44-
--vaadin-side-nav-item-color: var(--aura-accent-contrast);
44+
--vaadin-side-nav-item-text-color: var(--aura-accent-contrast);
4545
outline-offset: 2px;
4646
}
4747

4848
/* Badges and other content that uses the palette inside a filled nav item */
4949
vaadin-side-nav[theme~='filled'] vaadin-side-nav-item[current] > :not([slot='children']):not([slot='tooltip']) {
50-
--vaadin-text-color: var(--vaadin-side-nav-item-color);
51-
--vaadin-text-color-secondary: var(--vaadin-side-nav-item-color);
52-
--aura-accent-color: var(--vaadin-side-nav-item-color);
53-
--aura-accent-text: var(--vaadin-side-nav-item-color);
54-
--aura-red: var(--vaadin-side-nav-item-color);
55-
--aura-red-text: var(--vaadin-side-nav-item-color);
56-
--aura-orange: var(--vaadin-side-nav-item-color);
57-
--aura-orange-text: var(--vaadin-side-nav-item-color);
58-
--aura-yellow: var(--vaadin-side-nav-item-color);
59-
--aura-yellow-text: var(--vaadin-side-nav-item-color);
60-
--aura-green: var(--vaadin-side-nav-item-color);
61-
--aura-green-text: var(--vaadin-side-nav-item-color);
62-
--aura-blue: var(--vaadin-side-nav-item-color);
63-
--aura-blue-text: var(--vaadin-side-nav-item-color);
64-
--aura-purple: var(--vaadin-side-nav-item-color);
65-
--aura-purple-text: var(--vaadin-side-nav-item-color);
50+
--vaadin-text-color: var(--vaadin-side-nav-item-text-color);
51+
--vaadin-text-color-secondary: var(--vaadin-side-nav-item-text-color);
52+
--aura-accent-color: var(--vaadin-side-nav-item-text-color);
53+
--aura-accent-text: var(--vaadin-side-nav-item-text-color);
54+
--aura-red: var(--vaadin-side-nav-item-text-color);
55+
--aura-red-text: var(--vaadin-side-nav-item-text-color);
56+
--aura-orange: var(--vaadin-side-nav-item-text-color);
57+
--aura-orange-text: var(--vaadin-side-nav-item-text-color);
58+
--aura-yellow: var(--vaadin-side-nav-item-text-color);
59+
--aura-yellow-text: var(--vaadin-side-nav-item-text-color);
60+
--aura-green: var(--vaadin-side-nav-item-text-color);
61+
--aura-green-text: var(--vaadin-side-nav-item-text-color);
62+
--aura-blue: var(--vaadin-side-nav-item-text-color);
63+
--aura-blue-text: var(--vaadin-side-nav-item-text-color);
64+
--aura-purple: var(--vaadin-side-nav-item-text-color);
65+
--aura-purple-text: var(--vaadin-side-nav-item-text-color);
6666
}

packages/aura/src/components/tabs.css

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ vaadin-tab {
7979
}
8080

8181
vaadin-tab:not([disabled], [selected]):hover {
82-
--vaadin-tab-color: var(--vaadin-text-color);
82+
--vaadin-tab-text-color: var(--vaadin-text-color);
8383
}
8484

8585
vaadin-tab[selected] {
@@ -92,7 +92,7 @@ vaadin-tab[selected] {
9292
oklch(from var(--aura-accent-dark) l calc(c / 2) h / calc(min(0.15, 0.05 + c / 2) + 0.1 * var(--aura-contrast)))
9393
);
9494
--vaadin-tab-background: linear-gradient(var(--_accent), var(--_accent)) var(--aura-surface) padding-box;
95-
--vaadin-tab-color: var(--aura-accent-text);
95+
--vaadin-tab-text-color: var(--aura-accent-text);
9696
border-color: var(--_accent-border);
9797
box-shadow: 0 1px 4px -1px var(--aura-shadow-color);
9898
}
@@ -101,26 +101,26 @@ vaadin-tab[selected] {
101101

102102
vaadin-tabs[theme~='filled'] vaadin-tab[selected] {
103103
--vaadin-tab-background: var(--aura-accent-color) border-box;
104-
--vaadin-tab-color: var(--aura-accent-contrast);
104+
--vaadin-tab-text-color: var(--aura-accent-contrast);
105105
outline-offset: 1px;
106106
}
107107

108108
/* Badges and other content that uses the palette inside a filled nav item */
109109
vaadin-tabs[theme~='filled'] vaadin-tab[selected] > :not([slot='tooltip']) {
110-
--vaadin-text-color: var(--vaadin-tab-color);
111-
--vaadin-text-color-secondary: var(--vaadin-tab-color);
112-
--aura-accent-color: var(--vaadin-tab-color);
113-
--aura-accent-text: var(--vaadin-tab-color);
114-
--aura-red: var(--vaadin-tab-color);
115-
--aura-red-text: var(--vaadin-tab-color);
116-
--aura-orange: var(--vaadin-tab-color);
117-
--aura-orange-text: var(--vaadin-tab-color);
118-
--aura-yellow: var(--vaadin-tab-color);
119-
--aura-yellow-text: var(--vaadin-tab-color);
120-
--aura-green: var(--vaadin-tab-color);
121-
--aura-green-text: var(--vaadin-tab-color);
122-
--aura-blue: var(--vaadin-tab-color);
123-
--aura-blue-text: var(--vaadin-tab-color);
124-
--aura-purple: var(--vaadin-tab-color);
125-
--aura-purple-text: var(--vaadin-tab-color);
110+
--vaadin-text-color: var(--vaadin-tab-text-color);
111+
--vaadin-text-color-secondary: var(--vaadin-tab-text-color);
112+
--aura-accent-color: var(--vaadin-tab-text-color);
113+
--aura-accent-text: var(--vaadin-tab-text-color);
114+
--aura-red: var(--vaadin-tab-text-color);
115+
--aura-red-text: var(--vaadin-tab-text-color);
116+
--aura-orange: var(--vaadin-tab-text-color);
117+
--aura-orange-text: var(--vaadin-tab-text-color);
118+
--aura-yellow: var(--vaadin-tab-text-color);
119+
--aura-yellow-text: var(--vaadin-tab-text-color);
120+
--aura-green: var(--vaadin-tab-text-color);
121+
--aura-green-text: var(--vaadin-tab-text-color);
122+
--aura-blue: var(--vaadin-tab-text-color);
123+
--aura-blue-text: var(--vaadin-tab-text-color);
124+
--aura-purple: var(--vaadin-tab-text-color);
125+
--aura-purple-text: var(--vaadin-tab-text-color);
126126
}

packages/avatar/src/styles/vaadin-avatar-base-styles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const avatarStyles = css`
1313
flex: none;
1414
border-radius: 50%;
1515
cursor: default;
16-
color: var(--vaadin-avatar-color, var(--vaadin-text-color-secondary));
16+
color: var(--vaadin-avatar-text-color, var(--vaadin-text-color-secondary));
1717
overflow: hidden;
1818
--_size: var(--vaadin-avatar-size, calc(1lh + var(--vaadin-padding-xs) * 2));
1919
height: var(--_size);

packages/checkbox/src/styles/vaadin-checkbox-base-styles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const checkbox = css`
1717
:host([readonly]) {
1818
--vaadin-checkbox-background: transparent;
1919
--vaadin-checkbox-border-color: var(--vaadin-border-color);
20-
--vaadin-checkbox-color: var(--vaadin-text-color);
20+
--vaadin-checkbox-marker-color: var(--vaadin-text-color);
2121
--_border-style: dashed;
2222
}
2323

packages/field-base/src/input-control-mixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const InputControlMixin = (superclass) =>
122122
${tag}:has(> input[slot='input']:autofill)::part(input-field) {
123123
--vaadin-input-field-background: var(--vaadin-input-field-autofill-background, lightyellow) !important;
124124
--vaadin-input-field-value-color: var(--vaadin-input-field-autofill-color, black) !important;
125-
--vaadin-input-field-button-color: var(--vaadin-input-field-autofill-color, black) !important;
125+
--vaadin-input-field-button-text-color: var(--vaadin-input-field-autofill-color, black) !important;
126126
}
127127
`,
128128
];

packages/field-base/src/styles/button-base-styles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { css } from 'lit';
88

99
export const button = css`
1010
[part$='button'] {
11-
color: var(--vaadin-input-field-button-color, var(--vaadin-text-color-secondary));
11+
color: var(--vaadin-input-field-button-text-color, var(--vaadin-text-color-secondary));
1212
cursor: var(--vaadin-clickable-cursor);
1313
touch-action: manipulation;
1414
-webkit-tap-highlight-color: transparent;

packages/field-base/src/styles/checkable-base-styles.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const checkable = (part, propName = part) => css`
8787
--_border-width: var(--vaadin-${unsafeCSS(propName)}-border-width, var(--vaadin-input-field-border-width, 1px));
8888
border-width: var(--_border-width);
8989
box-sizing: border-box;
90-
color: var(--vaadin-${unsafeCSS(propName)}-color, var(--vaadin-input-field-text-color, var(--vaadin-text-color)));
90+
color: var(--vaadin-${unsafeCSS(propName)}-marker-color, var(--vaadin-input-field-text-color, var(--vaadin-text-color)));
9191
height: var(--vaadin-${unsafeCSS(propName)}-size, 1lh);
9292
width: var(--vaadin-${unsafeCSS(propName)}-size, 1lh);
9393
position: relative;
@@ -96,13 +96,13 @@ export const checkable = (part, propName = part) => css`
9696
:host(:is([checked], [indeterminate])) {
9797
--vaadin-${unsafeCSS(propName)}-background: var(--vaadin-text-color);
9898
--vaadin-${unsafeCSS(propName)}-border-color: transparent;
99-
--vaadin-${unsafeCSS(propName)}-color: oklch(from var(--vaadin-${unsafeCSS(propName)}-background) clamp(0, (0.62 - l) * 1000, 1) 0 0);
99+
--vaadin-${unsafeCSS(propName)}-marker-color: oklch(from var(--vaadin-${unsafeCSS(propName)}-background) clamp(0, (0.62 - l) * 1000, 1) 0 0);
100100
}
101101
102102
:host([disabled]) {
103103
--vaadin-${unsafeCSS(propName)}-background: var(--vaadin-input-field-disabled-background, var(--vaadin-background-container-strong));
104104
--vaadin-${unsafeCSS(propName)}-border-color: transparent;
105-
--vaadin-${unsafeCSS(propName)}-color: var(--vaadin-text-color-disabled);
105+
--vaadin-${unsafeCSS(propName)}-marker-color: var(--vaadin-text-color-disabled);
106106
}
107107
108108
/* Focus ring */

packages/grid/src/styles/vaadin-grid-base-styles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export const gridStyles = css`
127127
[part~='reorder-ghost'] {
128128
font-size: var(--vaadin-grid-header-font-size, 1em);
129129
font-weight: var(--vaadin-grid-header-font-weight, 500);
130-
color: var(--vaadin-grid-header-color, var(--vaadin-text-color));
130+
color: var(--vaadin-grid-header-text-color, var(--vaadin-text-color));
131131
}
132132
133133
[part~='row'] {

packages/map/src/styles/vaadin-map-base-styles.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export const mapStyles = css`
247247
gap: 1em;
248248
list-style: none;
249249
margin: 0;
250-
color: var(--vaadin-map-attribution-color, var(--vaadin-text-color-secondary));
250+
color: var(--vaadin-map-attribution-text-color, var(--vaadin-text-color-secondary));
251251
padding: var(--vaadin-padding-container);
252252
font-size: 0.8em;
253253
}
@@ -378,7 +378,7 @@ export const mapStyles = css`
378378
.ol-attribution:not(.ol-uncollapsible) ul {
379379
transition: 0.15s opacity;
380380
background: var(--vaadin-map-control-background, var(--vaadin-background-color));
381-
color: var(--vaadin-map-control-color, var(--vaadin-subtle));
381+
color: var(--vaadin-map-control-text-color, var(--vaadin-text-color-secondary));
382382
opacity: 0.65;
383383
display: flex;
384384
align-items: center;
@@ -401,7 +401,7 @@ export const mapStyles = css`
401401
}
402402
403403
.ol-control button:hover {
404-
color: var(--vaadin-map-control-color-hover, var(--vaadin-text-color));
404+
color: var(--vaadin-map-control-text-color-hover, var(--vaadin-text-color));
405405
}
406406
407407
.ol-control button:focus-visible {

0 commit comments

Comments
 (0)