File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
packages/component-base/src/styles Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 66import { css } from 'lit' ;
77import { addGlobalThemeStyles } from '@vaadin/vaadin-themable-mixin/register-styles.js' ;
88
9+ // NOTE: Base color CSS custom properties are explicitly registered as `<color>`
10+ // here to avoid performance issues in Aura. Aura overrides these properties with
11+ // values that use complex, nested relative color functions, and without explicit
12+ // typing, Chrome 142 was found to render components that use them roughly 40% slower.
13+ [
14+ '--vaadin-text-color' ,
15+ '--vaadin-text-color-disabled' ,
16+ '--vaadin-text-color-secondary' ,
17+ '--vaadin-border-color' ,
18+ '--vaadin-border-color-secondary' ,
19+ '--vaadin-background-color' ,
20+ ] . forEach ( ( propertyName ) => {
21+ CSS . registerProperty ( {
22+ name : propertyName ,
23+ syntax : '<color>' ,
24+ inherits : true ,
25+ // Use this initial value so the color stays visible when the property
26+ // is set to an invalid value to make debugging a bit easier.
27+ initialValue : 'light-dark(black, white)' ,
28+ } ) ;
29+ } ) ;
30+
931addGlobalThemeStyles (
1032 'vaadin-base' ,
1133 css `
You can’t perform that action at this time.
0 commit comments