1
1
# postcss-rgb-mapping
2
2
3
3
> Remaps rgb(a) values to an ` rgb ` postfixed variable. If an opacity is found, creates a separate ` opacity ` postfixed variable.
4
+ > Also remaps values that reference a transparent token (for example, ` transparent-black-300 ` ) to ` rgb ` and ` opacity ` postfixed variables.
4
5
5
6
## Installation
6
7
@@ -17,6 +18,15 @@ This plugin turns this:
17
18
.spectrum--lightest {
18
19
--spectrum-seafoam-100 : rgba (206 , 247 , 243 );
19
20
--spectrum-seafoam-200 : rgba (170 , 241 , 234 , 0.5 );
21
+ --spectrum-transparent-white-100-rgb : 100 , 100 , 100 ;
22
+ --spectrum-transparent-white-100-opacity : 0.5 ;
23
+ --spectrum-transparent-white-100 : rgba (
24
+ var (--spectrum-transparent-white-100-rgb ),
25
+ var (--spectrum-transparent-white-100-opacity )
26
+ );
27
+ --disabled-static-white-background-color : var (
28
+ --spectrum-transparent-white-100
29
+ );
20
30
}
21
31
```
22
32
@@ -32,5 +42,21 @@ Into this:
32
42
var (--spectrum-seafoam-200-rgb ),
33
43
var (--spectrum-seafoam-200-opacity )
34
44
);
45
+ --spectrum-transparent-white-100-rgb : 100 , 100 , 100 ;
46
+ --spectrum-transparent-white-100-opacity : 0.5 ;
47
+ --spectrum-transparent-white-100 : rgba (
48
+ var (--spectrum-transparent-white-100-rgb ),
49
+ var (--spectrum-transparent-white-100-opacity )
50
+ );
51
+ --disabled-static-white-background-color-rgb : var (
52
+ --spectrum-transparent-white-100-rgb
53
+ );
54
+ --disabled-static-white-background-color-opacity : var (
55
+ --spectrum-transparent-white-100-opacity
56
+ );
57
+ --disabled-static-white-background-color : rgba (
58
+ var (--disabled-static-white-background-color-rgb ),
59
+ var (--disabled-static-white-background-color-opacity )
60
+ );
35
61
}
36
62
```
0 commit comments