Compare commits

...

4 Commits

Author SHA1 Message Date
Bernardo Cardoso
36dfc50fa3 Merge branch 'next' into ionic-colors-support 2024-05-28 15:58:21 +01:00
Bernardo Cardoso
1ded2c5191 update iopnic clear button snapshots 2024-05-28 09:28:55 +01:00
Bernardo Cardoso
c8679f8b1b now color utilities affect variables 2024-05-28 07:21:55 +01:00
Bernardo Cardoso
6f089c0536 improve cretaeColorClasses function 2024-05-28 07:20:44 +01:00
15 changed files with 519 additions and 514 deletions

View File

@@ -122,8 +122,8 @@ function generateTypographyUtilityClass(prop, dictionary) {
// Generates a color based css utility-class from a color Design Token structure
function generateColorUtilityClasses(prop, className) {
return `.${variablesPrefix}-${className} {\n color: $ionic-${prop.name};\n}
.${variablesPrefix}-background-${className} {\n background-color: $ionic-${prop.name};\n}`;
return `.${variablesPrefix}-${className} {\n --color: $ionic-${prop.name};\n}
.${variablesPrefix}-background-${className} {\n --background: $ionic-${prop.name};\n}`;
}
// Generates a font based css utility-class from a font Design Token structure

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 132 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

File diff suppressed because it is too large Load Diff

View File

@@ -6,15 +6,20 @@ export const hostContext = (selector: string, el: HTMLElement): boolean => {
};
/**
* Create the mode and color classes for the component based on the classes passed in
* Create the mode and color classes for the component based on the classes passed in and the theme being used
*/
export const createColorClasses = (color: Color | undefined | null, cssClassMap: CssClassMap): CssClassMap => {
return typeof color === 'string' && color.length > 0
? {
'ion-color': true,
[`ion-color-${color}`]: true,
...cssClassMap,
}
? cssClassMap.ionic === true
? {
[`ionic-background-color-${color}`]: true,
...cssClassMap,
}
: {
'ion-color': true,
[`ion-color-${color}`]: true,
...cssClassMap,
}
: cssClassMap;
};