Skip to content

Commit e15a3f6

Browse files
chore: update styling [SMT-125] (#3070)
1 parent 39477e0 commit e15a3f6

File tree

20 files changed

+267
-159
lines changed

20 files changed

+267
-159
lines changed

.changeset/healthy-lies-wink.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@storefront-ui/tailwind-config": minor
3+
"@storefront-ui/typography": minor
4+
---
5+
6+
Change general rules for styling

.changeset/slimy-rice-breathe.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@storefront-ui/react": patch
3+
"@storefront-ui/vue": patch
4+
---
5+
6+
Add new alokai icon

apps/docs/components/components/iconbase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ List of all icons shipped with Storefront UI below. Click on any of the icons to
2828

2929
### Sizes
3030

31-
All Icon components supports various sizes that can be set with the `size` prop: `'xs'`, `'sm'`, `'base'`, `'lg'`, `'xl'`, `'2xl'`, `'3xl'`, `'4xl'`.
31+
All Icon components supports various sizes that can be set with the `size` prop: `'xs'`, `'sm'`, `'base'`, `'lg'`, `'xl'`, `'2xl'`, `'3xl'`, `'4xl'` . Size can be overwritten by applying new styling on icon.
3232

3333
<Showcase showcase-name="IconBase/IconBaseSizes" style="min-height:300px">
3434

apps/docs/components/customization/theming.md

Lines changed: 74 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ hideBreadcrumbs: true
55

66
# Theming
77

8-
To help you build your storefront, Storefront UI adds additional colors following Tailwind's shading conventions. These can be customized customized with CSS variables or Tailwind configuration to match your design system.
8+
UI colors are based on 10-tone Tailwind default color palette, normalized so that each color at the same brightness level meets identical minimum accessibility requirements.
9+
10+
To help you build your storefront, Storefront UI adds additional colors following Tailwind's shading conventions. These can be customized customized with CSS variables or Tailwind configuration to match your design system.
911

1012
## Default Values
1113

@@ -17,7 +19,6 @@ In addition to [Tailwind's default colors](https://tailwindcss.com/docs/customiz
1719
You can see all of the default colors, classes, variants, and more in our [Tailwind preset](https://github.com/vuestorefront/storefront-ui/blob/v2/packages/config/tailwind/index.ts)
1820
:::
1921

20-
2122
## Customizing colors
2223

2324
### CSS Variables
@@ -67,88 +68,88 @@ The CSS classes for Storefront UI colors follow the pattern of `--colors-{color}
6768
```css
6869
:root {
6970
/* Primary */
70-
--colors-primary-50: 240 253 244;
71-
--colors-primary-100: 220 252 231;
72-
--colors-primary-200: 187 247 208;
73-
--colors-primary-300: 134 239 172;
74-
--colors-primary-400: 74 222 128;
75-
--colors-primary-500: 2 198 82;
76-
--colors-primary-600: 10 171 69;
77-
--colors-primary-700: 1 137 55;
78-
--colors-primary-800: 22 101 52;
79-
--colors-primary-900: 20 83 45;
71+
--colors-primary-50: 235 255 242;
72+
--colors-primary-100: 217 253 228;
73+
--colors-primary-200: 171 241 192;
74+
--colors-primary-300: 130 234 158;
75+
--colors-primary-400: 60 224 120;
76+
--colors-primary-500: 19 195 96;
77+
--colors-primary-600: 7 161 79;
78+
--colors-primary-700: 13 127 63;
79+
--colors-primary-800: 16 86 46;
80+
--colors-primary-900: 15 50 30;
8081

8182
/* Secondary */
82-
--colors-secondary-50: 245 243 255;
83-
--colors-secondary-100: 237 233 254;
84-
--colors-secondary-200: 221 214 254;
85-
--colors-secondary-300: 196 181 253;
86-
--colors-secondary-400: 167 139 250;
87-
--colors-secondary-500: 135 92 246;
88-
--colors-secondary-600: 111 64 236;
89-
--colors-secondary-700: 97 49 221;
90-
--colors-secondary-800: 83 30 211;
91-
--colors-secondary-900: 68 21 178;
83+
--colors-secondary-50: 247 245 253;
84+
--colors-secondary-100: 239 236 251;
85+
--colors-secondary-200: 225 218 246;
86+
--colors-secondary-300: 216 203 245;
87+
--colors-secondary-400: 198 177 246;
88+
--colors-secondary-500: 180 151 249;
89+
--colors-secondary-600: 151 111 238;
90+
--colors-secondary-700: 119 79 209;
91+
--colors-secondary-800: 82 52 153;
92+
--colors-secondary-900: 48 32 86;
9293

9394
/* Positive */
94-
--colors-positive-50: 240 253 244;
95-
--colors-positive-100: 220 252 231;
96-
--colors-positive-200: 187 247 208;
97-
--colors-positive-300: 134 239 172;
98-
--colors-positive-400: 74 222 128;
99-
--colors-positive-500: 2 198 82;
100-
--colors-positive-600: 10 171 69;
101-
--colors-positive-700: 1 137 55;
102-
--colors-positive-800: 22 101 52;
103-
--colors-positive-900: 20 83 45;
95+
--colors-positive-50: 235 255 242;
96+
--colors-positive-100: 217 253 228;
97+
--colors-positive-200: 171 241 192;
98+
--colors-positive-300: 130 234 158;
99+
--colors-positive-400: 60 224 120;
100+
--colors-positive-500: 19 195 96;
101+
--colors-positive-600: 7 161 79;
102+
--colors-positive-700: 13 127 63;
103+
--colors-positive-800: 16 86 46;
104+
--colors-positive-900: 15 50 30;
104105

105106
/* Negative */
106-
--colors-negative-50: 255 241 242;
107-
--colors-negative-100: 255 228 230;
108-
--colors-negative-200: 254 205 211;
109-
--colors-negative-300: 253 164 175;
110-
--colors-negative-400: 251 113 133;
111-
--colors-negative-500: 244 63 94;
112-
--colors-negative-600: 225 29 72;
113-
--colors-negative-700: 190 18 60;
114-
--colors-negative-800: 159 18 57;
115-
--colors-negative-900: 136 19 55 1;
107+
--colors-negative-50: 255 245 247;
108+
--colors-negative-100: 255 232 237;
109+
--colors-negative-200: 254 211 219;
110+
--colors-negative-300: 253 193 202;
111+
--colors-negative-400: 255 163 175;
112+
--colors-negative-500: 255 127 143;
113+
--colors-negative-600: 240 59 91;
114+
--colors-negative-700: 208 13 48;
115+
--colors-negative-800: 141 8 33;
116+
--colors-negative-900: 76 15 23;
116117

117118
/* Warning */
118-
--colors-warning-50: 254 252 232;
119-
--colors-warning-100: 254 249 195;
120-
--colors-warning-200: 254 240 138;
121-
--colors-warning-300: 253 224 71;
122-
--colors-warning-400: 250 204 21;
123-
--colors-warning-500: 234 179 8;
124-
--colors-warning-600: 202 138 4;
125-
--colors-warning-700: 161 98 7;
126-
--colors-warning-800: 133 77 14;
127-
--colors-warning-900: 113 63 18;
119+
--colors-warning-50: 254 247 236;
120+
--colors-warning-100: 255 238 211;
121+
--colors-warning-200: 254 220 165;
122+
--colors-warning-300: 254 202 132;
123+
--colors-warning-400: 255 181 77;
124+
--colors-warning-500: 237 153 14;
125+
--colors-warning-600: 191 121 17;
126+
--colors-warning-700: 157 93 3;
127+
--colors-warning-800: 109 63 9;
128+
--colors-warning-900: 62 35 10;
128129

129130
/* Neutral */
130-
--colors-neutral-50: 250 250 250;
131-
--colors-neutral-100: 244 244 245;
132-
--colors-neutral-200: 228 228 231;
133-
--colors-neutral-300: 212 212 216;
134-
--colors-neutral-400: 161 161 170;
135-
--colors-neutral-500: 113 113 122;
136-
--colors-neutral-600: 82 82 91;
137-
--colors-neutral-700: 63 63 70;
138-
--colors-neutral-800: 39 39 42;
139-
--colors-neutral-900: 24 24 27;
131+
--colors-neutral-50: 249 251 250;
132+
--colors-neutral-100: 239 244 241;
133+
--colors-neutral-200: 217 226 220;
134+
--colors-neutral-300: 187 198 190;
135+
--colors-neutral-400: 129 140 133;
136+
--colors-neutral-500: 100 111 104;
137+
--colors-neutral-600: 77 86 79;
138+
--colors-neutral-700: 56 65 59;
139+
--colors-neutral-800: 37 43 39;
140+
--colors-neutral-900: 21 26 22;
140141

141142
/* Disabled */
142-
--colors-disabled-50: 250 250 250;
143-
--colors-disabled-100: 244 244 245;
144-
--colors-disabled-200: 228 228 231;
145-
--colors-disabled-300: 212 212 216;
146-
--colors-disabled-400: 161 161 170;
147-
--colors-disabled-500: 113 113 122;
148-
--colors-disabled-600: 82 82 91;
149-
--colors-disabled-700: 63 63 70;
150-
--colors-disabled-800: 39 39 42;
151-
--colors-disabled-900: 24 24 27;
143+
--colors-disabled-50: 249 251 250;
144+
--colors-disabled-100: 239 244 241;
145+
--colors-disabled-200: 217 226 220;
146+
--colors-disabled-300: 187 198 190;
147+
--colors-disabled-400: 129 140 133;
148+
--colors-disabled-500: 100 111 104;
149+
--colors-disabled-600: 77 86 79;
150+
--colors-disabled-700: 56 65 59;
151+
--colors-disabled-800: 37 43 39;
152+
--colors-disabled-900: 21 26 22;
152153
}
153154
```
154155
</SourceCode>
@@ -189,4 +190,4 @@ export default {
189190

190191
:::read-more
191192
To learn more about the different ways to declare colors in Tailwind, check out the [Tailwind documentation](https://tailwindcss.com/docs/customizing-colors#using-custom-colors).
192-
:::
193+
:::

apps/preview/next/tailwind.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
theme: {
1010
extend: {
1111
fontFamily: {
12-
sans: 'Red Hat Text, sans-serif',
12+
sans: 'Inter, sans-serif',
1313
},
1414
},
1515
},

apps/preview/nuxt/tailwind.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default <Config>{
99
theme: {
1010
extend: {
1111
fontFamily: {
12-
sans: 'Red Hat Text, sans-serif',
12+
sans: 'Inter, sans-serif',
1313
},
1414
},
1515
},

apps/test/react/tailwind.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
theme: {
2828
extend: {
2929
fontFamily: {
30-
sans: 'Red Hat Text, sans-serif',
30+
sans: 'Inter, sans-serif',
3131
},
3232
},
3333
},

apps/test/vue/tailwind.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = {
2828
theme: {
2929
extend: {
3030
fontFamily: {
31-
sans: "Red Hat Text, sans-serif",
31+
sans: "Inter, sans-serif",
3232
},
3333
},
3434
},

createIcons.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,11 @@ const camelize = s => s.replace(/-./g, x => x[1].toUpperCase());
125125
const capitalize = s => s && s[0].toUpperCase() + s.slice(1);
126126
const getSvg = async (svgName, doOptimiziation) => {
127127
const svgPath = path.join(inputDirectoryPath, svgName);
128-
let fileContent = await fsPromise.readFile(svgPath, 'utf8').catch(() => ({}));
128+
const fileContent = await fsPromise.readFile(svgPath, 'utf8').catch(() => ({}));
129+
let optimizedFileContent = fileContent;
129130
if (doOptimiziation) {
130131
try {
131-
fileContent = optimize(fileContent, {
132+
optimizedFileContent = optimize(optimizedFileContent, {
132133
multipass: true,
133134
svg2js: {
134135
pretty: true
@@ -151,7 +152,7 @@ const getSvg = async (svgName, doOptimiziation) => {
151152
return {
152153
fileName: camelize(fileName),
153154
name: fileName,
154-
content: fileContent.substring(fileContent.indexOf('>') + 1, fileContent.lastIndexOf('<')).replace(/"/g, "'"),
155+
content: optimizedFileContent.substring(optimizedFileContent.indexOf('>') + 1, optimizedFileContent.lastIndexOf('<')).replace(/"/g, "'"),
155156
attrs: {
156157
viewBox: /viewBox="([^"]+)"/.exec(fileContent)?.[1]
157158
},

0 commit comments

Comments
 (0)