@vanilla-extract/vite-plugin 3.1.3 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -443,6 +443,15 @@ export const childClass = style({
|
|
|
443
443
|
>
|
|
444
444
|
> If you want to globally target child nodes within the current element (e.g. `'& a[href]'`), you should use [`globalStyle`](#globalstyle) instead.
|
|
445
445
|
|
|
446
|
+
For fallback styles you may simply pass an array of properties instead of a single prop.
|
|
447
|
+
|
|
448
|
+
```ts
|
|
449
|
+
export const exampleStyle = style({
|
|
450
|
+
// in Firefox and IE the "overflow: overlay" will be ignored and the "overflow: auto" will be applied
|
|
451
|
+
overflow: ['auto', 'overlay'],
|
|
452
|
+
});
|
|
453
|
+
```
|
|
454
|
+
|
|
446
455
|
Multiple styles can be composed into a single rule by providing an array of styles.
|
|
447
456
|
|
|
448
457
|
```ts
|
|
@@ -837,7 +846,7 @@ import { createVar, fallbackVar, style } from '@vanilla-extract/css';
|
|
|
837
846
|
export const colorVar = createVar();
|
|
838
847
|
|
|
839
848
|
export const exampleStyle = style({
|
|
840
|
-
color: fallbackVar(colorVar, 'blue')
|
|
849
|
+
color: fallbackVar(colorVar, 'blue'),
|
|
841
850
|
});
|
|
842
851
|
```
|
|
843
852
|
|
|
@@ -850,7 +859,7 @@ export const primaryColorVar = createVar();
|
|
|
850
859
|
export const secondaryColorVar = createVar();
|
|
851
860
|
|
|
852
861
|
export const exampleStyle = style({
|
|
853
|
-
color: fallbackVar(primaryColorVar, secondaryColorVar, 'blue')
|
|
862
|
+
color: fallbackVar(primaryColorVar, secondaryColorVar, 'blue'),
|
|
854
863
|
});
|
|
855
864
|
```
|
|
856
865
|
|
|
@@ -197,7 +197,8 @@ function vanillaExtractPlugin({
|
|
|
197
197
|
fileScope,
|
|
198
198
|
source
|
|
199
199
|
}) => {
|
|
200
|
-
|
|
200
|
+
// This file id is requested through a URL where ".." isn't valid.
|
|
201
|
+
const fileId = integration.stringifyFileScope(fileScope).replace(/\.\./g, '_dir_up_');
|
|
201
202
|
const id = `${virtualPrefix}${fileId}${virtualExt}`;
|
|
202
203
|
let cssSource = source;
|
|
203
204
|
|
|
@@ -197,7 +197,8 @@ function vanillaExtractPlugin({
|
|
|
197
197
|
fileScope,
|
|
198
198
|
source
|
|
199
199
|
}) => {
|
|
200
|
-
|
|
200
|
+
// This file id is requested through a URL where ".." isn't valid.
|
|
201
|
+
const fileId = integration.stringifyFileScope(fileScope).replace(/\.\./g, '_dir_up_');
|
|
201
202
|
const id = `${virtualPrefix}${fileId}${virtualExt}`;
|
|
202
203
|
let cssSource = source;
|
|
203
204
|
|
|
@@ -170,7 +170,8 @@ function vanillaExtractPlugin({
|
|
|
170
170
|
fileScope,
|
|
171
171
|
source
|
|
172
172
|
}) => {
|
|
173
|
-
|
|
173
|
+
// This file id is requested through a URL where ".." isn't valid.
|
|
174
|
+
const fileId = stringifyFileScope(fileScope).replace(/\.\./g, '_dir_up_');
|
|
174
175
|
const id = `${virtualPrefix}${fileId}${virtualExt}`;
|
|
175
176
|
let cssSource = source;
|
|
176
177
|
|
package/package.json
CHANGED