global-before-groupA stand-alone keyword written before a group key that replaces it.
csszyx check lists it.A name in angle brackets is a value the message fills in.
[csszyx] global-before-group: `<global>: <valueLiteral>` comes before `<group>` in one sz object, so `<group>` replaces it and the `<global>` value styles nothing.
help: to override the group, layer it: `sz={[base, { <global>: <valueLiteral> }]}`.
note: a spread such as `{ ...base, <global>: <valueLiteral> }` keeps the same key order, so it does not fix this.
docs: https://csszyx.com/e/global-before-group
A production browser bundle prints this in place of it:
[csszyx] global-before-group: {"global":"<global>","value":"<value>","valueType":"<valueType>","group":"<group>"} https://csszyx.com/e/global-before-group
These values are worked out from the args:
<valueLiteral>: value as the JS literal it was written as: a string quoted, a number or boolean bare.Default: error under recommended, error under atomic. Set it in csszyx.config: rules: { 'global-before-group': 'warn' }.
The level sets how the build and csszyx check report it. It does not change a console line, and it does not stop a thrown error.
The values this diagnostic names. A production browser bundle prints them as JSON in place of the sentence.
| Name | Type | |
|---|---|---|
global | string | |
value | string | |
valueType | 'string' | 'number' | 'boolean' | |
group | string |