Skip to content

Commit 5c902be

Browse files
committed
chore: change rgb declaration * 2
1 parent 24add99 commit 5c902be

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

src/tasty/styles/createStyle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function createStyle(
4848
[finalCssStyle]: `var(--${name}-color, ${rgba})`,
4949
[`${finalCssStyle}-rgb`]: `var(--${name}-color-rgb, ${getRgbValuesFromRgbaString(
5050
rgba,
51-
).join(', ')})`,
51+
).join(' ')})`,
5252
};
5353
} else if (name) {
5454
if (color) {
@@ -66,7 +66,7 @@ export function createStyle(
6666
return {
6767
[finalCssStyle]: rgba,
6868
[`${finalCssStyle}-rgb`]:
69-
getRgbValuesFromRgbaString(rgba).join(', '),
69+
getRgbValuesFromRgbaString(rgba).join(' '),
7070
};
7171
}
7272

src/tasty/utils/styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ export function hexToRgb(hex) {
589589
}
590590

591591
if (rgba.length >= 3) {
592-
return `rgb(${rgba.slice(0, 3).join(', ')}${rgba.length > 3 ? ` / ${rgba[3]}` : ''})`;
592+
return `rgb(${rgba.slice(0, 3).join(' ')}${rgba.length > 3 ? ` / ${rgba[3]}` : ''})`;
593593
}
594594

595595
return null;

src/tokens.ts

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
const colors = {
2-
pink: '255, 100, 146',
3-
'pink-02': '255, 131, 168',
4-
purple: '122, 119, 255',
5-
'purple-text': '102, 93, 232',
6-
'purple-01': '122, 119, 255',
7-
'purple-02': '149, 146, 255',
8-
'purple-03': '175, 173, 255',
9-
'purple-04': '202, 201, 255',
10-
text: '91, 92, 125',
11-
dark: '20, 20, 70',
12-
'dark-01': '20, 20, 70',
13-
'dark-02': '67, 67, 107',
14-
'dark-03': '114, 114, 144',
15-
'dark-04': '161, 161, 181',
16-
'dark-05': '213, 213, 226',
17-
'grey-light': '248, 248, 249',
18-
light: '246, 246, 248',
19-
white: '255, 255, 255',
20-
black: '0, 0, 0',
21-
'danger-text': '227, 0, 42',
22-
danger: '255, 55, 73',
23-
'light-grey': '248, 248, 249',
24-
success: '49, 195, 124',
25-
'success-text': '48, 166, 102',
26-
note: '251, 188, 5',
27-
warning: '224, 86, 43',
2+
pink: '255 100 146',
3+
'pink-02': '255 131 168',
4+
purple: '122 119 255',
5+
'purple-text': '102 93 232',
6+
'purple-01': '122 119 255',
7+
'purple-02': '149 146 255',
8+
'purple-03': '175 173 255',
9+
'purple-04': '202 201 255',
10+
text: '91 92 125',
11+
dark: '20 20 70',
12+
'dark-01': '20 20 70',
13+
'dark-02': '67 67 107',
14+
'dark-03': '114 114 144',
15+
'dark-04': '161 161 181',
16+
'dark-05': '213 213 226',
17+
'grey-light': '248 248 249',
18+
light: '246 246 248',
19+
white: '255 255 255',
20+
black: '0 0 0',
21+
'danger-text': '227 0 42',
22+
danger: '255 55 73',
23+
'light-grey': '248 248 249',
24+
success: '49 195 124',
25+
'success-text': '48 166 102',
26+
note: '251 188 5',
27+
warning: '224 86 43',
2828
};
2929

3030
function color(name, opacity = 1) {
31-
return `rgba(${colors[name]}, ${opacity})`;
31+
return `rgb(${colors[name]} / ${opacity})`;
3232
}
3333

3434
const TOKENS = {
@@ -49,11 +49,11 @@ const TOKENS = {
4949
transition: '80ms',
5050
'clear-color': 'transparent',
5151
'border-color': color('dark', 0.1),
52-
'border-opaque-color': 'rgb(227, 227, 233)',
52+
'border-opaque-color': 'rgb(227 227 233)',
5353
'shadow-color': color('dark-03', 0.1),
5454
'draft-color': color('dark', 0.2),
5555
'minor-color': color('dark', 0.65),
56-
'success-bg-color': 'rgba(41, 190, 110, .1)',
56+
'success-bg-color': 'rgb(41 190 110 / .1)',
5757
'note-bg-color': color('note', 0.1),
5858
'note-text-color': color('note', 1),
5959
'danger-bg-color': color('danger', 0.05),

0 commit comments

Comments
 (0)