swc/crates/swc_css_parser/tests/fixture/value/custom-property/input.css
Alexander Akait c94735e540
fix(css): Handle custom properties properly (#2869)
swc_css_codegen:
 - Fix code generation of custom properties.

swc_css_parser:
 - Fix parsing of custom properties.
2021-11-27 16:11:40 +00:00

55 lines
1.1 KiB
CSS

:root {
--:value;
--important:value!important;
--important1: value!important;
--important2: value !important;
--important3:value !important;
--important4: calc(1)!important;
--empty: ;
--empty2: /**/;
--empty3: !important;
--empty4:/**/ !important;
--empty5:/* 1 */ /* 2 */;
--no-whitespace:ident;
--number: 1;
--unit: 100vw;
--color: #06c;
--function: calc(1 + 1);
--variable: var(--unit);
--string: 'single quoted string';
--string: "double quoted string";
--square-block: [1, 2, 3];
--square-block1: [];
--square-block2:[];
--round-block: (1, 2, 3);
--round-block1: ();
--round-block2:();
--bracket-block: {1, 2, 3};
--bracket-block1: {};
--bracket-block2:{};
--JSON: [1, "2", {"three": {"a":1}}, [4]];
--javascript: function(rule) { console.log(rule) };
--CDO: <!--;
--CDC: -->;
--complex-balanced:{[({()})()()[({})]]}[{()}]([]);
--fake-important:{!important};
--semicolon-not-top-level: (;);
--delim-not-top-level: (!);
}
:root{--a:1}
:root {--foo: }
:root {
--foo:
}