From 85be8a4de1d8407421aadeb5769d414b9938f693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 4 Jan 2024 05:40:51 +0900 Subject: [PATCH] refactor(css/parser): Remove value normalization (#8434) **Related issue :** - https://linear.app/vercel/issue/PACK-2154 --- crates/swc_css_ast/src/base.rs | 9 + crates/swc_css_codegen/tests/fixture.rs | 8 +- .../fixture/at-rules/keyframes/1/output.css | 4 +- .../fixture/at-rules/keyframes/2/output.css | 4 +- .../fixture/at-rules/keyframes/3/output.css | 8 +- .../tests/fixture/at-rules/media/4/output.css | 6 +- .../fixture/at-rules/media/4/output.min.css | 2 +- .../tests/fixture/at-rules/page/1/output.css | 2 +- .../fixture/at-rules/supports/1/output.css | 4 +- .../tests/fixture/function/2/output.css | 4 +- .../packages/bootstrap_5_1_3/output.css | 22 +- .../fixture/packages/bulma_0_9_3/output.css | 12 +- .../packages/foundation_6_7_4/output.css | 138 +-- .../material-components-web_13_0_0/output.css | 896 +++++++++--------- .../fixture/packages/pure_2_0_6/output.css | 10 +- .../packages/pure_2_0_6/output.min.css | 2 +- .../packages/tachyons_4_12_0/output.css | 8 +- .../tailwindcss/basic-usage/output.css | 22 +- .../fixture/selectors/attribute/1/output.css | 8 +- .../pseudo-class/an_plus_b/output.css | 2 +- .../pseudo-class/an_plus_b/output.min.css | 2 +- .../selectors/pseudo-class/has/output.css | 4 +- .../tests/fixture/selectors/type/output.css | 8 +- .../style-blocks-contents/hacks/output.css | 2 +- .../fixture/values/color/hex-color/output.css | 8 +- .../values/color/hex-color/output.min.css | 2 +- .../tests/fixture/values/dimension/output.css | 4 +- .../tests/fixture/values/url/1/output.css | 6 +- .../src/compiler/color_alpha_parameter.rs | 8 +- .../src/compiler/color_hex_alpha.rs | 3 + .../color_space_separated_parameters.rs | 7 +- .../src/compiler/custom_media.rs | 16 +- .../src/compiler/legacy_rgb_and_hsl.rs | 7 +- .../tests/all/transform-lowercase/input.css | 3 + .../all/transform-lowercase/input.expect.css | 3 + .../tests/color-legacy/input.expect.css | 8 +- crates/swc_css_compat/tests/fixture.rs | 21 + .../tests/selector-not/input.expect.css | 2 +- .../color-hex-length/long/output.swc-stderr | 2 +- .../color-hex-length/short/output.swc-stderr | 2 +- .../src/compressor/declaration.rs | 22 +- .../src/compressor/keyframes.rs | 4 + crates/swc_css_minifier/src/compressor/mod.rs | 501 +++++----- .../src/compressor/unicode_range.rs | 5 + .../tests/fixture/import/import.compiled.css | 6 +- .../source.compiled.css | 8 +- .../tests-cases/media-2/source.compiled.css | 2 +- .../tests-cases/media/source.compiled.css | 2 +- .../swc_css_parser/src/parser/at_rules/mod.rs | 63 +- .../src/parser/selectors/mod.rs | 27 +- .../swc_css_parser/src/parser/syntax/mod.rs | 8 +- .../src/parser/values_and_units/mod.rs | 44 +- .../fixture/at-rule/color-profile/output.json | 2 +- .../fixture/at-rule/container/output.json | 2 +- .../tests/fixture/at-rule/import/output.json | 28 +- .../fixture/at-rule/keyframe/output.json | 12 +- .../tests/fixture/at-rule/media/output.json | 32 +- .../tests/fixture/at-rule/page/output.json | 4 +- .../fixture/at-rule/supports/output.json | 14 +- .../tests/fixture/function/url/output.json | 2 +- .../tests/fixture/hex-colors/output.json | 10 +- .../fixture/selector/attribute/output.json | 4 +- .../pseudo-class/an-plus-b/output.json | 8 +- .../selector/pseudo-class/basic/output.json | 4 +- .../selector/pseudo-class/dir/output.json | 2 +- .../selector/pseudo-class/not/output.json | 4 +- .../selector/pseudo-element/basic/output.json | 2 +- .../pseudo-element/slotted/output.json | 2 +- .../tests/fixture/selector/type/output.json | 4 +- .../tests/fixture/value/color/output.json | 6 +- .../tests/fixture/value/dimension/output.json | 2 +- .../tests/fixture/value/frequency/output.json | 4 +- .../tests/fixture/value/length/output.json | 4 +- .../tests/fixture/value/urange/output.json | 18 +- .../tests/fixture/value/url/output.json | 6 +- .../misc/39pbt1sIeFh8WWhCalZS4g/output.json | 2 +- .../misc/3EgMpLwjJNG0ht4U_r6cnw/output.json | 2 +- .../misc/9IIa-42s3YQFw8ilk39GdQ/output.json | 2 +- .../misc/AigZ338AGwCqF4M9a3Quqw/output.json | 2 +- .../misc/CQiowK9DjojqKtlpQifemA/output.json | 2 +- .../misc/LoeMqdekBkn3XKYHQFHOZA/output.json | 2 +- .../misc/Oc6Obl7mbH-MlFllIoAbdg/output.json | 2 +- .../misc/R6OYU1g_sB_euLV8Yzjw6w/output.json | 2 +- .../misc/SFBgyV9jnFbMzWZoo9VbSQ/output.json | 2 +- .../misc/U2nuhvtnEWZ_kMd6i7EDWA/output.json | 2 +- .../misc/W3R-c5DPSkhG9QWYdcFdFg/output.json | 2 +- .../misc/_APxY5Pe47Bb71-CwD1nhw/output.json | 2 +- .../misc/a0Yurt7E7InOYieD7nMCXg/output.json | 2 +- .../misc/a7KElWOMF9ilrSsoliHkcg/output.json | 2 +- .../misc/pOZgFOB3GdVvQ0hiAsWfpQ/output.json | 2 +- .../misc/qmXSF9N8euK5gfPoFGmV_Q/output.json | 2 +- .../misc/xc1mD3YfHByTKL-N-FL49A/output.json | 2 +- .../fixture/vendor/rome/at-page/output.json | 4 +- .../output.json | 2 +- .../fixture/vendor/rome/selectors/output.json | 2 +- .../tests/recovery/hacks/output.json | 2 +- .../tests/recovery/ie-progid/output.json | 4 +- crates/swc_css_prefixer/src/prefixer.rs | 2 +- .../tests/fixture/autofill/output.css | 2 +- .../autofill/output.defaults-not-ie-11.css | 2 +- .../tests/fixture/calc/output.css | 6 +- .../calc/output.defaults-not-ie-11.css | 4 +- .../tests/fixture/case-insensivity/output.css | 20 +- .../output.defaults-not-ie-11.css | 10 +- .../tests/fixture/cursor/output.css | 6 +- .../cursor/output.defaults-not-ie-11.css | 2 +- .../tests/fixture/filter/output.css | 5 +- .../filter/output.defaults-not-ie-11.css | 4 +- .../tests/fixture/font-face-format/output.css | 5 +- .../output.defaults-not-ie-11.css | 5 +- .../tests/fixture/gradient/output.css | 24 +- .../gradient/output.defaults-not-ie-11.css | 6 +- .../tests/fixture/place/output.css | 26 +- .../place/output.defaults-not-ie-11.css | 8 +- .../tests/fixture/resolution/output.css | 2 +- .../resolution/output.defaults-not-ie-11.css | 2 +- .../tests/fixture/selection/output.css | 2 +- .../selection/output.defaults-not-ie-11.css | 2 +- .../tests/fixture/transform/output.css | 32 +- .../transform/output.defaults-not-ie-11.css | 8 +- .../tests/fixture/transition/output.css | 30 +- .../transition/output.defaults-not-ie-11.css | 6 +- crates/swc_css_utils/src/lib.rs | 6 +- 123 files changed, 1246 insertions(+), 1186 deletions(-) create mode 100644 crates/swc_css_compat/tests/all/transform-lowercase/input.css create mode 100644 crates/swc_css_compat/tests/all/transform-lowercase/input.expect.css diff --git a/crates/swc_css_ast/src/base.rs b/crates/swc_css_ast/src/base.rs index 2693c5d827d..e69dc849c0b 100644 --- a/crates/swc_css_ast/src/base.rs +++ b/crates/swc_css_ast/src/base.rs @@ -137,6 +137,15 @@ impl PartialEq for FunctionName { } } +impl FunctionName { + pub fn as_str(&self) -> &str { + match self { + FunctionName::DashedIdent(v) => &v.value, + FunctionName::Ident(v) => &v.value, + } + } +} + #[ast_node("Function")] #[derive(Eq, Hash, EqIgnoreSpan)] pub struct Function { diff --git a/crates/swc_css_codegen/tests/fixture.rs b/crates/swc_css_codegen/tests/fixture.rs index 80b621cf3b0..67d7bfeca8c 100644 --- a/crates/swc_css_codegen/tests/fixture.rs +++ b/crates/swc_css_codegen/tests/fixture.rs @@ -11,7 +11,7 @@ use swc_css_codegen::{ }; use swc_css_parser::parse_file; use swc_css_visit::{VisitMut, VisitMutWith}; -use testing::{assert_eq, run_test2, NormalizedOutput}; +use testing::{run_test2, NormalizedOutput}; fn run(input: &Path, minify: bool) { let dir = input.parent().unwrap(); @@ -80,6 +80,12 @@ fn run(input: &Path, minify: bool) { .compare_to_file(output) .unwrap(); + if minify { + // We lowercase identifiers to make gzip compression rate better, so we cannot + // make the output equal to the input + return Ok(()); + } + let mut errors = vec![]; let mut stylesheet_output: Stylesheet = parse_file(&fm_output, None, Default::default(), &mut errors).map_err(|err| { diff --git a/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/1/output.css b/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/1/output.css index fdc66c5ebfc..3bca1e4ca66 100644 --- a/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/1/output.css +++ b/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/1/output.css @@ -1,8 +1,8 @@ @keyframes slidein { from { - transform: translatex(0%); + transform: translateX(0%); } to { - transform: translatex(100%); + transform: translateX(100%); } } diff --git a/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/2/output.css b/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/2/output.css index 53a46c64dfa..7704998bc6b 100644 --- a/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/2/output.css +++ b/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/2/output.css @@ -1,8 +1,8 @@ @keyframes "foo" { from { - transform: translatex(0%); + transform: translateX(0%); } to { - transform: translatex(100%); + transform: translateX(100%); } } diff --git a/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/3/output.css b/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/3/output.css index 0b5f4e27c3d..492dfba217d 100644 --- a/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/3/output.css +++ b/crates/swc_css_codegen/tests/fixture/at-rules/keyframes/3/output.css @@ -7,10 +7,10 @@ } } @keyframes ONE_TWO_THREE { - from { - transform: translatex(0%); + FROM { + transform: translateX(0%); } - to { - transform: translatex(100%); + TO { + transform: translateX(100%); } } diff --git a/crates/swc_css_codegen/tests/fixture/at-rules/media/4/output.css b/crates/swc_css_codegen/tests/fixture/at-rules/media/4/output.css index fe5ee60b9f3..e727cc59504 100644 --- a/crates/swc_css_codegen/tests/fixture/at-rules/media/4/output.css +++ b/crates/swc_css_codegen/tests/fixture/at-rules/media/4/output.css @@ -111,9 +111,9 @@ @media func(100px) {} @media screen and func(100px) {} @media (max-width: 650px), calc(150px + 150px) {} -@media all {} -@media (prefers-reduced-motion: no-preference) { - :root { +@MEDIA ALL {} +@MEDIA (PREFERS-reduced-motion: no-preference) { + :ROOT { scroll-behavior: smooth; } } diff --git a/crates/swc_css_codegen/tests/fixture/at-rules/media/4/output.min.css b/crates/swc_css_codegen/tests/fixture/at-rules/media/4/output.min.css index 732c28ce36c..8efbad453b0 100644 --- a/crates/swc_css_codegen/tests/fixture/at-rules/media/4/output.min.css +++ b/crates/swc_css_codegen/tests/fixture/at-rules/media/4/output.min.css @@ -1 +1 @@ -@media screen{}@media screen{}@media all{}@media screen{}@media print{}@media screen and (color){}@media screen and (color),projection and (color){}@media screen and (color),projection and (color){}@media print and (min-resolution:118dpcm){}@media all{}@media screen and (color){}@media screen and (color){}@media not all and (monochrome){}@media not screen and (color),print and (color){}@media not (device-aspect-ratio:16/9){}@media not (device-aspect-ratio:16/9){}@media not all{}@media not all{}@media only screen and (color){}@media only screen and (color){}@media(min-width:20px){}@media(min-width:20px){}@media(min-width:20px){}@media(device-aspect-ratio:16/9){}@media(device-aspect-ratio:16/9){}@media(grid)and (max-width:15em){}@media(monochrome){}@media(min-width:20em)and (min-width:20em){}@media(min-width:20em)and (min-width:20em){}@media(min-width:1024px)and (min-width:1024px)and (min-width:1024px){}@media(min-width:20em)and (min-width:20em){}@media(min-width:20em)and (min-width:20em){}@media(update:slow)or (hover:none){}@media(update:slow)or (hover:none){}@media(update:slow)or (hover:none){}@media(height<600px){}@media(height<=600px){}@media(height>600px){}@media(height>=600px){}@media(height=600px){}@media(height<600px){}@media(height<=600px){}@media(height>600px){}@media(height>=600px){}@media(height=600px){}@media(height=600px){}@media(height>=600px){}@media(600pxheight){}@media(600px>=height){}@media(600px=height){}@media(600pxheight){}@media(600px>=height){}@media(600px=height){}@media(600px=height){}@media(600px>=height){}@media(400pxwidth>700px){}@media(400px>=width>700px){}@media(400px>width>=700px){}@media(400px>=width>=700px){}@media(400px>width>700px){}@media(400px>=width>=700px){}@media(400px>width>700px){}@media(400px>=width>700px){}@media(400px>width>=700px){}@media(400px>=width>=700px){}@media(400px>width>700px){}@media(400px>=width>=700px){}@media(--modern)and (min-width:1024px){}@media(not (color))or (hover){}@media(not (color))or (hover){}@media((color)or (hover))and (width>1024px){}@media(((color))or ((hover)))and (width>1024px){}@media(((((color))or ((hover)))))and (width>1024px){}@media(((((color))or ((hover)))))and (width>1024px){}@media((min-width:800px)and (min-width:800px))or (min-width:800px){}@media(min-width:800px)and ((min-width:800px)or (min-width:800px)){}@media not all{}@media only screen and (color){}@media((min-width:800px)and (min-width:800px))or (min-width:800px){}@media(min-width:800px)and ((min-width:800px)or (min-width:800px)){}@media{}@media{}@media not (min-width:100px){}@media((color)or (hover))and (min-width:1024px){.a{color:green}}@media(height << 600px){}@media(height foo bar){}@media(height foo("bar")){}@media(height + 600px){}@media screen and (min-width: ){}@media(aspect-ratio: 12/){}@media func(100px){}@media screen and func(100px){}@media(max-width:650px),calc(150px + 150px){}@media all{}@media(prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}} +@media screen{}@media screen{}@media all{}@media screen{}@media print{}@media screen and (color){}@media screen and (color),projection and (color){}@media screen and (color),projection and (color){}@media print and (min-resolution:118dpcm){}@media all{}@media screen and (color){}@media screen and (color){}@media not all and (monochrome){}@media not screen and (color),print and (color){}@media not (device-aspect-ratio:16/9){}@media not (device-aspect-ratio:16/9){}@media not all{}@media not all{}@media only screen and (color){}@media only screen and (color){}@media(min-width:20px){}@media(min-width:20px){}@media(min-width:20px){}@media(device-aspect-ratio:16/9){}@media(device-aspect-ratio:16/9){}@media(grid)and (max-width:15em){}@media(monochrome){}@media(min-width:20em)and (min-width:20em){}@media(min-width:20em)and (min-width:20em){}@media(min-width:1024px)and (min-width:1024px)and (min-width:1024px){}@media(min-width:20em)and (min-width:20em){}@media(min-width:20em)and (min-width:20em){}@media(update:slow)or (hover:none){}@media(update:slow)or (hover:none){}@media(update:slow)or (hover:none){}@media(height<600px){}@media(height<=600px){}@media(height>600px){}@media(height>=600px){}@media(height=600px){}@media(height<600px){}@media(height<=600px){}@media(height>600px){}@media(height>=600px){}@media(height=600px){}@media(height=600px){}@media(height>=600px){}@media(600pxheight){}@media(600px>=height){}@media(600px=height){}@media(600pxheight){}@media(600px>=height){}@media(600px=height){}@media(600px=height){}@media(600px>=height){}@media(400pxwidth>700px){}@media(400px>=width>700px){}@media(400px>width>=700px){}@media(400px>=width>=700px){}@media(400px>width>700px){}@media(400px>=width>=700px){}@media(400px>width>700px){}@media(400px>=width>700px){}@media(400px>width>=700px){}@media(400px>=width>=700px){}@media(400px>width>700px){}@media(400px>=width>=700px){}@media(--modern)and (min-width:1024px){}@media(not (color))or (hover){}@media(not (color))or (hover){}@media((color)or (hover))and (width>1024px){}@media(((color))or ((hover)))and (width>1024px){}@media(((((color))or ((hover)))))and (width>1024px){}@media(((((color))or ((hover)))))and (width>1024px){}@media((min-width:800px)and (min-width:800px))or (min-width:800px){}@media(min-width:800px)and ((min-width:800px)or (min-width:800px)){}@media not all{}@media only screen and (color){}@media((min-width:800px)and (min-width:800px))or (min-width:800px){}@media(min-width:800px)and ((min-width:800px)or (min-width:800px)){}@media{}@media{}@media not (min-width:100px){}@media((color)or (hover))and (min-width:1024px){.a{color:green}}@media(height << 600px){}@media(height foo bar){}@media(height foo("bar")){}@media(height + 600px){}@media screen and (min-width: ){}@media(aspect-ratio: 12/){}@media func(100px){}@media screen and func(100px){}@media(max-width:650px),calc(150px + 150px){}@media all{}@media(PREFERS-reduced-motion:no-preference){:root{scroll-behavior:smooth}} diff --git a/crates/swc_css_codegen/tests/fixture/at-rules/page/1/output.css b/crates/swc_css_codegen/tests/fixture/at-rules/page/1/output.css index 7048de7aee1..76518cc9ca3 100644 --- a/crates/swc_css_codegen/tests/fixture/at-rules/page/1/output.css +++ b/crates/swc_css_codegen/tests/fixture/at-rules/page/1/output.css @@ -44,6 +44,6 @@ @page :blank:first {} @page :first {} @page toc, index {} -@page :first { +@page :FIRST { margin: 2cm; } diff --git a/crates/swc_css_codegen/tests/fixture/at-rules/supports/1/output.css b/crates/swc_css_codegen/tests/fixture/at-rules/supports/1/output.css index 8a73b1f6678..b28aaae6730 100644 --- a/crates/swc_css_codegen/tests/fixture/at-rules/supports/1/output.css +++ b/crates/swc_css_codegen/tests/fixture/at-rules/supports/1/output.css @@ -20,7 +20,7 @@ background: red; } } -@supports selector(a > b) {} +@supports selector(A > B) {} @supports (display: grid) and (not (display: inline-grid)) {} @supports (display: table-cell) and (display: list-item) and (display: contents) {} @supports not ((text-align-last: justify) or (-moz-text-align-last: justify)) {} @@ -32,4 +32,4 @@ @supports ((display: flex) or (display: -webkit-box) or (display: -webkit-flex) or (display: -moz-box) or (display: -ms-flexbox)) or (display: -webkit-box) {} @supports ((display: flex) and (display: -webkit-box) and (display: -webkit-flex) and (display: -moz-box) and (display: -ms-flexbox)) and (display: -webkit-box) {} @supports ((display: flex) and (display: -webkit-box) and (display: -webkit-flex) and (display: -moz-box) and (display: -ms-flexbox)) or (display: -webkit-box) {} -@supports not (not (transform-origin: 2px)) {} +@supports not (not (Transform-origin: 2px)) {} diff --git a/crates/swc_css_codegen/tests/fixture/function/2/output.css b/crates/swc_css_codegen/tests/fixture/function/2/output.css index ae5bfbbc402..04f24dc2c62 100644 --- a/crates/swc_css_codegen/tests/fixture/function/2/output.css +++ b/crates/swc_css_codegen/tests/fixture/function/2/output.css @@ -3,7 +3,7 @@ div { width: calc(100px + 100px); width: calc(100px * 2); width: calc(100px / 2); - width: calc(100px / 2); - width: calc(100px / 2); + width: CALC(100px / 2); + WIDTH: CALC(100px / 2); font-size: max(10 * (1vw + 1vh) / 2, 12px); } diff --git a/crates/swc_css_codegen/tests/fixture/packages/bootstrap_5_1_3/output.css b/crates/swc_css_codegen/tests/fixture/packages/bootstrap_5_1_3/output.css index bc8ace055bc..db55ad77108 100644 --- a/crates/swc_css_codegen/tests/fixture/packages/bootstrap_5_1_3/output.css +++ b/crates/swc_css_codegen/tests/fixture/packages/bootstrap_5_1_3/output.css @@ -2344,17 +2344,17 @@ textarea.form-control-lg { } .form-floating > .form-control:not(:-moz-placeholder-shown) ~ label { opacity: 0.65; - transform: scale(0.85) translatey(-0.5rem) translatex(0.15rem); + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); } .form-floating > .form-control:focus ~ label, .form-floating > .form-control:not(:placeholder-shown) ~ label, .form-floating > .form-select ~ label { opacity: 0.65; - transform: scale(0.85) translatey(-0.5rem) translatex(0.15rem); + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); } .form-floating > .form-control:-webkit-autofill ~ label { opacity: 0.65; - transform: scale(0.85) translatey(-0.5rem) translatex(0.15rem); + transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem); } .input-group { position: relative; @@ -5707,11 +5707,11 @@ fieldset:disabled .btn { } .carousel-item-next:not(.carousel-item-start), .active.carousel-item-end { - transform: translatex(100%); + transform: translateX(100%); } .carousel-item-prev:not(.carousel-item-end), .active.carousel-item-start { - transform: translatex(-100%); + transform: translateX(-100%); } .carousel-fade .carousel-item { opacity: 0; @@ -5975,14 +5975,14 @@ fieldset:disabled .btn { left: 0; width: 400px; border-right: 1px solid rgba(0, 0, 0, 0.2); - transform: translatex(-100%); + transform: translateX(-100%); } .offcanvas-end { top: 0; right: 0; width: 400px; border-left: 1px solid rgba(0, 0, 0, 0.2); - transform: translatex(100%); + transform: translateX(100%); } .offcanvas-top { top: 0; @@ -5991,7 +5991,7 @@ fieldset:disabled .btn { height: 30vh; max-height: 100%; border-bottom: 1px solid rgba(0, 0, 0, 0.2); - transform: translatey(-100%); + transform: translateY(-100%); } .offcanvas-bottom { right: 0; @@ -5999,7 +5999,7 @@ fieldset:disabled .btn { height: 30vh; max-height: 100%; border-top: 1px solid rgba(0, 0, 0, 0.2); - transform: translatey(100%); + transform: translateY(100%); } .offcanvas.show { transform: none; @@ -6406,10 +6406,10 @@ fieldset:disabled .btn { transform: translate(-50%, -50%) !important; } .translate-middle-x { - transform: translatex(-50%) !important; + transform: translateX(-50%) !important; } .translate-middle-y { - transform: translatey(-50%) !important; + transform: translateY(-50%) !important; } .border { border: 1px solid #dee2e6 !important; diff --git a/crates/swc_css_codegen/tests/fixture/packages/bulma_0_9_3/output.css b/crates/swc_css_codegen/tests/fixture/packages/bulma_0_9_3/output.css index cb8896dee33..cdff8cebc38 100644 --- a/crates/swc_css_codegen/tests/fixture/packages/bulma_0_9_3/output.css +++ b/crates/swc_css_codegen/tests/fixture/packages/bulma_0_9_3/output.css @@ -177,7 +177,7 @@ fieldset[disabled] .pagination-ellipsis { left: 50%; position: absolute; top: 50%; - transform: translatex(-50%) translatey(-50%) rotate(45deg); + transform: translateX(-50%) translateY(-50%) rotate(45deg); transform-origin: center center; } .delete::before, @@ -2859,7 +2859,7 @@ div.icon-text { left: 50%; position: absolute; top: 50%; - transform: translatex(-50%) translatey(-50%) rotate(45deg); + transform: translateX(-50%) translateY(-50%) rotate(45deg); transform-origin: center center; } .tag:not(body).is-delete::before { @@ -5605,13 +5605,13 @@ body.has-navbar-fixed-bottom { background-color: rgba(0, 0, 0, 0.05); } .navbar-burger.is-active span:nth-child(1) { - transform: translatey(5px) rotate(45deg); + transform: translateY(5px) rotate(45deg); } .navbar-burger.is-active span:nth-child(2) { opacity: 0; } .navbar-burger.is-active span:nth-child(3) { - transform: translatey(-5px) rotate(-45deg); + transform: translateY(-5px) rotate(-45deg); } .navbar-menu { display: none; @@ -5838,7 +5838,7 @@ a.navbar-item.is-active, .navbar-item.is-hoverable:hover .navbar-dropdown.is-boxed { opacity: 1; pointer-events: auto; - transform: translatey(0); + transform: translateY(0); } .navbar-menu { flex-grow: 1; @@ -5891,7 +5891,7 @@ a.navbar-item.is-active, opacity: 0; pointer-events: none; top: calc(100% + (-4px)); - transform: translatey(-5px); + transform: translateY(-5px); transition-duration: 86ms; transition-property: opacity, transform; } diff --git a/crates/swc_css_codegen/tests/fixture/packages/foundation_6_7_4/output.css b/crates/swc_css_codegen/tests/fixture/packages/foundation_6_7_4/output.css index 7ae3c72f826..4780a23f049 100644 --- a/crates/swc_css_codegen/tests/fixture/packages/foundation_6_7_4/output.css +++ b/crates/swc_css_codegen/tests/fixture/packages/foundation_6_7_4/output.css @@ -4218,9 +4218,9 @@ a.button:focus { .slider-handle { position: absolute; top: 50%; - -webkit-transform: translatey(-50%); - -ms-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); left: 0; z-index: 1; cursor: -webkit-grab; @@ -4272,9 +4272,9 @@ a.button:focus { left: 50%; width: 1.4rem; height: 1.4rem; - -webkit-transform: translatex(-50%); - -ms-transform: translatex(-50%); - transform: translatex(-50%); + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); } .switch { position: relative; @@ -4342,9 +4342,9 @@ input:disabled ~ .switch-paddle { .switch-inactive { position: absolute; top: 50%; - -webkit-transform: translatey(-50%); - -ms-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); } .switch-active { left: 8%; @@ -4809,9 +4809,9 @@ table.hover:not(.unstriped) tr:nth-of-type(even):hover { } .tooltip.bottom.align-center::before { left: 50%; - -webkit-transform: translatex(-50%); - -ms-transform: translatex(-50%); - transform: translatex(-50%); + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); } .tooltip.top::before { display: block; @@ -4827,9 +4827,9 @@ table.hover:not(.unstriped) tr:nth-of-type(even):hover { } .tooltip.top.align-center::before { left: 50%; - -webkit-transform: translatex(-50%); - -ms-transform: translatex(-50%); - transform: translatex(-50%); + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); } .tooltip.left::before { display: block; @@ -4845,9 +4845,9 @@ table.hover:not(.unstriped) tr:nth-of-type(even):hover { .tooltip.left.align-center::before { bottom: auto; top: 50%; - -webkit-transform: translatey(-50%); - -ms-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); } .tooltip.right::before { display: block; @@ -4864,9 +4864,9 @@ table.hover:not(.unstriped) tr:nth-of-type(even):hover { .tooltip.right.align-center::before { bottom: auto; top: 50%; - -webkit-transform: translatey(-50%); - -ms-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); } .tooltip.align-top::before { bottom: auto; @@ -5030,9 +5030,9 @@ table.hover:not(.unstriped) tr:nth-of-type(even):hover { .orbit-next { position: absolute; top: 50%; - -webkit-transform: translatey(-50%); - -ms-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); z-index: 10; padding: 1rem; color: #fefefe; @@ -5682,9 +5682,9 @@ a.thumbnail image { margin: auto; } .submenu-toggle[aria-expanded='true']::after { - -webkit-transform: scaley(-1); - -ms-transform: scaley(-1); - transform: scaley(-1); + -webkit-transform: scaleY(-1); + -ms-transform: scaleY(-1); + transform: scaleY(-1); -webkit-transform-origin: 50% 50%; -ms-transform-origin: 50% 50%; transform-origin: 50% 50%; @@ -5729,14 +5729,14 @@ a.thumbnail image { .drilldown .is-drilldown-submenu.is-active { z-index: 1; display: block; - -webkit-transform: translatex(-100%); - -ms-transform: translatex(-100%); - transform: translatex(-100%); + -webkit-transform: translateX(-100%); + -ms-transform: translateX(-100%); + transform: translateX(-100%); } .drilldown .is-drilldown-submenu.is-closing { - -webkit-transform: translatex(100%); - -ms-transform: translatex(100%); - transform: translatex(100%); + -webkit-transform: translateX(100%); + -ms-transform: translateX(100%); + transform: translateX(100%); } .drilldown .is-drilldown-submenu a { padding: 0.7rem 1rem; @@ -6200,14 +6200,14 @@ a.thumbnail image { overflow-y: auto; -webkit-overflow-scrolling: touch; width: 250px; - -webkit-transform: translatex(-250px); - -ms-transform: translatex(-250px); - transform: translatex(-250px); + -webkit-transform: translateX(-250px); + -ms-transform: translateX(-250px); + transform: translateX(-250px); } .off-canvas-content .off-canvas.position-left { - -webkit-transform: translatex(-250px); - -ms-transform: translatex(-250px); - transform: translatex(-250px); + -webkit-transform: translateX(-250px); + -ms-transform: translateX(-250px); + transform: translateX(-250px); } .off-canvas-content .off-canvas.position-left.is-transition-overlap.is-open { -webkit-transform: translate(0, 0); @@ -6215,9 +6215,9 @@ a.thumbnail image { transform: translate(0, 0); } .off-canvas-content.is-open-left.has-transition-push { - -webkit-transform: translatex(250px); - -ms-transform: translatex(250px); - transform: translatex(250px); + -webkit-transform: translateX(250px); + -ms-transform: translateX(250px); + transform: translateX(250px); } .position-left.is-transition-push { -webkit-box-shadow: inset -13px 0 20px -13px rgba(10, 10, 10, 0.25); @@ -6230,14 +6230,14 @@ a.thumbnail image { overflow-y: auto; -webkit-overflow-scrolling: touch; width: 250px; - -webkit-transform: translatex(250px); - -ms-transform: translatex(250px); - transform: translatex(250px); + -webkit-transform: translateX(250px); + -ms-transform: translateX(250px); + transform: translateX(250px); } .off-canvas-content .off-canvas.position-right { - -webkit-transform: translatex(250px); - -ms-transform: translatex(250px); - transform: translatex(250px); + -webkit-transform: translateX(250px); + -ms-transform: translateX(250px); + transform: translateX(250px); } .off-canvas-content .off-canvas.position-right.is-transition-overlap.is-open { -webkit-transform: translate(0, 0); @@ -6245,9 +6245,9 @@ a.thumbnail image { transform: translate(0, 0); } .off-canvas-content.is-open-right.has-transition-push { - -webkit-transform: translatex(-250px); - -ms-transform: translatex(-250px); - transform: translatex(-250px); + -webkit-transform: translateX(-250px); + -ms-transform: translateX(-250px); + transform: translateX(-250px); } .position-right.is-transition-push { -webkit-box-shadow: inset 13px 0 20px -13px rgba(10, 10, 10, 0.25); @@ -6260,14 +6260,14 @@ a.thumbnail image { overflow-x: auto; -webkit-overflow-scrolling: touch; height: 250px; - -webkit-transform: translatey(-250px); - -ms-transform: translatey(-250px); - transform: translatey(-250px); + -webkit-transform: translateY(-250px); + -ms-transform: translateY(-250px); + transform: translateY(-250px); } .off-canvas-content .off-canvas.position-top { - -webkit-transform: translatey(-250px); - -ms-transform: translatey(-250px); - transform: translatey(-250px); + -webkit-transform: translateY(-250px); + -ms-transform: translateY(-250px); + transform: translateY(-250px); } .off-canvas-content .off-canvas.position-top.is-transition-overlap.is-open { -webkit-transform: translate(0, 0); @@ -6275,9 +6275,9 @@ a.thumbnail image { transform: translate(0, 0); } .off-canvas-content.is-open-top.has-transition-push { - -webkit-transform: translatey(250px); - -ms-transform: translatey(250px); - transform: translatey(250px); + -webkit-transform: translateY(250px); + -ms-transform: translateY(250px); + transform: translateY(250px); } .position-top.is-transition-push { -webkit-box-shadow: inset 0 -13px 20px -13px rgba(10, 10, 10, 0.25); @@ -6290,14 +6290,14 @@ a.thumbnail image { overflow-x: auto; -webkit-overflow-scrolling: touch; height: 250px; - -webkit-transform: translatey(250px); - -ms-transform: translatey(250px); - transform: translatey(250px); + -webkit-transform: translateY(250px); + -ms-transform: translateY(250px); + transform: translateY(250px); } .off-canvas-content .off-canvas.position-bottom { - -webkit-transform: translatey(250px); - -ms-transform: translatey(250px); - transform: translatey(250px); + -webkit-transform: translateY(250px); + -ms-transform: translateY(250px); + transform: translateY(250px); } .off-canvas-content .off-canvas.position-bottom.is-transition-overlap.is-open { -webkit-transform: translate(0, 0); @@ -6305,9 +6305,9 @@ a.thumbnail image { transform: translate(0, 0); } .off-canvas-content.is-open-bottom.has-transition-push { - -webkit-transform: translatey(-250px); - -ms-transform: translatey(-250px); - transform: translatey(-250px); + -webkit-transform: translateY(-250px); + -ms-transform: translateY(-250px); + transform: translateY(-250px); } .position-bottom.is-transition-push { -webkit-box-shadow: inset 0 13px 20px -13px rgba(10, 10, 10, 0.25); diff --git a/crates/swc_css_codegen/tests/fixture/packages/material-components-web_13_0_0/output.css b/crates/swc_css_codegen/tests/fixture/packages/material-components-web_13_0_0/output.css index 0d36da5d9a2..dee6368b4eb 100644 --- a/crates/swc_css_codegen/tests/fixture/packages/material-components-web_13_0_0/output.css +++ b/crates/swc_css_codegen/tests/fixture/packages/material-components-web_13_0_0/output.css @@ -78,8 +78,8 @@ transition: -webkit-transform 300ms ease; transition: transform 300ms ease; transition: transform 300ms ease, -webkit-transform 300ms ease; - -webkit-transform: translatey(0); - transform: translatey(0); + -webkit-transform: translateY(0); + transform: translateY(0); } .mdc-banner--closing { transition: height 250ms ease; @@ -106,8 +106,8 @@ display: flex; min-height: 52px; position: absolute; - -webkit-transform: translatey(-100%); - transform: translatey(-100%); + -webkit-transform: translateY(-100%); + transform: translateY(-100%); width: 100%; } .mdc-banner__graphic-text-wrapper { @@ -130,8 +130,8 @@ .mdc-banner__icon { position: relative; top: 50%; - -webkit-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } .mdc-banner__text { margin-left: 24px; @@ -314,8 +314,8 @@ height: 48px; left: 0; right: 0; - -webkit-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } .mdc-button__label + .mdc-button__icon { margin-left: 8px; @@ -1375,30 +1375,30 @@ svg.mdc-button__icon { } @-webkit-keyframes mdc-checkbox-unchecked-indeterminate-mixedmark { 0%, 68.2% { - -webkit-transform: scalex(0); - transform: scalex(0); + -webkit-transform: scaleX(0); + transform: scaleX(0); } 68.2% { -webkit-animation-timing-function: cubic-bezier(0, 0, 0, 1); animation-timing-function: cubic-bezier(0, 0, 0, 1); } 100% { - -webkit-transform: scalex(1); - transform: scalex(1); + -webkit-transform: scaleX(1); + transform: scaleX(1); } } @keyframes mdc-checkbox-unchecked-indeterminate-mixedmark { 0%, 68.2% { - -webkit-transform: scalex(0); - transform: scalex(0); + -webkit-transform: scaleX(0); + transform: scaleX(0); } 68.2% { -webkit-animation-timing-function: cubic-bezier(0, 0, 0, 1); animation-timing-function: cubic-bezier(0, 0, 0, 1); } 100% { - -webkit-transform: scalex(1); - transform: scalex(1); + -webkit-transform: scaleX(1); + transform: scaleX(1); } } @-webkit-keyframes mdc-checkbox-checked-unchecked-checkmark-path { @@ -1541,13 +1541,13 @@ svg.mdc-button__icon { 0% { -webkit-animation-timing-function: linear; animation-timing-function: linear; - -webkit-transform: scalex(1); - transform: scalex(1); + -webkit-transform: scaleX(1); + transform: scaleX(1); opacity: 1; } 32.8%, 100% { - -webkit-transform: scalex(0); - transform: scalex(0); + -webkit-transform: scaleX(0); + transform: scaleX(0); opacity: 0; } } @@ -1555,13 +1555,13 @@ svg.mdc-button__icon { 0% { -webkit-animation-timing-function: linear; animation-timing-function: linear; - -webkit-transform: scalex(1); - transform: scalex(1); + -webkit-transform: scaleX(1); + transform: scaleX(1); opacity: 1; } 32.8%, 100% { - -webkit-transform: scalex(0); - transform: scalex(0); + -webkit-transform: scaleX(0); + transform: scaleX(0); opacity: 0; } } @@ -1644,8 +1644,8 @@ svg.mdc-button__icon { .mdc-checkbox__mixedmark { width: 100%; height: 0; - -webkit-transform: scalex(0) rotate(0deg); - transform: scalex(0) rotate(0deg); + -webkit-transform: scaleX(0) rotate(0deg); + transform: scaleX(0) rotate(0deg); border-width: 1px; border-style: solid; opacity: 0; @@ -1746,8 +1746,8 @@ svg.mdc-button__icon { opacity: 1; } .mdc-checkbox__native-control:checked ~ .mdc-checkbox__background .mdc-checkbox__mixedmark { - -webkit-transform: scalex(1) rotate(-45deg); - transform: scalex(1) rotate(-45deg); + -webkit-transform: scaleX(1) rotate(-45deg); + transform: scaleX(1) rotate(-45deg); } .mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background .mdc-checkbox__checkmark, .mdc-checkbox__native-control[data-indeterminate=true] ~ .mdc-checkbox__background .mdc-checkbox__checkmark { @@ -1760,8 +1760,8 @@ svg.mdc-button__icon { } .mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background .mdc-checkbox__mixedmark, .mdc-checkbox__native-control[data-indeterminate=true] ~ .mdc-checkbox__background .mdc-checkbox__mixedmark { - -webkit-transform: scalex(1) rotate(0deg); - transform: scalex(1) rotate(0deg); + -webkit-transform: scaleX(1) rotate(0deg); + transform: scaleX(1) rotate(0deg); opacity: 1; } .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background, @@ -2118,8 +2118,8 @@ svg.mdc-button__icon { height: 48px; left: 0; right: 0; - -webkit-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } .mdc-chip--exit { transition: opacity 75ms cubic-bezier(0.4, 0, 0.2, 1), width 150ms cubic-bezier(0, 0, 0.2, 1), padding 100ms linear, margin 100ms linear; @@ -2840,8 +2840,8 @@ svg.mdc-button__icon { margin-right: 1px; } .mdc-floating-label--float-above { - -webkit-transform: translatey(-106%) scale(0.75); - transform: translatey(-106%) scale(0.75); + -webkit-transform: translateY(-106%) scale(0.75); + transform: translateY(-106%) scale(0.75); } .mdc-floating-label--shake { -webkit-animation: mdc-floating-label-shake-float-above-standard 250ms 1; @@ -2849,46 +2849,46 @@ svg.mdc-button__icon { } @-webkit-keyframes mdc-floating-label-shake-float-above-standard { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-106%) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-106%) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-106%) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-106%) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-106%) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-106%) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-106%) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-106%) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75); } } @keyframes mdc-floating-label-shake-float-above-standard { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-106%) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-106%) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-106%) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-106%) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-106%) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-106%) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-106%) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-106%) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75); } } .mdc-line-ripple::before, @@ -2905,8 +2905,8 @@ svg.mdc-button__icon { z-index: 1; } .mdc-line-ripple::after { - -webkit-transform: scalex(0); - transform: scalex(0); + -webkit-transform: scaleX(0); + transform: scaleX(0); border-bottom-width: 2px; opacity: 0; z-index: 2; @@ -2917,8 +2917,8 @@ svg.mdc-button__icon { transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1); } .mdc-line-ripple--active::after { - -webkit-transform: scalex(1); - transform: scalex(1); + -webkit-transform: scaleX(1); + transform: scaleX(1); opacity: 1; } .mdc-line-ripple--deactivating::after { @@ -3067,8 +3067,8 @@ svg.mdc-button__icon { } .mdc-select .mdc-floating-label { top: 50%; - -webkit-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + transform: translateY(-50%); pointer-events: none; } .mdc-select .mdc-select__anchor { @@ -3169,8 +3169,8 @@ svg.mdc-button__icon { cursor: pointer; } .mdc-select__anchor .mdc-floating-label--float-above { - -webkit-transform: translatey(-106%) scale(0.75); - transform: translatey(-106%) scale(0.75); + -webkit-transform: translateY(-106%) scale(0.75); + transform: translateY(-106%) scale(0.75); } .mdc-select__selected-text-container { display: flex; @@ -3488,16 +3488,16 @@ svg.mdc-button__icon { height: 56px; } .mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above { - -webkit-transform: translatey(-37.25px) scale(1); - transform: translatey(-37.25px) scale(1); + -webkit-transform: translateY(-37.25px) scale(1); + transform: translateY(-37.25px) scale(1); } .mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above { font-size: 0.75rem; } .mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above { - -webkit-transform: translatey(-34.75px) scale(0.75); - transform: translatey(-34.75px) scale(0.75); + -webkit-transform: translateY(-34.75px) scale(0.75); + transform: translateY(-34.75px) scale(0.75); } .mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above { @@ -3509,46 +3509,46 @@ svg.mdc-button__icon { } @-webkit-keyframes mdc-floating-label-shake-float-above-select-outlined-56px { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); } } @keyframes mdc-floating-label-shake-float-above-select-outlined-56px { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); } } .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading { @@ -3670,16 +3670,16 @@ svg.mdc-button__icon { animation: mdc-floating-label-shake-float-above-select-outlined 250ms 1; } .mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above { - -webkit-transform: translatey(-37.25px) scale(1); - transform: translatey(-37.25px) scale(1); + -webkit-transform: translateY(-37.25px) scale(1); + transform: translateY(-37.25px) scale(1); } .mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above { font-size: 0.75rem; } .mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above { - -webkit-transform: translatey(-34.75px) scale(0.75); - transform: translatey(-34.75px) scale(0.75); + -webkit-transform: translateY(-34.75px) scale(0.75); + transform: translateY(-34.75px) scale(0.75); } .mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above { @@ -3754,28 +3754,28 @@ svg.mdc-button__icon { right: 36px; } .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above { - -webkit-transform: translatey(-37.25px) translatex(-32px) scale(1); - transform: translatey(-37.25px) translatex(-32px) scale(1); + -webkit-transform: translateY(-37.25px) translateX(-32px) scale(1); + transform: translateY(-37.25px) translateX(-32px) scale(1); } [dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above, .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl] { - -webkit-transform: translatey(-37.25px) translatex(32px) scale(1); - transform: translatey(-37.25px) translatex(32px) scale(1); + -webkit-transform: translateY(-37.25px) translateX(32px) scale(1); + transform: translateY(-37.25px) translateX(32px) scale(1); } .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above { font-size: 0.75rem; } .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above { - -webkit-transform: translatey(-34.75px) translatex(-32px) scale(0.75); - transform: translatey(-34.75px) translatex(-32px) scale(0.75); + -webkit-transform: translateY(-34.75px) translateX(-32px) scale(0.75); + transform: translateY(-34.75px) translateX(-32px) scale(0.75); } [dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above, [dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl], .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl] { - -webkit-transform: translatey(-34.75px) translatex(32px) scale(0.75); - transform: translatey(-34.75px) translatex(32px) scale(0.75); + -webkit-transform: translateY(-34.75px) translateX(32px) scale(0.75); + transform: translateY(-34.75px) translateX(32px) scale(0.75); } .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above { @@ -3787,46 +3787,46 @@ svg.mdc-button__icon { } @-webkit-keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px { 0% { - -webkit-transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); } } @keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px { 0% { - -webkit-transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); } } [dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon, @@ -3838,46 +3838,46 @@ svg.mdc-button__icon { } @-webkit-keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl { 0% { - -webkit-transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); } } @keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl { 0% { - -webkit-transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); } } .mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch { @@ -4568,16 +4568,16 @@ svg.mdc-button__icon { height: 36px; } .mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above { - -webkit-transform: translatey(-27.25px) scale(1); - transform: translatey(-27.25px) scale(1); + -webkit-transform: translateY(-27.25px) scale(1); + transform: translateY(-27.25px) scale(1); } .mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above { font-size: 0.75rem; } .mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above { - -webkit-transform: translatey(-24.75px) scale(0.75); - transform: translatey(-24.75px) scale(0.75); + -webkit-transform: translateY(-24.75px) scale(0.75); + transform: translateY(-24.75px) scale(0.75); } .mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above { @@ -4589,46 +4589,46 @@ svg.mdc-button__icon { } @-webkit-keyframes mdc-floating-label-shake-float-above-select-outlined-36px { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); } } @keyframes mdc-floating-label-shake-float-above-select-outlined-36px { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); } } .mdc-data-table__pagination-rows-per-page-select .mdc-select__dropdown-icon { @@ -5375,33 +5375,33 @@ svg.mdc-button__icon { pointer-events: none; } .mdc-drawer--animate { - -webkit-transform: translatex(-100%); - transform: translatex(-100%); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); } [dir=rtl] .mdc-drawer--animate, .mdc-drawer--animate[dir=rtl] { - -webkit-transform: translatex(100%); - transform: translatex(100%); + -webkit-transform: translateX(100%); + transform: translateX(100%); } .mdc-drawer--opening { - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); transition-duration: 250ms; } [dir=rtl] .mdc-drawer--opening, .mdc-drawer--opening[dir=rtl] { - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } .mdc-drawer--closing { - -webkit-transform: translatex(-100%); - transform: translatex(-100%); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); transition-duration: 200ms; } [dir=rtl] .mdc-drawer--closing, .mdc-drawer--closing[dir=rtl] { - -webkit-transform: translatex(100%); - transform: translatex(100%); + -webkit-transform: translateX(100%); + transform: translateX(100%); } .mdc-drawer__header { flex-shrink: 0; @@ -6944,350 +6944,350 @@ svg.mdc-button__icon { } @-webkit-keyframes mdc-linear-progress-primary-indeterminate-translate { 0% { - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 20% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 59.15% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(83.67142%); - transform: translatex(83.67142%); - -webkit-transform: translatex(var(--mdc-linear-progress-primary-half, 83.67142%)); - transform: translatex(var(--mdc-linear-progress-primary-half, 83.67142%)); + -webkit-transform: translateX(83.67142%); + transform: translateX(83.67142%); + -webkit-transform: translateX(var(--mdc-linear-progress-primary-half, 83.67142%)); + transform: translateX(var(--mdc-linear-progress-primary-half, 83.67142%)); } 100% { - -webkit-transform: translatex(200.611057%); - transform: translatex(200.611057%); - -webkit-transform: translatex(var(--mdc-linear-progress-primary-full, 200.611057%)); - transform: translatex(var(--mdc-linear-progress-primary-full, 200.611057%)); + -webkit-transform: translateX(200.611057%); + transform: translateX(200.611057%); + -webkit-transform: translateX(var(--mdc-linear-progress-primary-full, 200.611057%)); + transform: translateX(var(--mdc-linear-progress-primary-full, 200.611057%)); } } @keyframes mdc-linear-progress-primary-indeterminate-translate { 0% { - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 20% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 59.15% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(83.67142%); - transform: translatex(83.67142%); - -webkit-transform: translatex(var(--mdc-linear-progress-primary-half, 83.67142%)); - transform: translatex(var(--mdc-linear-progress-primary-half, 83.67142%)); + -webkit-transform: translateX(83.67142%); + transform: translateX(83.67142%); + -webkit-transform: translateX(var(--mdc-linear-progress-primary-half, 83.67142%)); + transform: translateX(var(--mdc-linear-progress-primary-half, 83.67142%)); } 100% { - -webkit-transform: translatex(200.611057%); - transform: translatex(200.611057%); - -webkit-transform: translatex(var(--mdc-linear-progress-primary-full, 200.611057%)); - transform: translatex(var(--mdc-linear-progress-primary-full, 200.611057%)); + -webkit-transform: translateX(200.611057%); + transform: translateX(200.611057%); + -webkit-transform: translateX(var(--mdc-linear-progress-primary-full, 200.611057%)); + transform: translateX(var(--mdc-linear-progress-primary-full, 200.611057%)); } } @-webkit-keyframes mdc-linear-progress-primary-indeterminate-scale { 0% { - -webkit-transform: scalex(0.08); - transform: scalex(0.08); + -webkit-transform: scaleX(0.08); + transform: scaleX(0.08); } 36.65% { -webkit-animation-timing-function: cubic-bezier(0.334731, 0.12482, 0.785844, 1); animation-timing-function: cubic-bezier(0.334731, 0.12482, 0.785844, 1); - -webkit-transform: scalex(0.08); - transform: scalex(0.08); + -webkit-transform: scaleX(0.08); + transform: scaleX(0.08); } 69.15% { -webkit-animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1); animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1); - -webkit-transform: scalex(0.661479); - transform: scalex(0.661479); + -webkit-transform: scaleX(0.661479); + transform: scaleX(0.661479); } 100% { - -webkit-transform: scalex(0.08); - transform: scalex(0.08); + -webkit-transform: scaleX(0.08); + transform: scaleX(0.08); } } @keyframes mdc-linear-progress-primary-indeterminate-scale { 0% { - -webkit-transform: scalex(0.08); - transform: scalex(0.08); + -webkit-transform: scaleX(0.08); + transform: scaleX(0.08); } 36.65% { -webkit-animation-timing-function: cubic-bezier(0.334731, 0.12482, 0.785844, 1); animation-timing-function: cubic-bezier(0.334731, 0.12482, 0.785844, 1); - -webkit-transform: scalex(0.08); - transform: scalex(0.08); + -webkit-transform: scaleX(0.08); + transform: scaleX(0.08); } 69.15% { -webkit-animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1); animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1); - -webkit-transform: scalex(0.661479); - transform: scalex(0.661479); + -webkit-transform: scaleX(0.661479); + transform: scaleX(0.661479); } 100% { - -webkit-transform: scalex(0.08); - transform: scalex(0.08); + -webkit-transform: scaleX(0.08); + transform: scaleX(0.08); } } @-webkit-keyframes mdc-linear-progress-secondary-indeterminate-translate { 0% { -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685); animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685); - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 25% { -webkit-animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712); animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712); - -webkit-transform: translatex(37.651913%); - transform: translatex(37.651913%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-quarter, 37.651913%)); - transform: translatex(var(--mdc-linear-progress-secondary-quarter, 37.651913%)); + -webkit-transform: translateX(37.651913%); + transform: translateX(37.651913%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-quarter, 37.651913%)); + transform: translateX(var(--mdc-linear-progress-secondary-quarter, 37.651913%)); } 48.35% { -webkit-animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026); animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026); - -webkit-transform: translatex(84.386165%); - transform: translatex(84.386165%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-half, 84.386165%)); - transform: translatex(var(--mdc-linear-progress-secondary-half, 84.386165%)); + -webkit-transform: translateX(84.386165%); + transform: translateX(84.386165%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-half, 84.386165%)); + transform: translateX(var(--mdc-linear-progress-secondary-half, 84.386165%)); } 100% { - -webkit-transform: translatex(160.277782%); - transform: translatex(160.277782%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-full, 160.277782%)); - transform: translatex(var(--mdc-linear-progress-secondary-full, 160.277782%)); + -webkit-transform: translateX(160.277782%); + transform: translateX(160.277782%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-full, 160.277782%)); + transform: translateX(var(--mdc-linear-progress-secondary-full, 160.277782%)); } } @keyframes mdc-linear-progress-secondary-indeterminate-translate { 0% { -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685); animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685); - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 25% { -webkit-animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712); animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712); - -webkit-transform: translatex(37.651913%); - transform: translatex(37.651913%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-quarter, 37.651913%)); - transform: translatex(var(--mdc-linear-progress-secondary-quarter, 37.651913%)); + -webkit-transform: translateX(37.651913%); + transform: translateX(37.651913%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-quarter, 37.651913%)); + transform: translateX(var(--mdc-linear-progress-secondary-quarter, 37.651913%)); } 48.35% { -webkit-animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026); animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026); - -webkit-transform: translatex(84.386165%); - transform: translatex(84.386165%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-half, 84.386165%)); - transform: translatex(var(--mdc-linear-progress-secondary-half, 84.386165%)); + -webkit-transform: translateX(84.386165%); + transform: translateX(84.386165%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-half, 84.386165%)); + transform: translateX(var(--mdc-linear-progress-secondary-half, 84.386165%)); } 100% { - -webkit-transform: translatex(160.277782%); - transform: translatex(160.277782%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-full, 160.277782%)); - transform: translatex(var(--mdc-linear-progress-secondary-full, 160.277782%)); + -webkit-transform: translateX(160.277782%); + transform: translateX(160.277782%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-full, 160.277782%)); + transform: translateX(var(--mdc-linear-progress-secondary-full, 160.277782%)); } } @-webkit-keyframes mdc-linear-progress-secondary-indeterminate-scale { 0% { -webkit-animation-timing-function: cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971); animation-timing-function: cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971); - -webkit-transform: scalex(0.08); - transform: scalex(0.08); + -webkit-transform: scaleX(0.08); + transform: scaleX(0.08); } 19.15% { -webkit-animation-timing-function: cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315); animation-timing-function: cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315); - -webkit-transform: scalex(0.457104); - transform: scalex(0.457104); + -webkit-transform: scaleX(0.457104); + transform: scaleX(0.457104); } 44.15% { -webkit-animation-timing-function: cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179); animation-timing-function: cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179); - -webkit-transform: scalex(0.72796); - transform: scalex(0.72796); + -webkit-transform: scaleX(0.72796); + transform: scaleX(0.72796); } 100% { - -webkit-transform: scalex(0.08); - transform: scalex(0.08); + -webkit-transform: scaleX(0.08); + transform: scaleX(0.08); } } @keyframes mdc-linear-progress-secondary-indeterminate-scale { 0% { -webkit-animation-timing-function: cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971); animation-timing-function: cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971); - -webkit-transform: scalex(0.08); - transform: scalex(0.08); + -webkit-transform: scaleX(0.08); + transform: scaleX(0.08); } 19.15% { -webkit-animation-timing-function: cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315); animation-timing-function: cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315); - -webkit-transform: scalex(0.457104); - transform: scalex(0.457104); + -webkit-transform: scaleX(0.457104); + transform: scaleX(0.457104); } 44.15% { -webkit-animation-timing-function: cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179); animation-timing-function: cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179); - -webkit-transform: scalex(0.72796); - transform: scalex(0.72796); + -webkit-transform: scaleX(0.72796); + transform: scaleX(0.72796); } 100% { - -webkit-transform: scalex(0.08); - transform: scalex(0.08); + -webkit-transform: scaleX(0.08); + transform: scaleX(0.08); } } @-webkit-keyframes mdc-linear-progress-buffering { from { - -webkit-transform: rotate(180deg) translatex(-10px); - transform: rotate(180deg) translatex(-10px); + -webkit-transform: rotate(180deg) translateX(-10px); + transform: rotate(180deg) translateX(-10px); } } @keyframes mdc-linear-progress-buffering { from { - -webkit-transform: rotate(180deg) translatex(-10px); - transform: rotate(180deg) translatex(-10px); + -webkit-transform: rotate(180deg) translateX(-10px); + transform: rotate(180deg) translateX(-10px); } } @-webkit-keyframes mdc-linear-progress-primary-indeterminate-translate-reverse { 0% { - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 20% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 59.15% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(-83.67142%); - transform: translatex(-83.67142%); - -webkit-transform: translatex(var(--mdc-linear-progress-primary-half-neg, -83.67142%)); - transform: translatex(var(--mdc-linear-progress-primary-half-neg, -83.67142%)); + -webkit-transform: translateX(-83.67142%); + transform: translateX(-83.67142%); + -webkit-transform: translateX(var(--mdc-linear-progress-primary-half-neg, -83.67142%)); + transform: translateX(var(--mdc-linear-progress-primary-half-neg, -83.67142%)); } 100% { - -webkit-transform: translatex(-200.611057%); - transform: translatex(-200.611057%); - -webkit-transform: translatex(var(--mdc-linear-progress-primary-full-neg, -200.611057%)); - transform: translatex(var(--mdc-linear-progress-primary-full-neg, -200.611057%)); + -webkit-transform: translateX(-200.611057%); + transform: translateX(-200.611057%); + -webkit-transform: translateX(var(--mdc-linear-progress-primary-full-neg, -200.611057%)); + transform: translateX(var(--mdc-linear-progress-primary-full-neg, -200.611057%)); } } @keyframes mdc-linear-progress-primary-indeterminate-translate-reverse { 0% { - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 20% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 59.15% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(-83.67142%); - transform: translatex(-83.67142%); - -webkit-transform: translatex(var(--mdc-linear-progress-primary-half-neg, -83.67142%)); - transform: translatex(var(--mdc-linear-progress-primary-half-neg, -83.67142%)); + -webkit-transform: translateX(-83.67142%); + transform: translateX(-83.67142%); + -webkit-transform: translateX(var(--mdc-linear-progress-primary-half-neg, -83.67142%)); + transform: translateX(var(--mdc-linear-progress-primary-half-neg, -83.67142%)); } 100% { - -webkit-transform: translatex(-200.611057%); - transform: translatex(-200.611057%); - -webkit-transform: translatex(var(--mdc-linear-progress-primary-full-neg, -200.611057%)); - transform: translatex(var(--mdc-linear-progress-primary-full-neg, -200.611057%)); + -webkit-transform: translateX(-200.611057%); + transform: translateX(-200.611057%); + -webkit-transform: translateX(var(--mdc-linear-progress-primary-full-neg, -200.611057%)); + transform: translateX(var(--mdc-linear-progress-primary-full-neg, -200.611057%)); } } @-webkit-keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse { 0% { -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685); animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685); - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 25% { -webkit-animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712); animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712); - -webkit-transform: translatex(-37.651913%); - transform: translatex(-37.651913%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%)); - transform: translatex(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%)); + -webkit-transform: translateX(-37.651913%); + transform: translateX(-37.651913%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%)); + transform: translateX(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%)); } 48.35% { -webkit-animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026); animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026); - -webkit-transform: translatex(-84.386165%); - transform: translatex(-84.386165%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-half-neg, -84.386165%)); - transform: translatex(var(--mdc-linear-progress-secondary-half-neg, -84.386165%)); + -webkit-transform: translateX(-84.386165%); + transform: translateX(-84.386165%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-half-neg, -84.386165%)); + transform: translateX(var(--mdc-linear-progress-secondary-half-neg, -84.386165%)); } 100% { - -webkit-transform: translatex(-160.277782%); - transform: translatex(-160.277782%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-full-neg, -160.277782%)); - transform: translatex(var(--mdc-linear-progress-secondary-full-neg, -160.277782%)); + -webkit-transform: translateX(-160.277782%); + transform: translateX(-160.277782%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-full-neg, -160.277782%)); + transform: translateX(var(--mdc-linear-progress-secondary-full-neg, -160.277782%)); } } @keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse { 0% { -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685); animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685); - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } 25% { -webkit-animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712); animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712); - -webkit-transform: translatex(-37.651913%); - transform: translatex(-37.651913%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%)); - transform: translatex(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%)); + -webkit-transform: translateX(-37.651913%); + transform: translateX(-37.651913%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%)); + transform: translateX(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%)); } 48.35% { -webkit-animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026); animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026); - -webkit-transform: translatex(-84.386165%); - transform: translatex(-84.386165%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-half-neg, -84.386165%)); - transform: translatex(var(--mdc-linear-progress-secondary-half-neg, -84.386165%)); + -webkit-transform: translateX(-84.386165%); + transform: translateX(-84.386165%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-half-neg, -84.386165%)); + transform: translateX(var(--mdc-linear-progress-secondary-half-neg, -84.386165%)); } 100% { - -webkit-transform: translatex(-160.277782%); - transform: translatex(-160.277782%); - -webkit-transform: translatex(var(--mdc-linear-progress-secondary-full-neg, -160.277782%)); - transform: translatex(var(--mdc-linear-progress-secondary-full-neg, -160.277782%)); + -webkit-transform: translateX(-160.277782%); + transform: translateX(-160.277782%); + -webkit-transform: translateX(var(--mdc-linear-progress-secondary-full-neg, -160.277782%)); + transform: translateX(var(--mdc-linear-progress-secondary-full-neg, -160.277782%)); } } @-webkit-keyframes mdc-linear-progress-buffering-reverse { from { - -webkit-transform: translatex(-10px); - transform: translatex(-10px); + -webkit-transform: translateX(-10px); + transform: translateX(-10px); } } @keyframes mdc-linear-progress-buffering-reverse { from { - -webkit-transform: translatex(-10px); - transform: translatex(-10px); + -webkit-transform: translateX(-10px); + transform: translateX(-10px); } } .mdc-linear-progress { position: relative; width: 100%; height: 4px; - -webkit-transform: translatez(0); - transform: translatez(0); + -webkit-transform: translateZ(0); + transform: translateZ(0); outline: 1px solid transparent; overflow: hidden; transition: opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1); @@ -7332,8 +7332,8 @@ svg.mdc-button__icon { transition: flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1); } .mdc-linear-progress__primary-bar { - -webkit-transform: scalex(0); - transform: scalex(0); + -webkit-transform: scaleX(0); + transform: scaleX(0); } .mdc-linear-progress__secondary-bar { display: none; @@ -10294,8 +10294,8 @@ a.mdc-list-item { display: none; position: absolute; top: 50%; - -webkit-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } [dir=rtl] .mdc-menu__selection-group .mdc-menu__selection-group-icon, .mdc-menu__selection-group .mdc-menu__selection-group-icon[dir=rtl] { @@ -10852,8 +10852,8 @@ a.mdc-list-item { height: 48px; left: 0; right: 0; - -webkit-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } .mdc-segmented-button__segment .mdc-segmented-button__segment--touch { margin-top: 0px; @@ -11088,8 +11088,8 @@ a.mdc-list-item { height: 4px; position: absolute; top: 50%; - -webkit-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + transform: translateY(-50%); width: 100%; } .mdc-slider .mdc-slider__track--active, @@ -11160,8 +11160,8 @@ a.mdc-list-item { left: 50%; pointer-events: none; position: absolute; - -webkit-transform: translatex(-50%); - transform: translatex(-50%); + -webkit-transform: translateX(-50%); + transform: translateX(-50%); } .mdc-slider .mdc-slider__value-indicator { transition: -webkit-transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1); @@ -11186,8 +11186,8 @@ a.mdc-list-item { height: 0; left: 50%; position: absolute; - -webkit-transform: translatex(-50%); - transform: translatex(-50%); + -webkit-transform: translateX(-50%); + transform: translateX(-50%); width: 0; } .mdc-slider .mdc-slider__value-indicator::after { @@ -11684,39 +11684,39 @@ a.mdc-list-item { transition: -webkit-transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1); transition: transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1); transition: transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1); - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } .mdc-switch__track::after { transition: -webkit-transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1); transition: transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1); transition: transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1), -webkit-transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1); - -webkit-transform: translatex(-100%); - transform: translatex(-100%); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); } [dir=rtl] .mdc-switch__track::after, .mdc-switch__track[dir=rtl]::after { - -webkit-transform: translatex(100%); - transform: translatex(100%); + -webkit-transform: translateX(100%); + transform: translateX(100%); } .mdc-switch--selected .mdc-switch__track::before { transition: -webkit-transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1); transition: transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1); transition: transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1), -webkit-transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1); - -webkit-transform: translatex(100%); - transform: translatex(100%); + -webkit-transform: translateX(100%); + transform: translateX(100%); } [dir=rtl] .mdc-switch--selected .mdc-switch__track::before, .mdc-switch--selected .mdc-switch__track[dir=rtl]::before { - -webkit-transform: translatex(-100%); - transform: translatex(-100%); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); } .mdc-switch--selected .mdc-switch__track::after { transition: -webkit-transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1); transition: transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1); transition: transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1), -webkit-transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1); - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } .mdc-switch__handle-track { height: 100%; @@ -11728,8 +11728,8 @@ a.mdc-list-item { transition: transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1); left: 0; right: auto; - -webkit-transform: translatex(0); - transform: translatex(0); + -webkit-transform: translateX(0); + transform: translateX(0); } [dir=rtl] .mdc-switch__handle-track, .mdc-switch__handle-track[dir=rtl] { @@ -11737,21 +11737,21 @@ a.mdc-list-item { right: 0; } .mdc-switch--selected .mdc-switch__handle-track { - -webkit-transform: translatex(100%); - transform: translatex(100%); + -webkit-transform: translateX(100%); + transform: translateX(100%); } [dir=rtl] .mdc-switch--selected .mdc-switch__handle-track, .mdc-switch--selected .mdc-switch__handle-track[dir=rtl] { - -webkit-transform: translatex(-100%); - transform: translatex(-100%); + -webkit-transform: translateX(-100%); + transform: translateX(-100%); } .mdc-switch__handle { display: flex; pointer-events: auto; position: absolute; top: 50%; - -webkit-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + transform: translateY(-50%); left: 0; right: auto; } @@ -12635,8 +12635,8 @@ a.mdc-list-item { } .mdc-text-field .mdc-floating-label { top: 50%; - -webkit-transform: translatey(-50%); - transform: translatey(-50%); + -webkit-transform: translateY(-50%); + transform: translateY(-50%); pointer-events: none; } .mdc-text-field__input { @@ -12855,8 +12855,8 @@ a.mdc-list-item { right: 16px; } .mdc-text-field--filled .mdc-floating-label--float-above { - -webkit-transform: translatey(-106%) scale(0.75); - transform: translatey(-106%) scale(0.75); + -webkit-transform: translateY(-106%) scale(0.75); + transform: translateY(-106%) scale(0.75); } .mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input { height: 100%; @@ -12880,16 +12880,16 @@ a.mdc-list-item { overflow: visible; } .mdc-text-field--outlined .mdc-floating-label--float-above { - -webkit-transform: translatey(-37.25px) scale(1); - transform: translatey(-37.25px) scale(1); + -webkit-transform: translateY(-37.25px) scale(1); + transform: translateY(-37.25px) scale(1); } .mdc-text-field--outlined .mdc-floating-label--float-above { font-size: 0.75rem; } .mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above { - -webkit-transform: translatey(-34.75px) scale(0.75); - transform: translatey(-34.75px) scale(0.75); + -webkit-transform: translateY(-34.75px) scale(0.75); + transform: translateY(-34.75px) scale(0.75); } .mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above { @@ -12901,46 +12901,46 @@ a.mdc-list-item { } @-webkit-keyframes mdc-floating-label-shake-float-above-text-field-outlined { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); } } @keyframes mdc-floating-label-shake-float-above-text-field-outlined { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75); } } .mdc-text-field--outlined .mdc-text-field__input { @@ -13120,8 +13120,8 @@ a.mdc-list-item { display: none; } .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above { - -webkit-transform: translatey(-10.25px) scale(0.75); - transform: translatey(-10.25px) scale(0.75); + -webkit-transform: translateY(-10.25px) scale(0.75); + transform: translateY(-10.25px) scale(0.75); } .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake { -webkit-animation: mdc-floating-label-shake-float-above-textarea-filled 250ms 1; @@ -13129,46 +13129,46 @@ a.mdc-list-item { } @-webkit-keyframes mdc-floating-label-shake-float-above-textarea-filled { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-10.25px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-10.25px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-10.25px) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-10.25px) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-10.25px) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-10.25px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-10.25px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-10.25px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75); } } @keyframes mdc-floating-label-shake-float-above-textarea-filled { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-10.25px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-10.25px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-10.25px) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-10.25px) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-10.25px) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-10.25px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-10.25px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-10.25px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75); } } .mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input { @@ -13183,16 +13183,16 @@ a.mdc-list-item { padding-top: 0; } .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above { - -webkit-transform: translatey(-27.25px) scale(1); - transform: translatey(-27.25px) scale(1); + -webkit-transform: translateY(-27.25px) scale(1); + transform: translateY(-27.25px) scale(1); } .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above { font-size: 0.75rem; } .mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above { - -webkit-transform: translatey(-24.75px) scale(0.75); - transform: translatey(-24.75px) scale(0.75); + -webkit-transform: translateY(-24.75px) scale(0.75); + transform: translateY(-24.75px) scale(0.75); } .mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above { @@ -13204,46 +13204,46 @@ a.mdc-list-item { } @-webkit-keyframes mdc-floating-label-shake-float-above-textarea-outlined { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); } } @keyframes mdc-floating-label-shake-float-above-textarea-outlined { 0% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(4% - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(-4% - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); - transform: translatex(calc(0 - 0%)) translatey(-24.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); + transform: translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75); } } .mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input { @@ -13287,34 +13287,34 @@ a.mdc-list-item { resize: both; } .mdc-text-field--filled .mdc-text-field__resizer { - -webkit-transform: translatey(-1px); - transform: translatey(-1px); + -webkit-transform: translateY(-1px); + transform: translateY(-1px); } .mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input, .mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter { - -webkit-transform: translatey(1px); - transform: translatey(1px); + -webkit-transform: translateY(1px); + transform: translateY(1px); } .mdc-text-field--outlined .mdc-text-field__resizer { - -webkit-transform: translatex(-1px) translatey(-1px); - transform: translatex(-1px) translatey(-1px); + -webkit-transform: translateX(-1px) translateY(-1px); + transform: translateX(-1px) translateY(-1px); } [dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer, .mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl] { - -webkit-transform: translatex(1px) translatey(-1px); - transform: translatex(1px) translatey(-1px); + -webkit-transform: translateX(1px) translateY(-1px); + transform: translateX(1px) translateY(-1px); } .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input, .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter { - -webkit-transform: translatex(1px) translatey(1px); - transform: translatex(1px) translatey(1px); + -webkit-transform: translateX(1px) translateY(1px); + transform: translateX(1px) translateY(1px); } [dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input, [dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter, .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl], .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl] { - -webkit-transform: translatex(-1px) translatey(1px); - transform: translatex(-1px) translatey(1px); + -webkit-transform: translateX(-1px) translateY(1px); + transform: translateX(-1px) translateY(1px); } .mdc-text-field--with-leading-icon { padding-left: 0; @@ -13351,28 +13351,28 @@ a.mdc-list-item { max-width: calc(100% - 60px); } .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above { - -webkit-transform: translatey(-37.25px) translatex(-32px) scale(1); - transform: translatey(-37.25px) translatex(-32px) scale(1); + -webkit-transform: translateY(-37.25px) translateX(-32px) scale(1); + transform: translateY(-37.25px) translateX(-32px) scale(1); } [dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above, .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl] { - -webkit-transform: translatey(-37.25px) translatex(32px) scale(1); - transform: translatey(-37.25px) translatex(32px) scale(1); + -webkit-transform: translateY(-37.25px) translateX(32px) scale(1); + transform: translateY(-37.25px) translateX(32px) scale(1); } .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above { font-size: 0.75rem; } .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above { - -webkit-transform: translatey(-34.75px) translatex(-32px) scale(0.75); - transform: translatey(-34.75px) translatex(-32px) scale(0.75); + -webkit-transform: translateY(-34.75px) translateX(-32px) scale(0.75); + transform: translateY(-34.75px) translateX(-32px) scale(0.75); } [dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above, [dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl], .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl] { - -webkit-transform: translatey(-34.75px) translatex(32px) scale(0.75); - transform: translatey(-34.75px) translatex(32px) scale(0.75); + -webkit-transform: translateY(-34.75px) translateX(32px) scale(0.75); + transform: translateY(-34.75px) translateX(32px) scale(0.75); } .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above, .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above { @@ -13384,46 +13384,46 @@ a.mdc-list-item { } @-webkit-keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon { 0% { - -webkit-transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); } } @keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon { 0% { - -webkit-transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - 32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75); } } [dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined, @@ -13435,46 +13435,46 @@ a.mdc-list-item { } @-webkit-keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl { 0% { - -webkit-transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); } } @keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl { 0% { - -webkit-transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); } 33% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819); - -webkit-transform: translatex(calc(4% - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(4% - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75); } 66% { -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352); - -webkit-transform: translatex(calc(-4% - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(-4% - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75); } 100% { - -webkit-transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); - transform: translatex(calc(0 - -32px)) translatey(-34.75px) scale(0.75); + -webkit-transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); + transform: translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75); } } .mdc-text-field--with-trailing-icon { @@ -14241,8 +14241,8 @@ a.mdc-list-item { position: absolute; height: 24px; width: 24px; - -webkit-transform: rotate(35deg) skewy(20deg) scalex(0.9396926208); - transform: rotate(35deg) skewy(20deg) scalex(0.9396926208); + -webkit-transform: rotate(35deg) skewY(20deg) scaleX(0.9396926208); + transform: rotate(35deg) skewY(20deg) scaleX(0.9396926208); } .mdc-tooltip__caret-surface-top .mdc-elevation-overlay, .mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay { diff --git a/crates/swc_css_codegen/tests/fixture/packages/pure_2_0_6/output.css b/crates/swc_css_codegen/tests/fixture/packages/pure_2_0_6/output.css index c9a3ff9ae2e..39e49a7b063 100644 --- a/crates/swc_css_codegen/tests/fixture/packages/pure_2_0_6/output.css +++ b/crates/swc_css_codegen/tests/fixture/packages/pure_2_0_6/output.css @@ -386,7 +386,7 @@ html { padding: 0.5em 1em; color: rgba(0, 0, 0, 0.80); border: none rgba(0, 0, 0, 0); - background-color: #e6e6e6; + background-color: #E6E6E6; text-decoration: none; border-radius: 2px; } @@ -498,17 +498,17 @@ a.pure-button-selected { .pure-form select:focus, .pure-form textarea:focus { outline: 0; - border-color: #129fea; + border-color: #129FEA; } .pure-form input:not([type]):focus { outline: 0; - border-color: #129fea; + border-color: #129FEA; } .pure-form input[type="file"]:focus, .pure-form input[type="radio"]:focus, .pure-form input[type="checkbox"]:focus { - outline: thin solid #129fea; - outline: 1px auto #129fea; + outline: thin solid #129FEA; + outline: 1px auto #129FEA; } .pure-form .pure-checkbox, .pure-form .pure-radio { diff --git a/crates/swc_css_codegen/tests/fixture/packages/pure_2_0_6/output.min.css b/crates/swc_css_codegen/tests/fixture/packages/pure_2_0_6/output.min.css index 2d68bb57acd..a615afec1e5 100644 --- a/crates/swc_css_codegen/tests/fixture/packages/pure_2_0_6/output.min.css +++ b/crates/swc_css_codegen/tests/fixture/packages/pure_2_0_6/output.min.css @@ -1 +1 @@ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html{font-family:sans-serif}.hidden,[hidden]{display:none!important}.pure-img{max-width:100%;height:auto;display:block}.pure-g{letter-spacing:-.31em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-line-pack:start;align-content:flex-start}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){table .pure-g{display:block}}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u{display:inline-block;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class*="pure-u"]{font-family:sans-serif}.pure-u-1,.pure-u-1-1,.pure-u-1-2,.pure-u-1-3,.pure-u-2-3,.pure-u-1-4,.pure-u-3-4,.pure-u-1-5,.pure-u-2-5,.pure-u-3-5,.pure-u-4-5,.pure-u-5-5,.pure-u-1-6,.pure-u-5-6,.pure-u-1-8,.pure-u-3-8,.pure-u-5-8,.pure-u-7-8,.pure-u-1-12,.pure-u-5-12,.pure-u-7-12,.pure-u-11-12,.pure-u-1-24,.pure-u-2-24,.pure-u-3-24,.pure-u-4-24,.pure-u-5-24,.pure-u-6-24,.pure-u-7-24,.pure-u-8-24,.pure-u-9-24,.pure-u-10-24,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24{display:inline-block;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1-24{width:4.1667%}.pure-u-1-12,.pure-u-2-24{width:8.3333%}.pure-u-1-8,.pure-u-3-24{width:12.5%}.pure-u-1-6,.pure-u-4-24{width:16.6667%}.pure-u-1-5{width:20%}.pure-u-5-24{width:20.8333%}.pure-u-1-4,.pure-u-6-24{width:25%}.pure-u-7-24{width:29.1667%}.pure-u-1-3,.pure-u-8-24{width:33.3333%}.pure-u-3-8,.pure-u-9-24{width:37.5%}.pure-u-2-5{width:40%}.pure-u-5-12,.pure-u-10-24{width:41.6667%}.pure-u-11-24{width:45.8333%}.pure-u-1-2,.pure-u-12-24{width:50%}.pure-u-13-24{width:54.1667%}.pure-u-7-12,.pure-u-14-24{width:58.3333%}.pure-u-3-5{width:60%}.pure-u-5-8,.pure-u-15-24{width:62.5%}.pure-u-2-3,.pure-u-16-24{width:66.6667%}.pure-u-17-24{width:70.8333%}.pure-u-3-4,.pure-u-18-24{width:75%}.pure-u-19-24{width:79.1667%}.pure-u-4-5{width:80%}.pure-u-5-6,.pure-u-20-24{width:83.3333%}.pure-u-7-8,.pure-u-21-24{width:87.5%}.pure-u-11-12,.pure-u-22-24{width:91.6667%}.pure-u-23-24{width:95.8333%}.pure-u-1,.pure-u-1-1,.pure-u-5-5,.pure-u-24-24{width:100%}.pure-button{display:inline-block;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-group{letter-spacing:-.31em;text-rendering:optimizespeed}.opera-only :-o-prefocus,.pure-button-group{word-spacing:-.43em}.pure-button-group .pure-button{letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-button{font-family:inherit;font-size:100%;padding:.5em 1em;color:rgba(0,0,0,.8);border:none rgba(0,0,0,0);background-color:#e6e6e6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:hover,.pure-button:focus{background-image:-webkit-gradient(linear,left top,left bottom,from(transparent),color-stop(40%,rgba(0,0,0,.05)),to(rgba(0,0,0,.1)));background-image:linear-gradient(transparent,rgba(0,0,0,.05)40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.15)inset,0 0 6px rgba(0,0,0,.2)inset;box-shadow:0 0 0 1px rgba(0,0,0,.15)inset,0 0 6px rgba(0,0,0,.2)inset;border-color:#000}.pure-button[disabled],.pure-button-disabled,.pure-button-disabled:hover,.pure-button-disabled:focus,.pure-button-disabled:active{border:none;background-image:none;opacity:.4;cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;pointer-events:none}.pure-button-hidden{display:none}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:rgb(0,120,231);color:#fff}.pure-button-group .pure-button{margin:0;border-radius:0;border-right:1px solid rgba(0,0,0,.2)}.pure-button-group .pure-button:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px}.pure-button-group .pure-button:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:none}.pure-form input[type="text"],.pure-form input[type="password"],.pure-form input[type="email"],.pure-form input[type="url"],.pure-form input[type="date"],.pure-form input[type="month"],.pure-form input[type="time"],.pure-form input[type="datetime"],.pure-form input[type="datetime-local"],.pure-form input[type="week"],.pure-form input[type="number"],.pure-form input[type="search"],.pure-form input[type="tel"],.pure-form input[type="color"],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid#ccc;-webkit-box-shadow:inset 0 1px 3px#ddd;box-shadow:inset 0 1px 3px#ddd;border-radius:4px;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.pure-form input:not([type]){padding:.5em .6em;display:inline-block;border:1px solid#ccc;-webkit-box-shadow:inset 0 1px 3px#ddd;box-shadow:inset 0 1px 3px#ddd;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.pure-form input[type="color"]{padding:.2em .5em}.pure-form input[type="text"]:focus,.pure-form input[type="password"]:focus,.pure-form input[type="email"]:focus,.pure-form input[type="url"]:focus,.pure-form input[type="date"]:focus,.pure-form input[type="month"]:focus,.pure-form input[type="time"]:focus,.pure-form input[type="datetime"]:focus,.pure-form input[type="datetime-local"]:focus,.pure-form input[type="week"]:focus,.pure-form input[type="number"]:focus,.pure-form input[type="search"]:focus,.pure-form input[type="tel"]:focus,.pure-form input[type="color"]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;border-color:#129fea}.pure-form input:not([type]):focus{outline:0;border-color:#129fea}.pure-form input[type="file"]:focus,.pure-form input[type="radio"]:focus,.pure-form input[type="checkbox"]:focus{outline:thin solid#129fea;outline:1px auto#129fea}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input[type="text"][disabled],.pure-form input[type="password"][disabled],.pure-form input[type="email"][disabled],.pure-form input[type="url"][disabled],.pure-form input[type="date"][disabled],.pure-form input[type="month"][disabled],.pure-form input[type="time"][disabled],.pure-form input[type="datetime"][disabled],.pure-form input[type="datetime-local"][disabled],.pure-form input[type="week"][disabled],.pure-form input[type="number"][disabled],.pure-form input[type="search"][disabled],.pure-form input[type="tel"][disabled],.pure-form input[type="color"][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input:not([type])[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly]{background-color:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form textarea:focus:invalid,.pure-form select:focus:invalid{color:#b94a48;border-color:#e9322d}.pure-form input[type="file"]:focus:invalid:focus,.pure-form input[type="radio"]:focus:invalid:focus,.pure-form input[type="checkbox"]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{height:2.25em;border:1px solid#ccc;background-color:white}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;color:#333;border-bottom:1px solid#e5e5e5}.pure-form-stacked input[type="text"],.pure-form-stacked input[type="password"],.pure-form-stacked input[type="email"],.pure-form-stacked input[type="url"],.pure-form-stacked input[type="date"],.pure-form-stacked input[type="month"],.pure-form-stacked input[type="time"],.pure-form-stacked input[type="datetime"],.pure-form-stacked input[type="datetime-local"],.pure-form-stacked input[type="week"],.pure-form-stacked input[type="number"],.pure-form-stacked input[type="search"],.pure-form-stacked input[type="tel"],.pure-form-stacked input[type="color"],.pure-form-stacked input[type="file"],.pure-form-stacked select,.pure-form-stacked label,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-stacked input:not([type]){display:block;margin:.25em 0}.pure-form-aligned input,.pure-form-aligned textarea,.pure-form-aligned select,.pure-form-message-inline{display:inline-block;vertical-align:middle}.pure-form-aligned textarea{vertical-align:top}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 11em}.pure-form input.pure-input-rounded,.pure-form .pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input,.pure-form .pure-group textarea{display:block;padding:10px;margin:0 0 -1px;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus,.pure-form .pure-group textarea:focus{z-index:3}.pure-form .pure-group input:first-child,.pure-form .pure-group textarea:first-child{top:1px;border-radius:4px 4px 0 0;margin:0}.pure-form .pure-group input:first-child:last-child,.pure-form .pure-group textarea:first-child:last-child{top:1px;border-radius:4px;margin:0}.pure-form .pure-group input:last-child,.pure-form .pure-group textarea:last-child{top:-2px;border-radius:0 0 4px 4px;margin:0}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-3-4{width:75%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:.875em}.pure-form-message{display:block;color:#666;font-size:.875em}@media only screen and (max-width:480px){.pure-form button[type="submit"]{margin:.7em 0 0}.pure-form input:not([type]),.pure-form input[type="text"],.pure-form input[type="password"],.pure-form input[type="email"],.pure-form input[type="url"],.pure-form input[type="date"],.pure-form input[type="month"],.pure-form input[type="time"],.pure-form input[type="datetime"],.pure-form input[type="datetime-local"],.pure-form input[type="week"],.pure-form input[type="number"],.pure-form input[type="search"],.pure-form input[type="tel"],.pure-form input[type="color"],.pure-form label{margin-bottom:.3em;display:block}.pure-group input:not([type]),.pure-group input[type="text"],.pure-group input[type="password"],.pure-group input[type="email"],.pure-group input[type="url"],.pure-group input[type="date"],.pure-group input[type="month"],.pure-group input[type="time"],.pure-group input[type="datetime"],.pure-group input[type="datetime-local"],.pure-group input[type="week"],.pure-group input[type="number"],.pure-group input[type="search"],.pure-group input[type="tel"],.pure-group input[type="color"]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0 0}.pure-form-message-inline,.pure-form-message{display:block;font-size:.75em;padding:.2em 0 .8em}}.pure-menu{-webkit-box-sizing:border-box;box-sizing:border-box}.pure-menu-fixed{position:fixed;left:0;top:0;z-index:3}.pure-menu-list,.pure-menu-item{position:relative}.pure-menu-list{list-style:none;margin:0;padding:0}.pure-menu-item{padding:0;margin:0;height:100%}.pure-menu-link,.pure-menu-heading{display:block;text-decoration:none;white-space:nowrap}.pure-menu-horizontal{width:100%;white-space:nowrap}.pure-menu-horizontal .pure-menu-list{display:inline-block}.pure-menu-horizontal .pure-menu-item,.pure-menu-horizontal .pure-menu-heading,.pure-menu-horizontal .pure-menu-separator{display:inline-block;vertical-align:middle}.pure-menu-item .pure-menu-item{display:block}.pure-menu-children{display:none;position:absolute;left:100%;top:0;margin:0;padding:0;z-index:3}.pure-menu-horizontal .pure-menu-children{left:0;top:auto;width:inherit}.pure-menu-allow-hover:hover>.pure-menu-children,.pure-menu-active>.pure-menu-children{display:block;position:absolute}.pure-menu-has-children>.pure-menu-link:after{padding-left:.5em;content:"▸";font-size:small}.pure-menu-horizontal .pure-menu-has-children>.pure-menu-link:after{content:"▾"}.pure-menu-scrollable{overflow-y:scroll;overflow-x:hidden}.pure-menu-scrollable .pure-menu-list{display:block}.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list{display:inline-block}.pure-menu-horizontal.pure-menu-scrollable{white-space:nowrap;overflow-y:hidden;overflow-x:auto;padding:.5em 0}.pure-menu-separator,.pure-menu-horizontal .pure-menu-children .pure-menu-separator{background-color:#ccc;height:1px;margin:.3em 0}.pure-menu-horizontal .pure-menu-separator{width:1px;height:1.3em;margin:0 .3em}.pure-menu-horizontal .pure-menu-children .pure-menu-separator{display:block;width:auto}.pure-menu-heading{text-transform:uppercase;color:#565d64}.pure-menu-link{color:#777}.pure-menu-children{background-color:#fff}.pure-menu-link,.pure-menu-heading{padding:.5em 1em}.pure-menu-disabled{opacity:.5}.pure-menu-disabled .pure-menu-link:hover{background-color:transparent;cursor:default}.pure-menu-active>.pure-menu-link,.pure-menu-link:hover,.pure-menu-link:focus{background-color:#eee}.pure-menu-selected>.pure-menu-link,.pure-menu-selected>.pure-menu-link:visited{color:#000}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid#cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid#cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td{background-color:#f2f2f2}.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid#cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px 0;border-bottom:1px solid#cbcbcb}.pure-table-horizontal tbody>tr:last-child>td{border-bottom-width:0} +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html{font-family:sans-serif}.hidden,[hidden]{display:none!important}.pure-img{max-width:100%;height:auto;display:block}.pure-g{letter-spacing:-.31em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-line-pack:start;align-content:flex-start}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){table .pure-g{display:block}}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u{display:inline-block;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class*="pure-u"]{font-family:sans-serif}.pure-u-1,.pure-u-1-1,.pure-u-1-2,.pure-u-1-3,.pure-u-2-3,.pure-u-1-4,.pure-u-3-4,.pure-u-1-5,.pure-u-2-5,.pure-u-3-5,.pure-u-4-5,.pure-u-5-5,.pure-u-1-6,.pure-u-5-6,.pure-u-1-8,.pure-u-3-8,.pure-u-5-8,.pure-u-7-8,.pure-u-1-12,.pure-u-5-12,.pure-u-7-12,.pure-u-11-12,.pure-u-1-24,.pure-u-2-24,.pure-u-3-24,.pure-u-4-24,.pure-u-5-24,.pure-u-6-24,.pure-u-7-24,.pure-u-8-24,.pure-u-9-24,.pure-u-10-24,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24{display:inline-block;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1-24{width:4.1667%}.pure-u-1-12,.pure-u-2-24{width:8.3333%}.pure-u-1-8,.pure-u-3-24{width:12.5%}.pure-u-1-6,.pure-u-4-24{width:16.6667%}.pure-u-1-5{width:20%}.pure-u-5-24{width:20.8333%}.pure-u-1-4,.pure-u-6-24{width:25%}.pure-u-7-24{width:29.1667%}.pure-u-1-3,.pure-u-8-24{width:33.3333%}.pure-u-3-8,.pure-u-9-24{width:37.5%}.pure-u-2-5{width:40%}.pure-u-5-12,.pure-u-10-24{width:41.6667%}.pure-u-11-24{width:45.8333%}.pure-u-1-2,.pure-u-12-24{width:50%}.pure-u-13-24{width:54.1667%}.pure-u-7-12,.pure-u-14-24{width:58.3333%}.pure-u-3-5{width:60%}.pure-u-5-8,.pure-u-15-24{width:62.5%}.pure-u-2-3,.pure-u-16-24{width:66.6667%}.pure-u-17-24{width:70.8333%}.pure-u-3-4,.pure-u-18-24{width:75%}.pure-u-19-24{width:79.1667%}.pure-u-4-5{width:80%}.pure-u-5-6,.pure-u-20-24{width:83.3333%}.pure-u-7-8,.pure-u-21-24{width:87.5%}.pure-u-11-12,.pure-u-22-24{width:91.6667%}.pure-u-23-24{width:95.8333%}.pure-u-1,.pure-u-1-1,.pure-u-5-5,.pure-u-24-24{width:100%}.pure-button{display:inline-block;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-group{letter-spacing:-.31em;text-rendering:optimizespeed}.opera-only :-o-prefocus,.pure-button-group{word-spacing:-.43em}.pure-button-group .pure-button{letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-button{font-family:inherit;font-size:100%;padding:.5em 1em;color:rgba(0,0,0,.8);border:none rgba(0,0,0,0);background-color:#E6E6E6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:hover,.pure-button:focus{background-image:-webkit-gradient(linear,left top,left bottom,from(transparent),color-stop(40%,rgba(0,0,0,.05)),to(rgba(0,0,0,.1)));background-image:linear-gradient(transparent,rgba(0,0,0,.05)40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.15)inset,0 0 6px rgba(0,0,0,.2)inset;box-shadow:0 0 0 1px rgba(0,0,0,.15)inset,0 0 6px rgba(0,0,0,.2)inset;border-color:#000}.pure-button[disabled],.pure-button-disabled,.pure-button-disabled:hover,.pure-button-disabled:focus,.pure-button-disabled:active{border:none;background-image:none;opacity:.4;cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;pointer-events:none}.pure-button-hidden{display:none}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:rgb(0,120,231);color:#fff}.pure-button-group .pure-button{margin:0;border-radius:0;border-right:1px solid rgba(0,0,0,.2)}.pure-button-group .pure-button:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px}.pure-button-group .pure-button:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:none}.pure-form input[type="text"],.pure-form input[type="password"],.pure-form input[type="email"],.pure-form input[type="url"],.pure-form input[type="date"],.pure-form input[type="month"],.pure-form input[type="time"],.pure-form input[type="datetime"],.pure-form input[type="datetime-local"],.pure-form input[type="week"],.pure-form input[type="number"],.pure-form input[type="search"],.pure-form input[type="tel"],.pure-form input[type="color"],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid#ccc;-webkit-box-shadow:inset 0 1px 3px#ddd;box-shadow:inset 0 1px 3px#ddd;border-radius:4px;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.pure-form input:not([type]){padding:.5em .6em;display:inline-block;border:1px solid#ccc;-webkit-box-shadow:inset 0 1px 3px#ddd;box-shadow:inset 0 1px 3px#ddd;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.pure-form input[type="color"]{padding:.2em .5em}.pure-form input[type="text"]:focus,.pure-form input[type="password"]:focus,.pure-form input[type="email"]:focus,.pure-form input[type="url"]:focus,.pure-form input[type="date"]:focus,.pure-form input[type="month"]:focus,.pure-form input[type="time"]:focus,.pure-form input[type="datetime"]:focus,.pure-form input[type="datetime-local"]:focus,.pure-form input[type="week"]:focus,.pure-form input[type="number"]:focus,.pure-form input[type="search"]:focus,.pure-form input[type="tel"]:focus,.pure-form input[type="color"]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;border-color:#129FEA}.pure-form input:not([type]):focus{outline:0;border-color:#129FEA}.pure-form input[type="file"]:focus,.pure-form input[type="radio"]:focus,.pure-form input[type="checkbox"]:focus{outline:thin solid#129FEA;outline:1px auto#129FEA}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input[type="text"][disabled],.pure-form input[type="password"][disabled],.pure-form input[type="email"][disabled],.pure-form input[type="url"][disabled],.pure-form input[type="date"][disabled],.pure-form input[type="month"][disabled],.pure-form input[type="time"][disabled],.pure-form input[type="datetime"][disabled],.pure-form input[type="datetime-local"][disabled],.pure-form input[type="week"][disabled],.pure-form input[type="number"][disabled],.pure-form input[type="search"][disabled],.pure-form input[type="tel"][disabled],.pure-form input[type="color"][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input:not([type])[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly]{background-color:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form textarea:focus:invalid,.pure-form select:focus:invalid{color:#b94a48;border-color:#e9322d}.pure-form input[type="file"]:focus:invalid:focus,.pure-form input[type="radio"]:focus:invalid:focus,.pure-form input[type="checkbox"]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{height:2.25em;border:1px solid#ccc;background-color:white}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;color:#333;border-bottom:1px solid#e5e5e5}.pure-form-stacked input[type="text"],.pure-form-stacked input[type="password"],.pure-form-stacked input[type="email"],.pure-form-stacked input[type="url"],.pure-form-stacked input[type="date"],.pure-form-stacked input[type="month"],.pure-form-stacked input[type="time"],.pure-form-stacked input[type="datetime"],.pure-form-stacked input[type="datetime-local"],.pure-form-stacked input[type="week"],.pure-form-stacked input[type="number"],.pure-form-stacked input[type="search"],.pure-form-stacked input[type="tel"],.pure-form-stacked input[type="color"],.pure-form-stacked input[type="file"],.pure-form-stacked select,.pure-form-stacked label,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-stacked input:not([type]){display:block;margin:.25em 0}.pure-form-aligned input,.pure-form-aligned textarea,.pure-form-aligned select,.pure-form-message-inline{display:inline-block;vertical-align:middle}.pure-form-aligned textarea{vertical-align:top}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 11em}.pure-form input.pure-input-rounded,.pure-form .pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input,.pure-form .pure-group textarea{display:block;padding:10px;margin:0 0 -1px;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus,.pure-form .pure-group textarea:focus{z-index:3}.pure-form .pure-group input:first-child,.pure-form .pure-group textarea:first-child{top:1px;border-radius:4px 4px 0 0;margin:0}.pure-form .pure-group input:first-child:last-child,.pure-form .pure-group textarea:first-child:last-child{top:1px;border-radius:4px;margin:0}.pure-form .pure-group input:last-child,.pure-form .pure-group textarea:last-child{top:-2px;border-radius:0 0 4px 4px;margin:0}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-3-4{width:75%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:.875em}.pure-form-message{display:block;color:#666;font-size:.875em}@media only screen and (max-width:480px){.pure-form button[type="submit"]{margin:.7em 0 0}.pure-form input:not([type]),.pure-form input[type="text"],.pure-form input[type="password"],.pure-form input[type="email"],.pure-form input[type="url"],.pure-form input[type="date"],.pure-form input[type="month"],.pure-form input[type="time"],.pure-form input[type="datetime"],.pure-form input[type="datetime-local"],.pure-form input[type="week"],.pure-form input[type="number"],.pure-form input[type="search"],.pure-form input[type="tel"],.pure-form input[type="color"],.pure-form label{margin-bottom:.3em;display:block}.pure-group input:not([type]),.pure-group input[type="text"],.pure-group input[type="password"],.pure-group input[type="email"],.pure-group input[type="url"],.pure-group input[type="date"],.pure-group input[type="month"],.pure-group input[type="time"],.pure-group input[type="datetime"],.pure-group input[type="datetime-local"],.pure-group input[type="week"],.pure-group input[type="number"],.pure-group input[type="search"],.pure-group input[type="tel"],.pure-group input[type="color"]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0 0}.pure-form-message-inline,.pure-form-message{display:block;font-size:.75em;padding:.2em 0 .8em}}.pure-menu{-webkit-box-sizing:border-box;box-sizing:border-box}.pure-menu-fixed{position:fixed;left:0;top:0;z-index:3}.pure-menu-list,.pure-menu-item{position:relative}.pure-menu-list{list-style:none;margin:0;padding:0}.pure-menu-item{padding:0;margin:0;height:100%}.pure-menu-link,.pure-menu-heading{display:block;text-decoration:none;white-space:nowrap}.pure-menu-horizontal{width:100%;white-space:nowrap}.pure-menu-horizontal .pure-menu-list{display:inline-block}.pure-menu-horizontal .pure-menu-item,.pure-menu-horizontal .pure-menu-heading,.pure-menu-horizontal .pure-menu-separator{display:inline-block;vertical-align:middle}.pure-menu-item .pure-menu-item{display:block}.pure-menu-children{display:none;position:absolute;left:100%;top:0;margin:0;padding:0;z-index:3}.pure-menu-horizontal .pure-menu-children{left:0;top:auto;width:inherit}.pure-menu-allow-hover:hover>.pure-menu-children,.pure-menu-active>.pure-menu-children{display:block;position:absolute}.pure-menu-has-children>.pure-menu-link:after{padding-left:.5em;content:"▸";font-size:small}.pure-menu-horizontal .pure-menu-has-children>.pure-menu-link:after{content:"▾"}.pure-menu-scrollable{overflow-y:scroll;overflow-x:hidden}.pure-menu-scrollable .pure-menu-list{display:block}.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list{display:inline-block}.pure-menu-horizontal.pure-menu-scrollable{white-space:nowrap;overflow-y:hidden;overflow-x:auto;padding:.5em 0}.pure-menu-separator,.pure-menu-horizontal .pure-menu-children .pure-menu-separator{background-color:#ccc;height:1px;margin:.3em 0}.pure-menu-horizontal .pure-menu-separator{width:1px;height:1.3em;margin:0 .3em}.pure-menu-horizontal .pure-menu-children .pure-menu-separator{display:block;width:auto}.pure-menu-heading{text-transform:uppercase;color:#565d64}.pure-menu-link{color:#777}.pure-menu-children{background-color:#fff}.pure-menu-link,.pure-menu-heading{padding:.5em 1em}.pure-menu-disabled{opacity:.5}.pure-menu-disabled .pure-menu-link:hover{background-color:transparent;cursor:default}.pure-menu-active>.pure-menu-link,.pure-menu-link:hover,.pure-menu-link:focus{background-color:#eee}.pure-menu-selected>.pure-menu-link,.pure-menu-selected>.pure-menu-link:visited{color:#000}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid#cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid#cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td{background-color:#f2f2f2}.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid#cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px 0;border-bottom:1px solid#cbcbcb}.pure-table-horizontal tbody>tr:last-child>td{border-bottom-width:0} diff --git a/crates/swc_css_codegen/tests/fixture/packages/tachyons_4_12_0/output.css b/crates/swc_css_codegen/tests/fixture/packages/tachyons_4_12_0/output.css index e23030248d7..7204487e370 100644 --- a/crates/swc_css_codegen/tests/fixture/packages/tachyons_4_12_0/output.css +++ b/crates/swc_css_codegen/tests/fixture/packages/tachyons_4_12_0/output.css @@ -2928,8 +2928,8 @@ code, -moz-osx-font-smoothing: grayscale; -webkit-backface-visibility: hidden; backface-visibility: hidden; - -webkit-transform: translatez(0); - transform: translatez(0); + -webkit-transform: translateZ(0); + transform: translateZ(0); transition: -webkit-transform .25s ease-out; transition: transform .25s ease-out; transition: transform .25s ease-out, -webkit-transform .25s ease-out; @@ -2947,8 +2947,8 @@ code, -moz-osx-font-smoothing: grayscale; -webkit-backface-visibility: hidden; backface-visibility: hidden; - -webkit-transform: translatez(0); - transform: translatez(0); + -webkit-transform: translateZ(0); + transform: translateZ(0); transition: -webkit-transform .25s ease-in-out; transition: transform .25s ease-in-out; transition: transform .25s ease-in-out, -webkit-transform .25s ease-in-out; diff --git a/crates/swc_css_codegen/tests/fixture/packages/tailwindcss/basic-usage/output.css b/crates/swc_css_codegen/tests/fixture/packages/tailwindcss/basic-usage/output.css index b1017c30295..6454a85a81b 100644 --- a/crates/swc_css_codegen/tests/fixture/packages/tailwindcss/basic-usage/output.css +++ b/crates/swc_css_codegen/tests/fixture/packages/tailwindcss/basic-usage/output.css @@ -257,46 +257,46 @@ } .translate-x-5 { --tw-translate-x: 1.25rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .-translate-x-4 { --tw-translate-x: -1rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .translate-y-6 { --tw-translate-y: 1.5rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .-translate-x-3 { --tw-translate-x: -0.75rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .rotate-3 { --tw-rotate: 3deg; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .skew-y-12 { --tw-skew-y: 12deg; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .skew-x-12 { --tw-skew-x: 12deg; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .scale-95 { --tw-scale-x: 0.95; --tw-scale-y: 0.95; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .-scale-x-100 { --tw-scale-x: -1; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .transform { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .transform-gpu { - transform: translate3d(var(--tw-translate-x), var(--tw-translate-y), 0) rotate(var(--tw-rotate)) skewx(var(--tw-skew-x)) skewy(var(--tw-skew-y)) scalex(var(--tw-scale-x)) scaley(var(--tw-scale-y)); + transform: translate3d(var(--tw-translate-x), var(--tw-translate-y), 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .transform-none { transform: none; diff --git a/crates/swc_css_codegen/tests/fixture/selectors/attribute/1/output.css b/crates/swc_css_codegen/tests/fixture/selectors/attribute/1/output.css index b9fd61f0ef3..61f3eef0474 100644 --- a/crates/swc_css_codegen/tests/fixture/selectors/attribute/1/output.css +++ b/crates/swc_css_codegen/tests/fixture/selectors/attribute/1/output.css @@ -9,9 +9,9 @@ [href$=".org"] {} [href*="example"] {} [href*="insensitive" i] {} -[href*="insensitive" i] {} -[href*="cAsE" s] {} +[href*="insensitive" I] {} [href*="cAsE" s] {} +[href*="cAsE" S] {} [foo|att=val] {} [*|att] {} [*|att] {} @@ -31,5 +31,5 @@ a[class="test"] {} [🐈] {} [🐈=🐈] {} [🐈|🐈=🐈] {} -[frame=hsides i] {} -[href*="cAsE" s] {} +[frame=hsides I] {} +[href*="cAsE" S] {} diff --git a/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/an_plus_b/output.css b/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/an_plus_b/output.css index ea2bd6684b7..97867137d00 100644 --- a/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/an_plus_b/output.css +++ b/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/an_plus_b/output.css @@ -79,7 +79,7 @@ p:nth-child(-n+1) { p:nth-child(even) { color: blue; } -p:nth-child(even) { +p:nth-child(EVEN) { color: blue; } p:nth-child(2n) { diff --git a/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/an_plus_b/output.min.css b/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/an_plus_b/output.min.css index 7b67be3688f..3111571f7a6 100644 --- a/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/an_plus_b/output.min.css +++ b/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/an_plus_b/output.min.css @@ -1 +1 @@ -p:nth-child(1){color:blue}p:nth-child(7){color:blue}p:nth-child(5n){color:blue}p:nth-child(n+7){color:blue}p:nth-child(3n+4){color:blue}p:nth-child(3n+4){color:blue}p:nth-child(-n+3){color:blue}p:nth-child(-n+3){color:blue}p:nth-child(n){color:blue}p:nth-child(n){color:blue}p:nth-child(-n){color:blue}p:nth-child(1){color:blue}p:nth-child(2n+1){color:blue}p:nth-child(2n+1){color:blue}p:nth-child(2n+1){color:blue}p:nth-child(-2n+1){color:blue}p:nth-child(2n+1){color:blue}p:nth-child(n+1){color:blue}p:nth-child(n+1){color:blue}p:nth-child(-n+1){color:blue}p:nth-child(0n+3){color:blue}p:nth-child(0n+3){color:blue}p:nth-child(0n+3){color:blue}p:nth-child(n+1){color:blue}p:nth-child(n+1){color:blue}p:nth-child(-n+1){color:blue}p:nth-child(even){color:blue}p:nth-child(even){color:blue}p:nth-child(2n){color:blue}p:nth-child(1){color:blue}p:nth-child(0n+1){color:blue}p:nth-child(0n+1){color:blue}p:nth-child(0n+1){color:blue}p:nth-child(0n+5){color:blue}p:nth-child(0n-5){color:blue}p:nth-child(-n+3){color:blue}p:nth-child(n+3){color:blue}p:nth-child(n+3){color:blue}p:nth-child(n+3){color:blue}p:nth-child(-n+3){color:blue}p:nth-child(n+3){color:blue}p:nth-child(n-3){color:blue}p:nth-child(0n-3){color:blue}p:nth-child(0n+3){color:blue}p:nth-child(0n-3){color:blue}p:nth-child(0n-3){color:blue}p:nth-child(n+0){color:blue}p:nth-child(n+0){color:blue}p:nth-child(-n+0){color:blue}p:nth-child(5n+0){color:blue}p:nth-child(-5n+0){color:blue}p:nth-child(5n+0){color:blue}p:nth-child(-2n+1){color:blue}p:nth-of-type(2n+1){color:blue}p:nth-last-col(2n+1){color:blue}p:nth-col(2n+1){color:blue}p:nth-child(n+0){color:blue}p:nth-child(n+0){color:blue}p:nth-child(5){color:blue}p:nth-child(5){color:blue}p:nth-child(-5){color:blue} +p:nth-child(1){color:blue}p:nth-child(7){color:blue}p:nth-child(5n){color:blue}p:nth-child(n+7){color:blue}p:nth-child(3n+4){color:blue}p:nth-child(3n+4){color:blue}p:nth-child(-n+3){color:blue}p:nth-child(-n+3){color:blue}p:nth-child(n){color:blue}p:nth-child(n){color:blue}p:nth-child(-n){color:blue}p:nth-child(1){color:blue}p:nth-child(2n+1){color:blue}p:nth-child(2n+1){color:blue}p:nth-child(2n+1){color:blue}p:nth-child(-2n+1){color:blue}p:nth-child(2n+1){color:blue}p:nth-child(n+1){color:blue}p:nth-child(n+1){color:blue}p:nth-child(-n+1){color:blue}p:nth-child(0n+3){color:blue}p:nth-child(0n+3){color:blue}p:nth-child(0n+3){color:blue}p:nth-child(n+1){color:blue}p:nth-child(n+1){color:blue}p:nth-child(-n+1){color:blue}p:nth-child(even){color:blue}p:nth-child(EVEN){color:blue}p:nth-child(2n){color:blue}p:nth-child(1){color:blue}p:nth-child(0n+1){color:blue}p:nth-child(0n+1){color:blue}p:nth-child(0n+1){color:blue}p:nth-child(0n+5){color:blue}p:nth-child(0n-5){color:blue}p:nth-child(-n+3){color:blue}p:nth-child(n+3){color:blue}p:nth-child(n+3){color:blue}p:nth-child(n+3){color:blue}p:nth-child(-n+3){color:blue}p:nth-child(n+3){color:blue}p:nth-child(n-3){color:blue}p:nth-child(0n-3){color:blue}p:nth-child(0n+3){color:blue}p:nth-child(0n-3){color:blue}p:nth-child(0n-3){color:blue}p:nth-child(n+0){color:blue}p:nth-child(n+0){color:blue}p:nth-child(-n+0){color:blue}p:nth-child(5n+0){color:blue}p:nth-child(-5n+0){color:blue}p:nth-child(5n+0){color:blue}p:nth-child(-2n+1){color:blue}p:nth-of-type(2n+1){color:blue}p:nth-last-col(2n+1){color:blue}p:nth-col(2n+1){color:blue}p:nth-child(n+0){color:blue}p:nth-child(n+0){color:blue}p:nth-child(5){color:blue}p:nth-child(5){color:blue}p:nth-child(-5){color:blue} diff --git a/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/has/output.css b/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/has/output.css index cb38129c046..79e19aee81c 100644 --- a/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/has/output.css +++ b/crates/swc_css_codegen/tests/fixture/selectors/pseudo-class/has/output.css @@ -15,6 +15,6 @@ a:has( <> img, > img) {} a:has(> img, <> img) {} a:has(> img, <> img ) {} a:has(> img, <> img , > img) {} -a:has(> img) { - color: RED; +A:has(> IMG) { + COLOR: RED; } diff --git a/crates/swc_css_codegen/tests/fixture/selectors/type/output.css b/crates/swc_css_codegen/tests/fixture/selectors/type/output.css index 978603bd9ea..f34c47c9f31 100644 --- a/crates/swc_css_codegen/tests/fixture/selectors/type/output.css +++ b/crates/swc_css_codegen/tests/fixture/selectors/type/output.css @@ -4,7 +4,7 @@ foo|* {} |h1 {} *|h1 {} h1 {} -body {} -html {} -td {} -template {} +BODY {} +HTML {} +TD {} +TEMPLATE {} diff --git a/crates/swc_css_codegen/tests/fixture/style-blocks-contents/hacks/output.css b/crates/swc_css_codegen/tests/fixture/style-blocks-contents/hacks/output.css index e6e693a97d9..9e0b006bcb1 100644 --- a/crates/swc_css_codegen/tests/fixture/style-blocks-contents/hacks/output.css +++ b/crates/swc_css_codegen/tests/fixture/style-blocks-contents/hacks/output.css @@ -51,7 +51,7 @@ _::selection, html > body .selector {} *:first-child + html .selector {} .selector, -x:-ie7 {} +x:-IE7 {} * + html .selector {} body *.selector {} .selector\ {} diff --git a/crates/swc_css_codegen/tests/fixture/values/color/hex-color/output.css b/crates/swc_css_codegen/tests/fixture/values/color/hex-color/output.css index 0ea2d0a6158..640ab64953a 100644 --- a/crates/swc_css_codegen/tests/fixture/values/color/hex-color/output.css +++ b/crates/swc_css_codegen/tests/fixture/values/color/hex-color/output.css @@ -1,8 +1,8 @@ div { color: #fff; color: #ffffff; - color: #fff; - color: #ffffff; + color: #FFF; + color: #FFFFFF; color: #dc143c; color: #ff0000; color: #ff0000ff; @@ -22,6 +22,6 @@ div { border: thick double #32a1ce; } .bar { - color: #123abcff; - color: #123f; + color: #123abcFF; + color: #123F; } diff --git a/crates/swc_css_codegen/tests/fixture/values/color/hex-color/output.min.css b/crates/swc_css_codegen/tests/fixture/values/color/hex-color/output.min.css index 381432f81ad..ef4a53893de 100644 --- a/crates/swc_css_codegen/tests/fixture/values/color/hex-color/output.min.css +++ b/crates/swc_css_codegen/tests/fixture/values/color/hex-color/output.min.css @@ -1 +1 @@ -div{color:#fff;color:#fff;color:#fff;color:#fff;color:#dc143c;color:#f00;color:#f00;color:#f09;color:#f09;color:#0f38;color:#0f38;color:#0a0a0a;color:#0a0a0afa}div{background:url("starsolid.gif")#99f repeat-y fixed;background:url("starsolid.gif")repeat-y fixed#99f;background:url("starsolid.gif")repeat-y 12#99f}.foo{border:thick double#32a1ce}.bar{color:#123abcff;color:#123f} +div{color:#fff;color:#fff;color:#FFF;color:#FFF;color:#dc143c;color:#f00;color:#f00;color:#f09;color:#f09;color:#0f38;color:#0f38;color:#0a0a0a;color:#0a0a0afa}div{background:url("starsolid.gif")#99f repeat-y fixed;background:url("starsolid.gif")repeat-y fixed#99f;background:url("starsolid.gif")repeat-y 12#99f}.foo{border:thick double#32a1ce}.bar{color:#123abcFF;color:#123F} diff --git a/crates/swc_css_codegen/tests/fixture/values/dimension/output.css b/crates/swc_css_codegen/tests/fixture/values/dimension/output.css index 9c0010fc375..6d45fb383bf 100644 --- a/crates/swc_css_codegen/tests/fixture/values/dimension/output.css +++ b/crates/swc_css_codegen/tests/fixture/values/dimension/output.css @@ -11,8 +11,8 @@ div { width: 0.00254cm; } .foo { - width: 100px; - transform: rotate(45deg); + width: 100PX; + TRANSFORM: ROTATE(45DEG); } a { width: 10e\30px; diff --git a/crates/swc_css_codegen/tests/fixture/values/url/1/output.css b/crates/swc_css_codegen/tests/fixture/values/url/1/output.css index 8b4cf4bc583..e6f7b55f3c3 100644 --- a/crates/swc_css_codegen/tests/fixture/values/url/1/output.css +++ b/crates/swc_css_codegen/tests/fixture/values/url/1/output.css @@ -4,8 +4,8 @@ div { background: url(https://example.com/image.png); background: url("https://example.com/image.png"); background: url('https://example.com/image.png'); - background: url('https://example.com/image.png'); - background: url('https://example.com/image.png'); + background: URL('https://example.com/image.png'); + background: URL('https://example.com/image.png'); background: url(data:image/png;base64,iRxVB0); background: url(#IDofSVGpath); background: url("//aa.com/img.svg" prefetch); @@ -16,7 +16,7 @@ div { background: url(''); --foo: "http://www.example.com/pinkish.gif"; background: src("http://www.example.com/pinkish.gif"); - background: src("http://www.example.com/pinkish.gif"); + background: SRC("http://www.example.com/pinkish.gif"); background: src(var(--foo)); background: url(https://example.com/image.png); background: url(https://example.com/image.png); diff --git a/crates/swc_css_compat/src/compiler/color_alpha_parameter.rs b/crates/swc_css_compat/src/compiler/color_alpha_parameter.rs index 3fbc7f9b99a..762fe7e5527 100644 --- a/crates/swc_css_compat/src/compiler/color_alpha_parameter.rs +++ b/crates/swc_css_compat/src/compiler/color_alpha_parameter.rs @@ -15,10 +15,10 @@ impl Compiler { } }; - if name.value == "rgb" { + if name.value.eq_ignore_ascii_case("rgb") { name.value = "rgba".into(); name.raw = None; - } else if name.value == "hsl" { + } else if name.value.eq_ignore_ascii_case("hsl") { name.value = "hsla".into(); name.raw = None; } @@ -30,10 +30,10 @@ impl Compiler { } }; - if name.value == "rgba" { + if name.value.eq_ignore_ascii_case("rgba") { name.value = "rgb".into(); name.raw = None; - } else if name.value == "hsla" { + } else if name.value.eq_ignore_ascii_case("hsla") { name.value = "hsl".into(); name.raw = None; } diff --git a/crates/swc_css_compat/src/compiler/color_hex_alpha.rs b/crates/swc_css_compat/src/compiler/color_hex_alpha.rs index 399b8954022..47d3a63a582 100644 --- a/crates/swc_css_compat/src/compiler/color_hex_alpha.rs +++ b/crates/swc_css_compat/src/compiler/color_hex_alpha.rs @@ -27,6 +27,9 @@ impl Compiler { .and_then(|color| color.as_mut_absolute_color_base()) .and_then(|color| color.as_mut_hex_color()) { + hex_color.value = hex_color.value.to_ascii_lowercase(); + hex_color.raw = None; + if hex_color.value.len() != 4 && hex_color.value.len() != 8 { return; } diff --git a/crates/swc_css_compat/src/compiler/color_space_separated_parameters.rs b/crates/swc_css_compat/src/compiler/color_space_separated_parameters.rs index 39067632167..02cfb3e4670 100644 --- a/crates/swc_css_compat/src/compiler/color_space_separated_parameters.rs +++ b/crates/swc_css_compat/src/compiler/color_space_separated_parameters.rs @@ -1,7 +1,9 @@ use std::mem::take; use swc_common::DUMMY_SP; -use swc_css_ast::{matches_eq, AbsoluteColorBase, ComponentValue, Delimiter, DelimiterValue}; +use swc_css_ast::{ + matches_eq_ignore_ascii_case, AbsoluteColorBase, ComponentValue, Delimiter, DelimiterValue, +}; use crate::compiler::Compiler; @@ -11,7 +13,8 @@ impl Compiler { n: &mut AbsoluteColorBase, ) { if let AbsoluteColorBase::Function(function) = n { - if !matches_eq!(function.name, "rgb", "rgba", "hsl", "hsla") { + if !matches_eq_ignore_ascii_case!(function.name.as_str(), "rgb", "rgba", "hsl", "hsla") + { return; } diff --git a/crates/swc_css_compat/src/compiler/custom_media.rs b/crates/swc_css_compat/src/compiler/custom_media.rs index 5fb74cec30d..c33e2a34f96 100644 --- a/crates/swc_css_compat/src/compiler/custom_media.rs +++ b/crates/swc_css_compat/src/compiler/custom_media.rs @@ -16,13 +16,10 @@ pub(super) struct CustomMediaHandler { impl CustomMediaHandler { pub(crate) fn store_custom_media(&mut self, n: &mut AtRule) { - if let AtRuleName::Ident(name) = &n.name { - if name.value == "custom-media" { - if let Some(AtRulePrelude::CustomMediaPrelude(prelude)) = - &mut n.prelude.as_deref_mut() - { - self.medias.push(prelude.take()); - } + if let AtRuleName::Ident(..) = &n.name { + if let Some(AtRulePrelude::CustomMediaPrelude(prelude)) = &mut n.prelude.as_deref_mut() + { + self.medias.push(prelude.take()); } } } @@ -30,7 +27,10 @@ impl CustomMediaHandler { pub(crate) fn process_rules(&mut self, n: &mut Vec) { n.retain(|n| match n { Rule::AtRule(n) => { - if matches!(&n.name, AtRuleName::Ident(ident) if ident.value == "custom-media") { + if matches!( + n.prelude.as_deref(), + Some(AtRulePrelude::CustomMediaPrelude(..)) + ) { return false; } diff --git a/crates/swc_css_compat/src/compiler/legacy_rgb_and_hsl.rs b/crates/swc_css_compat/src/compiler/legacy_rgb_and_hsl.rs index 872520ef57c..697fa5594ed 100644 --- a/crates/swc_css_compat/src/compiler/legacy_rgb_and_hsl.rs +++ b/crates/swc_css_compat/src/compiler/legacy_rgb_and_hsl.rs @@ -1,7 +1,8 @@ use std::f64::consts::PI; use swc_css_ast::{ - matches_eq, AbsoluteColorBase, AlphaValue, Angle, ComponentValue, Number, Percentage, + matches_eq_ignore_ascii_case, AbsoluteColorBase, AlphaValue, Angle, ComponentValue, Number, + Percentage, }; use swc_css_utils::{clamp_unit_f64, round_alpha}; @@ -10,8 +11,8 @@ use crate::compiler::Compiler; impl Compiler { pub(crate) fn process_rgb_and_hsl(&mut self, n: &mut AbsoluteColorBase) { if let AbsoluteColorBase::Function(function) = n { - let is_rgb = matches_eq!(function.name, "rgb", "rgba"); - let is_hsl = matches_eq!(function.name, "hsl", "hsla"); + let is_rgb = matches_eq_ignore_ascii_case!(function.name.as_str(), "rgb", "rgba"); + let is_hsl = matches_eq_ignore_ascii_case!(function.name.as_str(), "hsl", "hsla"); if is_rgb { function.value = function diff --git a/crates/swc_css_compat/tests/all/transform-lowercase/input.css b/crates/swc_css_compat/tests/all/transform-lowercase/input.css new file mode 100644 index 00000000000..95cae69b3fd --- /dev/null +++ b/crates/swc_css_compat/tests/all/transform-lowercase/input.css @@ -0,0 +1,3 @@ +body { + transform: translateY(-50%); +} diff --git a/crates/swc_css_compat/tests/all/transform-lowercase/input.expect.css b/crates/swc_css_compat/tests/all/transform-lowercase/input.expect.css new file mode 100644 index 00000000000..dbb2383ff44 --- /dev/null +++ b/crates/swc_css_compat/tests/all/transform-lowercase/input.expect.css @@ -0,0 +1,3 @@ +body { + transform: translateY(-50%); +} diff --git a/crates/swc_css_compat/tests/color-legacy/input.expect.css b/crates/swc_css_compat/tests/color-legacy/input.expect.css index e417fa36551..49cdb8cf1b8 100644 --- a/crates/swc_css_compat/tests/color-legacy/input.expect.css +++ b/crates/swc_css_compat/tests/color-legacy/input.expect.css @@ -9,10 +9,10 @@ } .test-rgba { color: rgb(178, 34, 34); - color: rgba(178, 34, 34, 1); + color: rgbA(178, 34, 34, 1); color: rgba(178, 34, 34, .5); - color: rgba(178, 34, 34, var(--alpha-50)); - color: rgba(178, 34, 34, calc(1 / 2)); + color: rgba(178, 34, 34, VaR(--alpha-50)); + color: rgba(178, 34, 34, CaLC(1 / 2)); } .test-rgb-percentages { color: rgb(179, 34, 34); @@ -79,7 +79,7 @@ .test-ignore { color: rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.2); - color: rgb(178, 34, 34); + color: rGB(178, 34, 34); } .order-0 { order: rgba(178, 34, 34, 1) !important; diff --git a/crates/swc_css_compat/tests/fixture.rs b/crates/swc_css_compat/tests/fixture.rs index 87a2264bd69..c4eb6d2badb 100644 --- a/crates/swc_css_compat/tests/fixture.rs +++ b/crates/swc_css_compat/tests/fixture.rs @@ -202,3 +202,24 @@ fn test_color_hwb(input: PathBuf) { }) .unwrap(); } + +#[testing::fixture("tests/all/**/*.css", exclude("expect.css"))] +fn test_all(input: PathBuf) { + let output = input.with_extension("expect.css"); + + testing::run_test(false, |cm, _| { + let fm = cm.load_file(&input).unwrap(); + let mut ss = parse_stylesheet(&fm); + + ss.visit_mut_with(&mut Compiler::new(Config { + process: Features::all(), + })); + + let s = print_stylesheet(&ss); + + NormalizedOutput::from(s).compare_to_file(&output).unwrap(); + + Ok(()) + }) + .unwrap(); +} diff --git a/crates/swc_css_compat/tests/selector-not/input.expect.css b/crates/swc_css_compat/tests/selector-not/input.expect.css index 19cac683b14..4909dfac3ff 100644 --- a/crates/swc_css_compat/tests/selector-not/input.expect.css +++ b/crates/swc_css_compat/tests/selector-not/input.expect.css @@ -2,7 +2,7 @@ body { order: 1; } body, -not { +Not { order: 2; } em[attr=:not], diff --git a/crates/swc_css_lints/tests/rules/fail/color-hex-length/long/output.swc-stderr b/crates/swc_css_lints/tests/rules/fail/color-hex-length/long/output.swc-stderr index 4c30ce05bf6..5804d42edbc 100644 --- a/crates/swc_css_lints/tests/rules/fail/color-hex-length/long/output.swc-stderr +++ b/crates/swc_css_lints/tests/rules/fail/color-hex-length/long/output.swc-stderr @@ -1,5 +1,5 @@ - x Hex color value '#fff' should be written into: '#ffffff'. + x Hex color value '#FFF' should be written into: '#FFFFFF'. ,-[$DIR/tests/rules/fail/color-hex-length/long/input.css:1:1] 1 | a { 2 | color: #FFF; diff --git a/crates/swc_css_lints/tests/rules/fail/color-hex-length/short/output.swc-stderr b/crates/swc_css_lints/tests/rules/fail/color-hex-length/short/output.swc-stderr index e9eaf62194f..a38e684fc91 100644 --- a/crates/swc_css_lints/tests/rules/fail/color-hex-length/short/output.swc-stderr +++ b/crates/swc_css_lints/tests/rules/fail/color-hex-length/short/output.swc-stderr @@ -1,5 +1,5 @@ - x Hex color value '#ffffff' should be written into: '#fff'. + x Hex color value '#FFFFFF' should be written into: '#FFF'. ,-[$DIR/tests/rules/fail/color-hex-length/short/input.css:1:1] 1 | a { 2 | color: #FFFFFF; diff --git a/crates/swc_css_minifier/src/compressor/declaration.rs b/crates/swc_css_minifier/src/compressor/declaration.rs index 908f751932b..315779f9280 100644 --- a/crates/swc_css_minifier/src/compressor/declaration.rs +++ b/crates/swc_css_minifier/src/compressor/declaration.rs @@ -5,7 +5,9 @@ use super::Compressor; impl Compressor { pub(super) fn compress_declaration(&self, declaration: &mut Declaration) { - if let DeclarationName::Ident(Ident { value: name, .. }) = &declaration.name { + if let DeclarationName::Ident(Ident { value: name, .. }) = &mut declaration.name { + *name = name.to_ascii_lowercase(); + match &**name { "display" if declaration.value.len() > 1 => { let mut outside = None; @@ -484,15 +486,19 @@ impl Compressor { match (node_1, node_2) { (ComponentValue::Dimension(dimension_1), ComponentValue::Dimension(dimension_2)) => { - let result_1 = dimension_1 - .as_length() - .map(|length| (&length.value.value, &length.unit.value)); + let Some(result_1) = dimension_1.as_length() else { + return false; + }; - let result_2 = dimension_2 - .as_length() - .map(|length| (&length.value.value, &length.unit.value)); + let Some(result_2) = dimension_2.as_length() else { + return false; + }; - result_1.is_some() && result_1 == result_2 + result_1.value.value == result_2.value.value + && result_1 + .unit + .value + .eq_ignore_ascii_case(&result_2.unit.value) } ( ComponentValue::Percentage(percentage_1), diff --git a/crates/swc_css_minifier/src/compressor/keyframes.rs b/crates/swc_css_minifier/src/compressor/keyframes.rs index e18bbf2af1a..38b4b1e372e 100644 --- a/crates/swc_css_minifier/src/compressor/keyframes.rs +++ b/crates/swc_css_minifier/src/compressor/keyframes.rs @@ -32,6 +32,10 @@ impl Compressor { } pub(super) fn compress_keyframe_selector(&mut self, keyframe_selector: &mut KeyframeSelector) { + if let KeyframeSelector::Ident(i) = keyframe_selector { + i.value = i.value.to_ascii_lowercase(); + } + match keyframe_selector { KeyframeSelector::Ident(i) if i.value == "from" => { *keyframe_selector = KeyframeSelector::Percentage(Percentage { diff --git a/crates/swc_css_minifier/src/compressor/mod.rs b/crates/swc_css_minifier/src/compressor/mod.rs index 3e00a951dbe..5d70777693e 100644 --- a/crates/swc_css_minifier/src/compressor/mod.rs +++ b/crates/swc_css_minifier/src/compressor/mod.rs @@ -54,46 +54,111 @@ impl VisitMut for Compressor { self.compress_alpha_value(n); } - fn visit_mut_stylesheet(&mut self, n: &mut Stylesheet) { + fn visit_mut_an_plus_b(&mut self, n: &mut AnPlusB) { + if let AnPlusB::Ident(n) = n { + n.value = n.value.to_ascii_lowercase(); + n.raw = None; + } + n.visit_mut_children_with(self); - self.compress_stylesheet(n); + self.compress_an_plus_b(n); + } - if !self.need_utf8_at_rule - && n.rules - .first() - .and_then(|rule| rule.as_at_rule()) - .and_then(|at_rule| at_rule.prelude.as_ref()) - .and_then(|prelude| prelude.as_charset_prelude()) - .filter(|x| x.value.eq_ignore_ascii_case("utf-8")) - .is_some() - { - n.rules.remove(0); + fn visit_mut_angle(&mut self, n: &mut Angle) { + n.visit_mut_children_with(self); + + self.compress_angle(n); + } + + fn visit_mut_at_rule(&mut self, n: &mut AtRule) { + n.visit_mut_children_with(self); + + self.compress_keyframes_at_rule(n); + } + + fn visit_mut_at_rule_name(&mut self, n: &mut AtRuleName) { + if let AtRuleName::Ident(n) = n { + n.value = n.value.to_ascii_lowercase(); + n.raw = None; + } + + n.visit_mut_children_with(self); + } + + fn visit_mut_attribute_selector(&mut self, n: &mut AttributeSelector) { + n.visit_mut_children_with(self); + + self.compress_attribute_selector(n); + } + + fn visit_mut_calc_sum(&mut self, n: &mut CalcSum) { + n.visit_mut_children_with(&mut *self.with_ctx(Ctx { + in_math_function: true, + ..self.ctx + })); + + // Don't touch `@supports`, it can be used to check a browser's support for one + // or more specific CSS features + if !self.in_supports_condition { + self.compress_calc_sum(n); } } - fn visit_mut_simple_block(&mut self, n: &mut SimpleBlock) { + fn visit_mut_color(&mut self, n: &mut Color) { n.visit_mut_children_with(self); - self.compress_simple_block(n); + self.compress_color(n); } - fn visit_mut_time(&mut self, n: &mut Time) { + fn visit_mut_component_value(&mut self, n: &mut ComponentValue) { n.visit_mut_children_with(self); - self.compress_time(n); + if self.in_supports_condition { + return; + } + + self.compress_calc_sum_in_component_value(n); + + self.compress_alpha_value_in_component_value(n); + + self.compress_component_value_for_length(n); + + self.compress_easing_function(n); + + self.compress_transform_function(n); + + self.compress_angle_in_component_value(n); } - fn visit_mut_unicode_range(&mut self, n: &mut UnicodeRange) { + fn visit_mut_compound_selector(&mut self, n: &mut CompoundSelector) { n.visit_mut_children_with(self); - self.compress_unicode_range(n); + self.compress_compound_selector(n); } - fn visit_mut_url(&mut self, n: &mut Url) { - n.visit_mut_children_with(self); + fn visit_mut_custom_ident(&mut self, custom_ident: &mut CustomIdent) { + custom_ident.visit_mut_children_with(self); - self.compress_url(n); + if !self.need_utf8_at_rule { + self.need_utf8_at_rule = !contains_only_ascii_characters(&custom_ident.value); + } + } + + fn visit_mut_custom_property_name(&mut self, custom_property_name: &mut CustomPropertyName) { + custom_property_name.visit_mut_children_with(self); + + if !self.need_utf8_at_rule { + self.need_utf8_at_rule = !contains_only_ascii_characters(&custom_property_name.value); + } + } + + fn visit_mut_dashed_ident(&mut self, dashed_ident: &mut DashedIdent) { + dashed_ident.visit_mut_children_with(self); + + if !self.need_utf8_at_rule { + self.need_utf8_at_rule = !contains_only_ascii_characters(&dashed_ident.value); + } } fn visit_mut_declaration(&mut self, n: &mut Declaration) { @@ -125,22 +190,64 @@ impl VisitMut for Compressor { } } - fn visit_mut_color(&mut self, n: &mut Color) { + fn visit_mut_forgiving_relative_selector_list( + &mut self, + n: &mut ForgivingRelativeSelectorList, + ) { n.visit_mut_children_with(self); - self.compress_color(n); + self.compress_forgiving_relative_selector_list(n); + } + + fn visit_mut_forgiving_selector_list(&mut self, n: &mut ForgivingSelectorList) { + n.visit_mut_children_with(self); + + self.compress_forgiving_selector_list(n); } fn visit_mut_frequency(&mut self, n: &mut Frequency) { + n.unit.value = n.unit.value.to_ascii_lowercase(); + n.unit.raw = None; + n.visit_mut_children_with(self); self.compress_frequency(n); } - fn visit_mut_at_rule(&mut self, n: &mut AtRule) { - n.visit_mut_children_with(self); + fn visit_mut_function(&mut self, n: &mut Function) { + if let FunctionName::Ident(n) = &mut n.name { + n.value = n.value.to_ascii_lowercase(); + n.raw = None; + } - self.compress_keyframes_at_rule(n); + if matches_eq!( + n.name, "rotate", "skew", "skewx", "skewy", "rotate3d", "rotatex", "rotatey", "rotatez" + ) { + n.visit_mut_children_with(&mut *self.with_ctx(Ctx { + in_transform_function: true, + ..self.ctx + })); + } else { + n.visit_mut_children_with(self); + } + } + + fn visit_mut_hex_color(&mut self, n: &mut HexColor) { + let new = n.value.to_ascii_lowercase(); + if new != n.value { + n.value = new; + n.raw = None; + } + + n.visit_mut_children_with(self); + } + + fn visit_mut_ident(&mut self, ident: &mut Ident) { + ident.visit_mut_children_with(self); + + if !self.need_utf8_at_rule { + self.need_utf8_at_rule = !contains_only_ascii_characters(&ident.value); + } } fn visit_mut_import_href(&mut self, n: &mut ImportHref) { @@ -149,10 +256,26 @@ impl VisitMut for Compressor { self.compress_import_href(n); } - fn visit_mut_media_query_list(&mut self, n: &mut MediaQueryList) { + fn visit_mut_keyframe_block(&mut self, n: &mut KeyframeBlock) { + n.visit_mut_children_with(&mut *self.with_ctx(Ctx { + in_keyframe_block: true, + ..self.ctx + })); + } + + fn visit_mut_keyframe_selector(&mut self, n: &mut KeyframeSelector) { n.visit_mut_children_with(self); - self.compress_media_query_list(n); + self.compress_keyframe_selector(n); + } + + fn visit_mut_length(&mut self, n: &mut Length) { + n.unit.value = n.unit.value.to_ascii_lowercase(); + n.unit.raw = None; + + n.visit_mut_children_with(self); + + self.compress_length(n); } fn visit_mut_media_condition(&mut self, n: &mut MediaCondition) { @@ -167,12 +290,6 @@ impl VisitMut for Compressor { self.compress_media_condition_without_or(n); } - fn visit_mut_media_in_parens(&mut self, n: &mut MediaInParens) { - n.visit_mut_children_with(self); - - self.compress_media_in_parens(n); - } - fn visit_mut_media_feature(&mut self, n: &mut MediaFeature) { n.visit_mut_children_with(self); @@ -186,6 +303,114 @@ impl VisitMut for Compressor { self.compress_media_feature_value_length(n); } + fn visit_mut_media_in_parens(&mut self, n: &mut MediaInParens) { + n.visit_mut_children_with(self); + + self.compress_media_in_parens(n); + } + + fn visit_mut_media_query_list(&mut self, n: &mut MediaQueryList) { + n.visit_mut_children_with(self); + + self.compress_media_query_list(n); + } + + fn visit_mut_pseudo_class_selector(&mut self, n: &mut PseudoClassSelector) { + match &mut n.name { + Ident { value, .. } + if matches_eq_ignore_ascii_case!( + &**value, + "not", + "is", + "where", + "matches", + "-moz-any", + "-webkit-any" + ) => + { + n.name.value = n.name.value.to_ascii_lowercase(); + n.name.raw = None; + + n.visit_mut_children_with(&mut *self.with_ctx(Ctx { + in_logic_combinator_selector: true, + ..self.ctx + })); + } + _ => { + n.visit_mut_children_with(self); + } + } + } + + fn visit_mut_pseudo_element_selector(&mut self, n: &mut PseudoElementSelector) { + n.name.value = n.name.value.to_ascii_lowercase(); + n.name.raw = None; + + n.visit_mut_children_with(self); + } + + fn visit_mut_relative_selector_list(&mut self, n: &mut RelativeSelectorList) { + n.visit_mut_children_with(self); + + self.compress_relative_selector_list(n); + } + + fn visit_mut_selector_list(&mut self, n: &mut SelectorList) { + n.visit_mut_children_with(self); + + self.compress_selector_list(n); + } + + fn visit_mut_simple_block(&mut self, n: &mut SimpleBlock) { + n.visit_mut_children_with(self); + + self.compress_simple_block(n); + } + + fn visit_mut_size_feature_value(&mut self, n: &mut SizeFeatureValue) { + n.visit_mut_children_with(self); + + self.compress_calc_sum_in_size_feature_value(n); + self.compress_size_feature_value_length(n); + } + + fn visit_mut_str(&mut self, string: &mut Str) { + string.visit_mut_children_with(self); + + if !self.need_utf8_at_rule { + self.need_utf8_at_rule = !contains_only_ascii_characters(&string.value); + } + } + + fn visit_mut_stylesheet(&mut self, n: &mut Stylesheet) { + n.visit_mut_children_with(self); + + self.compress_stylesheet(n); + + if !self.need_utf8_at_rule + && n.rules + .first() + .and_then(|rule| rule.as_at_rule()) + .and_then(|at_rule| at_rule.prelude.as_ref()) + .and_then(|prelude| prelude.as_charset_prelude()) + .filter(|x| x.value.eq_ignore_ascii_case("utf-8")) + .is_some() + { + n.rules.remove(0); + } + } + + fn visit_mut_subclass_selector(&mut self, n: &mut SubclassSelector) { + if let SubclassSelector::PseudoClass(PseudoClassSelector { name, .. }) = n { + name.value = name.value.to_ascii_lowercase(); + name.raw = None; + } + + n.visit_mut_children_with(self); + + self.compress_subclass_selector(n); + } + fn visit_mut_supports_condition(&mut self, n: &mut SupportsCondition) { let old_in_support_condition = self.in_supports_condition; @@ -204,192 +429,17 @@ impl VisitMut for Compressor { self.compress_supports_in_parens(n); } - fn visit_mut_size_feature_value(&mut self, n: &mut SizeFeatureValue) { + fn visit_mut_tag_name_selector(&mut self, n: &mut TagNameSelector) { + n.name.value.value = n.name.value.value.to_ascii_lowercase(); + n.name.value.raw = None; + + n.visit_mut_children_with(self); + } + + fn visit_mut_time(&mut self, n: &mut Time) { n.visit_mut_children_with(self); - self.compress_calc_sum_in_size_feature_value(n); - self.compress_size_feature_value_length(n); - } - - fn visit_mut_keyframe_selector(&mut self, n: &mut KeyframeSelector) { - n.visit_mut_children_with(self); - - self.compress_keyframe_selector(n); - } - - fn visit_mut_calc_sum(&mut self, n: &mut CalcSum) { - n.visit_mut_children_with(&mut *self.with_ctx(Ctx { - in_math_function: true, - ..self.ctx - })); - - // Don't touch `@supports`, it can be used to check a browser's support for one - // or more specific CSS features - if !self.in_supports_condition { - self.compress_calc_sum(n); - } - } - - fn visit_mut_component_value(&mut self, n: &mut ComponentValue) { - n.visit_mut_children_with(self); - - if self.in_supports_condition { - return; - } - - self.compress_calc_sum_in_component_value(n); - - self.compress_alpha_value_in_component_value(n); - - self.compress_component_value_for_length(n); - - self.compress_easing_function(n); - - self.compress_transform_function(n); - - self.compress_angle_in_component_value(n); - } - - fn visit_mut_length(&mut self, n: &mut Length) { - n.visit_mut_children_with(self); - - self.compress_length(n); - } - - fn visit_mut_pseudo_class_selector(&mut self, n: &mut PseudoClassSelector) { - match &n.name { - Ident { value, .. } - if matches!( - &**value, - "not" | "is" | "where" | "matches" | "-moz-any" | "-webkit-any" - ) => - { - n.visit_mut_children_with(&mut *self.with_ctx(Ctx { - in_logic_combinator_selector: true, - ..self.ctx - })); - } - _ => { - n.visit_mut_children_with(self); - } - } - } - - fn visit_mut_selector_list(&mut self, n: &mut SelectorList) { - n.visit_mut_children_with(self); - - self.compress_selector_list(n); - } - - fn visit_mut_forgiving_selector_list(&mut self, n: &mut ForgivingSelectorList) { - n.visit_mut_children_with(self); - - self.compress_forgiving_selector_list(n); - } - - fn visit_mut_relative_selector_list(&mut self, n: &mut RelativeSelectorList) { - n.visit_mut_children_with(self); - - self.compress_relative_selector_list(n); - } - - fn visit_mut_forgiving_relative_selector_list( - &mut self, - n: &mut ForgivingRelativeSelectorList, - ) { - n.visit_mut_children_with(self); - - self.compress_forgiving_relative_selector_list(n); - } - - fn visit_mut_an_plus_b(&mut self, n: &mut AnPlusB) { - n.visit_mut_children_with(self); - - self.compress_an_plus_b(n); - } - - fn visit_mut_subclass_selector(&mut self, n: &mut SubclassSelector) { - n.visit_mut_children_with(self); - - self.compress_subclass_selector(n); - } - - fn visit_mut_compound_selector(&mut self, n: &mut CompoundSelector) { - n.visit_mut_children_with(self); - - self.compress_compound_selector(n); - } - - fn visit_mut_attribute_selector(&mut self, n: &mut AttributeSelector) { - n.visit_mut_children_with(self); - - self.compress_attribute_selector(n); - } - - fn visit_mut_keyframe_block(&mut self, n: &mut KeyframeBlock) { - n.visit_mut_children_with(&mut *self.with_ctx(Ctx { - in_keyframe_block: true, - ..self.ctx - })); - } - - fn visit_mut_function(&mut self, n: &mut Function) { - if matches_eq!( - n.name, "rotate", "skew", "skewx", "skewy", "rotate3d", "rotatex", "rotatey", "rotatez" - ) { - n.visit_mut_children_with(&mut *self.with_ctx(Ctx { - in_transform_function: true, - ..self.ctx - })); - } else { - n.visit_mut_children_with(self); - } - } - - fn visit_mut_angle(&mut self, n: &mut Angle) { - n.visit_mut_children_with(self); - - self.compress_angle(n); - } - - fn visit_mut_ident(&mut self, ident: &mut Ident) { - ident.visit_mut_children_with(self); - - if !self.need_utf8_at_rule { - self.need_utf8_at_rule = !contains_only_ascii_characters(&ident.value); - } - } - - fn visit_mut_custom_ident(&mut self, custom_ident: &mut CustomIdent) { - custom_ident.visit_mut_children_with(self); - - if !self.need_utf8_at_rule { - self.need_utf8_at_rule = !contains_only_ascii_characters(&custom_ident.value); - } - } - - fn visit_mut_dashed_ident(&mut self, dashed_ident: &mut DashedIdent) { - dashed_ident.visit_mut_children_with(self); - - if !self.need_utf8_at_rule { - self.need_utf8_at_rule = !contains_only_ascii_characters(&dashed_ident.value); - } - } - - fn visit_mut_str(&mut self, string: &mut Str) { - string.visit_mut_children_with(self); - - if !self.need_utf8_at_rule { - self.need_utf8_at_rule = !contains_only_ascii_characters(&string.value); - } - } - - fn visit_mut_custom_property_name(&mut self, custom_property_name: &mut CustomPropertyName) { - custom_property_name.visit_mut_children_with(self); - - if !self.need_utf8_at_rule { - self.need_utf8_at_rule = !contains_only_ascii_characters(&custom_property_name.value); - } + self.compress_time(n); } fn visit_mut_token_and_span(&mut self, token_and_span: &mut TokenAndSpan) { @@ -421,6 +471,21 @@ impl VisitMut for Compressor { } } } + + fn visit_mut_unicode_range(&mut self, n: &mut UnicodeRange) { + n.visit_mut_children_with(self); + + self.compress_unicode_range(n); + } + + fn visit_mut_url(&mut self, n: &mut Url) { + n.name.value = n.name.value.to_ascii_lowercase(); + n.name.raw = None; + + n.visit_mut_children_with(self); + + self.compress_url(n); + } } fn contains_only_ascii_characters(string: &str) -> bool { diff --git a/crates/swc_css_minifier/src/compressor/unicode_range.rs b/crates/swc_css_minifier/src/compressor/unicode_range.rs index 4e54976b057..3039c87f9b5 100644 --- a/crates/swc_css_minifier/src/compressor/unicode_range.rs +++ b/crates/swc_css_minifier/src/compressor/unicode_range.rs @@ -4,6 +4,11 @@ use super::Compressor; impl Compressor { pub(super) fn compress_unicode_range(&self, unicode_range: &mut UnicodeRange) { + unicode_range.start = unicode_range.start.to_ascii_lowercase(); + if let Some(end) = &mut unicode_range.end { + *end = end.to_ascii_lowercase(); + } + if unicode_range.end.is_none() { unicode_range.start = self.remove_leading_zeros(&unicode_range.start).into(); diff --git a/crates/swc_css_modules/tests/fixture/import/import.compiled.css b/crates/swc_css_modules/tests/fixture/import/import.compiled.css index bc0a8f3629f..61c3d2532d8 100644 --- a/crates/swc_css_modules/tests/fixture/import/import.compiled.css +++ b/crates/swc_css_modules/tests/fixture/import/import.compiled.css @@ -1,7 +1,7 @@ @import url(test.css); @import url('test.css'); @import url("test.css"); -@import url(test.css); +@IMPORT url(test.css); @import url(test.css); @import url(test.css); @import url(test.css); @@ -21,7 +21,7 @@ @import url(''); @import url(""); @import url(test.css) screen and (orientation: landscape); -@import url(test.css) screen and (orientation: landscape); +@import url(test.css) SCREEN and (ORIENTATION: LANDSCAPE); @import url(test.css) screen and (orientation: landscape); @import url(test.css) screen and (orientation: landscape); @import url(test-media.css) screen and (orientation: landscape); @@ -141,7 +141,7 @@ st.css'); @import url("./test.css") layer(default) supports(display: flex) screen and (min-width: 400px); @import url("./test.css") screen and (min-width: 400px); @import url("./test.css") layer(default) supports(display: flex) screen and (min-width: 400px); -@import url("./test.css") layer(DEFAULT) supports(display: FLEX) screen and (min-width: 400px); +@import url("./test.css") LAYER(DEFAULT) SUPPORTS(DISPLAY: FLEX) SCREEN and (MIN-WIDTH: 400PX); @import url("./test.css") layer(default) supports(display: flex) screen and (min-width: 400px); @import url(test.css); @import url(test.css); diff --git a/crates/swc_css_modules/tests/fixture/modules/tests-cases/keyframes-and-animation/source.compiled.css b/crates/swc_css_modules/tests/fixture/modules/tests-cases/keyframes-and-animation/source.compiled.css index 643b63e187e..e30ba4589c9 100644 --- a/crates/swc_css_modules/tests/fixture/modules/tests-cases/keyframes-and-animation/source.compiled.css +++ b/crates/swc_css_modules/tests/fixture/modules/tests-cases/keyframes-and-animation/source.compiled.css @@ -3,21 +3,21 @@ } @keyframes __local__bounce { 0% { - transform: translatey(-100%); + transform: translateY(-100%); opacity: 0; } 5% { - transform: translatey(-100%); + transform: translateY(-100%); opacity: 0; } } @-webkit-keyframes __local__bounce2 { 0% { - transform: translatey(-100%); + transform: translateY(-100%); opacity: 0; } 5% { - transform: translatey(-100%); + transform: translateY(-100%); opacity: 0; } } diff --git a/crates/swc_css_modules/tests/fixture/modules/tests-cases/media-2/source.compiled.css b/crates/swc_css_modules/tests/fixture/modules/tests-cases/media-2/source.compiled.css index 422b15eebc0..77097548093 100644 --- a/crates/swc_css_modules/tests/fixture/modules/tests-cases/media-2/source.compiled.css +++ b/crates/swc_css_modules/tests/fixture/modules/tests-cases/media-2/source.compiled.css @@ -1,6 +1,6 @@ @value small from './file.css'; @media small { .__local__header { - box-shadow: 0 0 4px #1f4f7f; + box-shadow: 0 0 4px #1F4F7F; } } diff --git a/crates/swc_css_modules/tests/fixture/modules/tests-cases/media/source.compiled.css b/crates/swc_css_modules/tests/fixture/modules/tests-cases/media/source.compiled.css index 824ac25d2ab..b982461b3c7 100644 --- a/crates/swc_css_modules/tests/fixture/modules/tests-cases/media/source.compiled.css +++ b/crates/swc_css_modules/tests/fixture/modules/tests-cases/media/source.compiled.css @@ -1,6 +1,6 @@ @value small: (max-width: 599px); @media small { .__local__header { - box-shadow: 0 0 4px #1f4f7f; + box-shadow: 0 0 4px #1F4F7F; } } diff --git a/crates/swc_css_parser/src/parser/at_rules/mod.rs b/crates/swc_css_parser/src/parser/at_rules/mod.rs index 438ad0ab854..ccb526d23d7 100644 --- a/crates/swc_css_parser/src/parser/at_rules/mod.rs +++ b/crates/swc_css_parser/src/parser/at_rules/mod.rs @@ -31,9 +31,7 @@ where if value.starts_with("--") { ColorProfileName::DashedIdent(self.parse()?) } else { - let mut name: Ident = self.parse()?; - - name.value = name.value.to_ascii_lowercase(); + let name: Ident = self.parse()?; ColorProfileName::Ident(name) } @@ -904,11 +902,10 @@ where fn parse(&mut self) -> PResult { match cur!(self) { tok!("ident") => { - let mut ident: Ident = self.parse()?; + let ident: Ident = self.parse()?; + let lower = ident.value.to_ascii_lowercase(); - ident.value = ident.value.to_ascii_lowercase(); - - if ident.value != "from" && ident.value != "to" { + if lower != "from" && lower != "to" { return Err(Error::new( ident.span, ErrorKind::Expected("'from' or 'to' idents"), @@ -1020,9 +1017,7 @@ where let span = self.input.cur_span(); let keyword = match cur!(self) { Token::Ident { value, .. } if value.as_ref().eq_ignore_ascii_case("not") => { - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; Some(ident) } @@ -1054,9 +1049,7 @@ where let span = self.input.cur_span(); let keyword = match cur!(self) { Token::Ident { value, .. } if value.as_ref().eq_ignore_ascii_case("and") => { - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; Some(ident) } @@ -1088,9 +1081,7 @@ where let span = self.input.cur_span(); let keyword = match cur!(self) { Token::Ident { value, .. } if value.as_ref().eq_ignore_ascii_case("or") => { - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; Some(ident) } @@ -1432,9 +1423,7 @@ where fn parse(&mut self) -> PResult { match cur!(self) { _ if !is_one_of_case_insensitive_ident!(self, "not", "and", "or", "only", "layer") => { - let mut name: Ident = self.parse()?; - - name.value = name.value.to_ascii_lowercase(); + let name: Ident = self.parse()?; Ok(MediaType::Ident(name)) } @@ -1558,9 +1547,7 @@ where let span = self.input.cur_span(); let keyword = match cur!(self) { Token::Ident { value, .. } if value.as_ref().eq_ignore_ascii_case("not") => { - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; Some(ident) } @@ -1592,9 +1579,7 @@ where let span = self.input.cur_span(); let keyword = match cur!(self) { Token::Ident { value, .. } if value.as_ref().eq_ignore_ascii_case("and") => { - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; Some(ident) } @@ -1626,9 +1611,7 @@ where let span = self.input.cur_span(); let keyword = match cur!(self) { Token::Ident { value, .. } if value.as_ref().eq_ignore_ascii_case("or") => { - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; Some(ident) } @@ -1907,9 +1890,7 @@ where Ok(MediaFeatureValue::Number(left)) } tok!("ident") => { - let mut name: Ident = self.parse()?; - - name.value = name.value.to_ascii_lowercase(); + let name: Ident = self.parse()?; Ok(MediaFeatureValue::Ident(name)) } @@ -2036,9 +2017,7 @@ where Token::Ident { value, .. } if matches_eq_ignore_ascii_case!(value, "left", "right", "first", "blank") => { - let mut name: Ident = self.parse()?; - - name.value = name.value.to_ascii_lowercase(); + let name: Ident = self.parse()?; name } @@ -2192,9 +2171,7 @@ where let span = self.input.cur_span(); let keyword = match cur!(self) { Token::Ident { value, .. } if value.as_ref().eq_ignore_ascii_case("not") => { - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; Some(ident) } @@ -2226,9 +2203,7 @@ where let span = self.input.cur_span(); let keyword = match cur!(self) { Token::Ident { value, .. } if value.as_ref().eq_ignore_ascii_case("and") => { - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; Some(ident) } @@ -2260,9 +2235,7 @@ where let span = self.input.cur_span(); let keyword = match cur!(self) { Token::Ident { value, .. } if value.as_ref().eq_ignore_ascii_case("or") => { - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; Some(ident) } @@ -2519,9 +2492,7 @@ where Ok(SizeFeatureValue::Number(left)) } tok!("ident") => { - let mut name: Ident = self.parse()?; - - name.value = name.value.to_ascii_lowercase(); + let name: Ident = self.parse()?; Ok(SizeFeatureValue::Ident(name)) } diff --git a/crates/swc_css_parser/src/parser/selectors/mod.rs b/crates/swc_css_parser/src/parser/selectors/mod.rs index b3a670ef02c..44750a1b31c 100644 --- a/crates/swc_css_parser/src/parser/selectors/mod.rs +++ b/crates/swc_css_parser/src/parser/selectors/mod.rs @@ -493,9 +493,7 @@ where match cur!(self) { tok!("ident") => { - let mut value: Ident = self.parse()?; - - value.value = value.value.to_ascii_lowercase(); + let value: Ident = self.parse()?; return Ok(TypeSelector::TagName(TagNameSelector { span: span!(self, span.lo), @@ -828,9 +826,7 @@ where match cur!(self) { tok!("ident") => { - let mut value: Ident = self.parse()?; - - value.value = value.value.to_ascii_lowercase(); + let value: Ident = self.parse()?; Ok(AttributeSelectorModifier { span: span!(self, span.lo), @@ -892,9 +888,7 @@ where "dir" => { self.input.skip_ws(); - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; self.input.skip_ws(); @@ -994,9 +988,7 @@ where self.input.skip_ws(); if is!(self, "ident") { - let mut of: Ident = self.parse()?; - - of.value = of.value.to_ascii_lowercase(); + let of: Ident = self.parse()?; children.push(PseudoClassSelectorChildren::Ident(of)); @@ -1059,9 +1051,7 @@ where children: Some(children), }) } else if is!(self, Ident) { - let mut name: Ident = self.parse()?; - - name.value = name.value.to_ascii_lowercase(); + let name: Ident = self.parse()?; Ok(PseudoClassSelector { span: span!(self, span.lo), @@ -1183,9 +1173,7 @@ where children: Some(children), }) } else if is!(self, Ident) { - let mut name: Ident = self.parse()?; - - name.value = name.value.to_ascii_lowercase(); + let name: Ident = self.parse()?; Ok(PseudoElementSelector { span: span!(self, span.lo), @@ -1212,9 +1200,8 @@ where Token::Ident { value, .. } if matches_eq_ignore_ascii_case!(value, "odd", "even") => { - let mut ident: Ident = self.parse()?; + let ident: Ident = self.parse()?; - ident.value = ident.value.to_ascii_lowercase(); Ok(AnPlusB::Ident(ident)) } diff --git a/crates/swc_css_parser/src/parser/syntax/mod.rs b/crates/swc_css_parser/src/parser/syntax/mod.rs index 7205f7f7c9b..010f5b49a80 100644 --- a/crates/swc_css_parser/src/parser/syntax/mod.rs +++ b/crates/swc_css_parser/src/parser/syntax/mod.rs @@ -157,7 +157,7 @@ where } else { AtRuleName::Ident(Ident { span: Span::new(span.lo + BytePos(1), span.hi, Default::default()), - value: at_keyword_name.0.to_ascii_lowercase(), + value: at_keyword_name.0, raw: Some(at_keyword_name.1), }) }; @@ -616,9 +616,7 @@ where DeclarationName::DashedIdent(ident) } else { - let mut ident: Ident = self.parse()?; - - ident.value = ident.value.to_ascii_lowercase(); + let ident: Ident = self.parse()?; DeclarationName::Ident(ident) }; @@ -940,7 +938,7 @@ where } else { FunctionName::Ident(Ident { span: Span::new(span.lo, span.hi - BytePos(1), Default::default()), - value: function_name.0.to_ascii_lowercase(), + value: function_name.0, raw: Some(function_name.1), }) }; diff --git a/crates/swc_css_parser/src/parser/values_and_units/mod.rs b/crates/swc_css_parser/src/parser/values_and_units/mod.rs index f96c4c41dd7..f29a8197c24 100644 --- a/crates/swc_css_parser/src/parser/values_and_units/mod.rs +++ b/crates/swc_css_parser/src/parser/values_and_units/mod.rs @@ -197,7 +197,9 @@ where let mut values = vec![]; - match &**function_name { + let lower_fname = function_name.to_ascii_lowercase(); + + match &*lower_fname { "calc" | "-moz-calc" | "-webkit-calc" | "sin" | "cos" | "tan" | "asin" | "acos" | "atan" | "sqrt" | "exp" | "abs" | "sign" => { self.input.skip_ws(); @@ -402,7 +404,7 @@ where _ => {} } - match &**function_name { + match &*lower_fname { "rgb" | "rgba" => { let percentage_or_number_or_none = self.try_parse_variable_function( |parser, has_variable_before| match cur!(parser) { @@ -515,7 +517,7 @@ where is_legacy_syntax = false; } - match &**function_name { + match &*lower_fname { "rgb" | "rgba" => { let percentage_or_number = self.try_parse_variable_function( |parser, has_variable_before| match cur!(parser) { @@ -631,7 +633,7 @@ where } } - match &**function_name { + match &*lower_fname { "rgb" | "rgba" => { let percentage_or_number = self.try_parse_variable_function( |parser, has_variable_before| match cur!(parser) { @@ -819,7 +821,7 @@ where match cur!(self) { Token::Ident { value, .. } if matches_eq_ignore_ascii_case!(value, "from") - && *function_name != "device-cmyk" => + && lower_fname != "device-cmyk" => { values.push(ComponentValue::Ident(self.parse()?)); @@ -839,7 +841,7 @@ where _ => {} } - match &**function_name { + match &*lower_fname { "hwb" => { let hue_or_none = self.try_parse_variable_function( |parser, has_variable_before| match cur!(parser) { @@ -947,7 +949,7 @@ where } if !is_one_of!(self, EOF, "/") { - match &**function_name { + match &*lower_fname { "hwb" => { let percentage_or_none = self.try_parse_variable_function( |parser, has_variable_before| match cur!(parser) { @@ -1064,7 +1066,7 @@ where } if !is_one_of!(self, EOF, "/") { - match &**function_name { + match &*lower_fname { "hwb" => { let percentage_or_none = self.try_parse_variable_function( |parser, has_variable_before| match cur!(parser) { @@ -1226,7 +1228,7 @@ where } } - if !is_one_of!(self, EOF, "/") && function_name == "device-cmyk" { + if !is_one_of!(self, EOF, "/") && lower_fname == "device-cmyk" { let cmyk_component = self.try_parse_variable_function( |parser, _| Ok(Some(ComponentValue::CmykComponent(parser.parse()?))), &mut has_variable, @@ -1252,7 +1254,7 @@ where Token::Function { value, .. } if is_math_function(value) => { Ok(Some(ComponentValue::Function(parser.parse()?))) } - tok!("ident") if !matches!(&**function_name, "device-cmyk") => { + tok!("ident") if !matches!(&*lower_fname, "device-cmyk") => { let ident: Box = parser.parse()?; if ident.value.eq_ignore_ascii_case("none") { @@ -1539,7 +1541,7 @@ where Token::Function { value, .. } if is_math_function(value) => { Ok(Some(ComponentValue::Function(parser.parse()?))) } - tok!("ident") if !matches!(&**function_name, "device-cmyk") => { + tok!("ident") if !matches!(&*lower_fname, "device-cmyk") => { let ident: Box = parser.parse()?; if ident.value.eq_ignore_ascii_case("none") { @@ -2027,7 +2029,7 @@ where }, unit: Ident { span: Span::new(span.hi - BytePos(unit_len), span.hi, Default::default()), - value: unit.to_ascii_lowercase(), + value: unit, raw: Some(raw_unit), }, }) @@ -2078,7 +2080,7 @@ where }, unit: Ident { span: Span::new(span.hi - BytePos(unit_len), span.hi, Default::default()), - value: unit.to_ascii_lowercase(), + value: unit, raw: Some(raw_unit), }, }) @@ -2126,7 +2128,7 @@ where }, unit: Ident { span: Span::new(span.hi - BytePos(unit_len), span.hi, Default::default()), - value: unit.to_ascii_lowercase(), + value: unit, raw: Some(raw_unit), }, }) @@ -2174,7 +2176,7 @@ where }, unit: Ident { span: Span::new(span.hi - BytePos(unit_len), span.hi, Default::default()), - value: unit.to_ascii_lowercase(), + value: unit, raw: Some(raw_unit), }, }) @@ -2225,7 +2227,7 @@ where }, unit: Ident { span: Span::new(span.hi - BytePos(unit_len), span.hi, Default::default()), - value: unit.to_ascii_lowercase(), + value: unit, raw: Some(raw_unit), }, }) @@ -2273,7 +2275,7 @@ where }, unit: Ident { span: Span::new(span.hi - BytePos(unit_len), span.hi, Default::default()), - value: unit.to_ascii_lowercase(), + value: unit, raw: Some(raw_unit), }, }) @@ -2424,7 +2426,7 @@ where Ok(HexColor { span, - value: value.to_ascii_lowercase(), + value, raw: Some(raw), }) } @@ -2620,7 +2622,7 @@ where let name = Ident { span: Span::new(span.lo, span.hi - BytePos(1), Default::default()), - value: function_name.to_ascii_lowercase(), + value: function_name, raw: Some(raw_function_name), }; @@ -2905,7 +2907,7 @@ where next = chars.next(); } Some(c @ 'A'..='F') | Some(c @ 'a'..='f') => { - start.push(c.to_ascii_lowercase()); + start.push(c); next = chars.next(); } @@ -3005,7 +3007,7 @@ where next = chars.next(); } Some(c @ 'A'..='F') | Some(c @ 'a'..='f') => { - end.push(c.to_ascii_lowercase()); + end.push(c); next = chars.next(); } _ => { diff --git a/crates/swc_css_parser/tests/fixture/at-rule/color-profile/output.json b/crates/swc_css_parser/tests/fixture/at-rule/color-profile/output.json index 96231227182..66365df9880 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/color-profile/output.json +++ b/crates/swc_css_parser/tests/fixture/at-rule/color-profile/output.json @@ -224,7 +224,7 @@ "end": 250, "ctxt": 0 }, - "value": "device-cmyk", + "value": "DEVICE-CMYK", "raw": "DEVICE-CMYK" }, "block": { diff --git a/crates/swc_css_parser/tests/fixture/at-rule/container/output.json b/crates/swc_css_parser/tests/fixture/at-rule/container/output.json index 945b9613f4a..50c1921427f 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/container/output.json +++ b/crates/swc_css_parser/tests/fixture/at-rule/container/output.json @@ -7198,7 +7198,7 @@ "end": 2486, "ctxt": 0 }, - "value": "width", + "value": "WIDTH", "raw": "WIDTH" }, "comparison": "<=", diff --git a/crates/swc_css_parser/tests/fixture/at-rule/import/output.json b/crates/swc_css_parser/tests/fixture/at-rule/import/output.json index e48891bd9e4..0251ea8ee94 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/import/output.json +++ b/crates/swc_css_parser/tests/fixture/at-rule/import/output.json @@ -272,7 +272,7 @@ "end": 136, "ctxt": 0 }, - "value": "import", + "value": "IMPORT", "raw": "IMPORT" }, "prelude": { @@ -412,7 +412,7 @@ "end": 194, "ctxt": 0 }, - "value": "url", + "value": "URL", "raw": "URL" }, "value": { @@ -1057,7 +1057,7 @@ "end": 494, "ctxt": 0 }, - "value": "layer", + "value": "LAYER", "raw": "LAYER" }, "value": [ @@ -1547,7 +1547,7 @@ "end": 709, "ctxt": 0 }, - "value": "supports", + "value": "SUPPORTS", "raw": "SUPPORTS" }, "value": [ @@ -2016,7 +2016,7 @@ "end": 904, "ctxt": 0 }, - "value": "import", + "value": "IMPORT", "raw": "IMPORT" }, "prelude": { @@ -3160,7 +3160,7 @@ "end": 1318, "ctxt": 0 }, - "value": "screen", + "value": "SCREEN", "raw": "SCREEN" }, "keyword": { @@ -3195,7 +3195,7 @@ "end": 1335, "ctxt": 0 }, - "value": "orientation", + "value": "ORIENTATION", "raw": "ORIENTATION" }, "value": { @@ -3205,7 +3205,7 @@ "end": 1346, "ctxt": 0 }, - "value": "landscape", + "value": "LANDSCAPE", "raw": "LANDSCAPE" } } @@ -9192,7 +9192,7 @@ "end": 4755, "ctxt": 0 }, - "value": "layer", + "value": "LAYER", "raw": "LAYER" }, "value": [ @@ -9239,7 +9239,7 @@ "end": 4773, "ctxt": 0 }, - "value": "supports", + "value": "SUPPORTS", "raw": "SUPPORTS" }, "value": [ @@ -9257,7 +9257,7 @@ "end": 4781, "ctxt": 0 }, - "value": "display", + "value": "DISPLAY", "raw": "DISPLAY" }, "value": [ @@ -9299,7 +9299,7 @@ "end": 4795, "ctxt": 0 }, - "value": "screen", + "value": "SCREEN", "raw": "SCREEN" }, "keyword": { @@ -9334,7 +9334,7 @@ "end": 4810, "ctxt": 0 }, - "value": "min-width", + "value": "MIN-WIDTH", "raw": "MIN-WIDTH" }, "value": { @@ -9361,7 +9361,7 @@ "end": 4817, "ctxt": 0 }, - "value": "px", + "value": "PX", "raw": "PX" } } diff --git a/crates/swc_css_parser/tests/fixture/at-rule/keyframe/output.json b/crates/swc_css_parser/tests/fixture/at-rule/keyframe/output.json index 62f1780e07d..3df6f83876e 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/keyframe/output.json +++ b/crates/swc_css_parser/tests/fixture/at-rule/keyframe/output.json @@ -256,7 +256,7 @@ "end": 158, "ctxt": 0 }, - "value": "translatex", + "value": "translateX", "raw": "translateX" }, "value": [ @@ -354,7 +354,7 @@ "end": 209, "ctxt": 0 }, - "value": "translatex", + "value": "translateX", "raw": "translateX" }, "value": [ @@ -1513,7 +1513,7 @@ "end": 686, "ctxt": 0 }, - "value": "from", + "value": "fRoM", "raw": "fRoM" } ], @@ -1566,7 +1566,7 @@ "end": 718, "ctxt": 0 }, - "value": "translatex", + "value": "translateX", "raw": "translateX" }, "value": [ @@ -1611,7 +1611,7 @@ "end": 737, "ctxt": 0 }, - "value": "to", + "value": "tO", "raw": "tO" } ], @@ -1664,7 +1664,7 @@ "end": 769, "ctxt": 0 }, - "value": "translatex", + "value": "translateX", "raw": "translateX" }, "value": [ diff --git a/crates/swc_css_parser/tests/fixture/at-rule/media/output.json b/crates/swc_css_parser/tests/fixture/at-rule/media/output.json index cbe894e05d4..ee8bb3be64a 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/media/output.json +++ b/crates/swc_css_parser/tests/fixture/at-rule/media/output.json @@ -12558,7 +12558,7 @@ "end": 3814, "ctxt": 0 }, - "value": "and", + "value": "AND", "raw": "AND" }, "condition": { @@ -12624,7 +12624,7 @@ "end": 3837, "ctxt": 0 }, - "value": "or", + "value": "OR", "raw": "OR" }, "condition": { @@ -12801,7 +12801,7 @@ "end": 3889, "ctxt": 0 }, - "value": "and", + "value": "AND", "raw": "AND" }, "condition": { @@ -12872,7 +12872,7 @@ "end": 3912, "ctxt": 0 }, - "value": "or", + "value": "OR", "raw": "OR" }, "condition": { @@ -13614,7 +13614,7 @@ "end": 4122, "ctxt": 0 }, - "value": "not", + "value": "NOT", "raw": "NOT" }, "condition": { @@ -13652,7 +13652,7 @@ "end": 4134, "ctxt": 0 }, - "value": "or", + "value": "OR", "raw": "OR" }, "condition": { @@ -16835,7 +16835,7 @@ "end": 4837, "ctxt": 0 }, - "value": "screen", + "value": "SCREEN", "raw": "SCREEN" }, "keyword": { @@ -16870,7 +16870,7 @@ "end": 4849, "ctxt": 0 }, - "value": "update", + "value": "UPDATE", "raw": "UPDATE" }, "value": { @@ -16880,7 +16880,7 @@ "end": 4855, "ctxt": 0 }, - "value": "slow", + "value": "SLOW", "raw": "SLOW" } }, @@ -16898,7 +16898,7 @@ "end": 4860, "ctxt": 0 }, - "value": "and", + "value": "AND", "raw": "AND" }, "condition": { @@ -16915,7 +16915,7 @@ "end": 4867, "ctxt": 0 }, - "value": "width", + "value": "WIDTH", "raw": "WIDTH" }, "comparison": ">", @@ -17505,7 +17505,7 @@ "end": 5019, "ctxt": 0 }, - "value": "media", + "value": "MEDIA", "raw": "MEDIA" }, "prelude": { @@ -17531,7 +17531,7 @@ "end": 5023, "ctxt": 0 }, - "value": "all", + "value": "ALL", "raw": "ALL" }, "keyword": null, @@ -17572,7 +17572,7 @@ "end": 5033, "ctxt": 0 }, - "value": "media", + "value": "MEDIA", "raw": "MEDIA" }, "prelude": { @@ -17615,7 +17615,7 @@ "end": 5057, "ctxt": 0 }, - "value": "prefers-reduced-motion", + "value": "PREFERS-reduced-motion", "raw": "PREFERS-reduced-motion" }, "value": { @@ -17698,7 +17698,7 @@ "end": 5085, "ctxt": 0 }, - "value": "root", + "value": "ROOT", "raw": "ROOT" }, "children": null diff --git a/crates/swc_css_parser/tests/fixture/at-rule/page/output.json b/crates/swc_css_parser/tests/fixture/at-rule/page/output.json index 8c8ab2f14e7..2964d9e19a7 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/page/output.json +++ b/crates/swc_css_parser/tests/fixture/at-rule/page/output.json @@ -3236,7 +3236,7 @@ "end": 1066, "ctxt": 0 }, - "value": "first", + "value": "FIRST", "raw": "FIRST" } } @@ -3311,7 +3311,7 @@ "end": 1081, "ctxt": 0 }, - "value": "left", + "value": "LEFT", "raw": "LEFT" } } diff --git a/crates/swc_css_parser/tests/fixture/at-rule/supports/output.json b/crates/swc_css_parser/tests/fixture/at-rule/supports/output.json index 963dda21661..7a8837a180a 100644 --- a/crates/swc_css_parser/tests/fixture/at-rule/supports/output.json +++ b/crates/swc_css_parser/tests/fixture/at-rule/supports/output.json @@ -825,7 +825,7 @@ "end": 330, "ctxt": 0 }, - "value": "supports", + "value": "SUPPORTS", "raw": "SUPPORTS" }, "prelude": { @@ -2930,7 +2930,7 @@ "end": 1255, "ctxt": 0 }, - "value": "not", + "value": "NOT", "raw": "NOT" }, "condition": { @@ -3064,7 +3064,7 @@ "end": 1317, "ctxt": 0 }, - "value": "or", + "value": "OR", "raw": "OR" }, "condition": { @@ -3115,7 +3115,7 @@ "end": 1344, "ctxt": 0 }, - "value": "and", + "value": "AND", "raw": "AND" }, "condition": { @@ -3279,7 +3279,7 @@ "end": 1416, "ctxt": 0 }, - "value": "or", + "value": "OR", "raw": "OR" }, "condition": { @@ -3335,7 +3335,7 @@ "end": 1443, "ctxt": 0 }, - "value": "and", + "value": "AND", "raw": "AND" }, "condition": { @@ -3479,7 +3479,7 @@ "end": 1489, "ctxt": 0 }, - "value": "not", + "value": "NOT", "raw": "NOT" }, "condition": { diff --git a/crates/swc_css_parser/tests/fixture/function/url/output.json b/crates/swc_css_parser/tests/fixture/function/url/output.json index 83275e10329..c7a7d370cab 100644 --- a/crates/swc_css_parser/tests/fixture/function/url/output.json +++ b/crates/swc_css_parser/tests/fixture/function/url/output.json @@ -269,7 +269,7 @@ "end": 229, "ctxt": 0 }, - "value": "url", + "value": "URL", "raw": "URL" }, "value": { diff --git a/crates/swc_css_parser/tests/fixture/hex-colors/output.json b/crates/swc_css_parser/tests/fixture/hex-colors/output.json index 2c8e0067fb9..f6cf5a3730b 100644 --- a/crates/swc_css_parser/tests/fixture/hex-colors/output.json +++ b/crates/swc_css_parser/tests/fixture/hex-colors/output.json @@ -174,7 +174,7 @@ "end": 57, "ctxt": 0 }, - "value": "ffffff", + "value": "FFFFFF", "raw": "FFFFFF" } ], @@ -236,7 +236,7 @@ "end": 97, "ctxt": 0 }, - "value": "0000ffcc", + "value": "0000FFCC", "raw": "0000FFCC" } ], @@ -329,7 +329,7 @@ "end": 142, "ctxt": 0 }, - "value": "fff", + "value": "FFF", "raw": "FFF" } ], @@ -422,7 +422,7 @@ "end": 190, "ctxt": 0 }, - "value": "ffff", + "value": "FFFF", "raw": "FFFF" } ], @@ -484,7 +484,7 @@ "end": 217, "ctxt": 0 }, - "value": "ff", + "value": "FF", "raw": "FF" } ], diff --git a/crates/swc_css_parser/tests/fixture/selector/attribute/output.json b/crates/swc_css_parser/tests/fixture/selector/attribute/output.json index e55e54cba38..3a52c970238 100644 --- a/crates/swc_css_parser/tests/fixture/selector/attribute/output.json +++ b/crates/swc_css_parser/tests/fixture/selector/attribute/output.json @@ -1253,7 +1253,7 @@ "end": 232, "ctxt": 0 }, - "value": "i", + "value": "I", "raw": "I" } } @@ -1497,7 +1497,7 @@ "end": 272, "ctxt": 0 }, - "value": "s", + "value": "S", "raw": "S" } } diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/an-plus-b/output.json b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/an-plus-b/output.json index 5648f1d9bb0..3ed4d9229ad 100644 --- a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/an-plus-b/output.json +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/an-plus-b/output.json @@ -6002,7 +6002,7 @@ "end": 1373, "ctxt": 0 }, - "value": "odd", + "value": "ODD", "raw": "ODD" } ] @@ -6090,7 +6090,7 @@ "end": 1392, "ctxt": 0 }, - "value": "odd", + "value": "oDd", "raw": "oDd" } ] @@ -6266,7 +6266,7 @@ "end": 1432, "ctxt": 0 }, - "value": "even", + "value": "eVeN", "raw": "eVeN" } ] @@ -6354,7 +6354,7 @@ "end": 1452, "ctxt": 0 }, - "value": "even", + "value": "EVEN", "raw": "EVEN" } ] diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/basic/output.json b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/basic/output.json index fc3102d6f55..8b5b001fa49 100644 --- a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/basic/output.json +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/basic/output.json @@ -502,7 +502,7 @@ "end": 75, "ctxt": 0 }, - "value": "input", + "value": "iNpUt", "raw": "iNpUt" } } @@ -2373,7 +2373,7 @@ "end": 461, "ctxt": 0 }, - "value": "hover", + "value": "hOvEr", "raw": "hOvEr" }, "children": null diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/dir/output.json b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/dir/output.json index 2077a250f0b..5ad6020dda7 100644 --- a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/dir/output.json +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/dir/output.json @@ -416,7 +416,7 @@ "end": 76, "ctxt": 0 }, - "value": "rtl", + "value": "RTL", "raw": "RTL" } ] diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/not/output.json b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/not/output.json index 5e3150c1363..f1d3dc11410 100644 --- a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/not/output.json +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/not/output.json @@ -682,7 +682,7 @@ "end": 83, "ctxt": 0 }, - "value": "foo", + "value": "FOO", "raw": "FOO" } } @@ -3120,7 +3120,7 @@ "end": 399, "ctxt": 0 }, - "value": "foo", + "value": "FOO", "raw": "FOO" } } diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-element/basic/output.json b/crates/swc_css_parser/tests/fixture/selector/pseudo-element/basic/output.json index e71132dd3e0..a9a7694b244 100644 --- a/crates/swc_css_parser/tests/fixture/selector/pseudo-element/basic/output.json +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-element/basic/output.json @@ -1771,7 +1771,7 @@ "end": 366, "ctxt": 0 }, - "value": "before", + "value": "bEfOrE", "raw": "bEfOrE" }, "children": null diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-element/slotted/output.json b/crates/swc_css_parser/tests/fixture/selector/pseudo-element/slotted/output.json index 7ccd7381532..1683a3f4b6a 100644 --- a/crates/swc_css_parser/tests/fixture/selector/pseudo-element/slotted/output.json +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-element/slotted/output.json @@ -414,7 +414,7 @@ "end": 75, "ctxt": 0 }, - "value": "span", + "value": "SPAN", "raw": "SPAN" } } diff --git a/crates/swc_css_parser/tests/fixture/selector/type/output.json b/crates/swc_css_parser/tests/fixture/selector/type/output.json index 2f05a0de818..16351a982dc 100644 --- a/crates/swc_css_parser/tests/fixture/selector/type/output.json +++ b/crates/swc_css_parser/tests/fixture/selector/type/output.json @@ -941,7 +941,7 @@ "end": 100, "ctxt": 0 }, - "value": "foreignobject", + "value": "foreignObject", "raw": "foreignObject" } } @@ -1070,7 +1070,7 @@ "end": 117, "ctxt": 0 }, - "value": "textpath", + "value": "textPath", "raw": "textPath" } } diff --git a/crates/swc_css_parser/tests/fixture/value/color/output.json b/crates/swc_css_parser/tests/fixture/value/color/output.json index 8312047f21e..801b97e22d1 100644 --- a/crates/swc_css_parser/tests/fixture/value/color/output.json +++ b/crates/swc_css_parser/tests/fixture/value/color/output.json @@ -491,7 +491,7 @@ "end": 171, "ctxt": 0 }, - "value": "rgb", + "value": "rGb", "raw": "rGb" }, "value": [ @@ -2419,7 +2419,7 @@ "end": 812, "ctxt": 0 }, - "value": "rgba", + "value": "rGbA", "raw": "rGbA" }, "value": [ @@ -3850,7 +3850,7 @@ "end": 1299, "ctxt": 0 }, - "value": "hsl", + "value": "HsL", "raw": "HsL" }, "value": [ diff --git a/crates/swc_css_parser/tests/fixture/value/dimension/output.json b/crates/swc_css_parser/tests/fixture/value/dimension/output.json index 76de9fa411e..fba53e5f9d0 100644 --- a/crates/swc_css_parser/tests/fixture/value/dimension/output.json +++ b/crates/swc_css_parser/tests/fixture/value/dimension/output.json @@ -276,7 +276,7 @@ "end": 79, "ctxt": 0 }, - "value": "px", + "value": "PX", "raw": "PX" } } diff --git a/crates/swc_css_parser/tests/fixture/value/frequency/output.json b/crates/swc_css_parser/tests/fixture/value/frequency/output.json index 9be13fdcbe2..e568d77797f 100644 --- a/crates/swc_css_parser/tests/fixture/value/frequency/output.json +++ b/crates/swc_css_parser/tests/fixture/value/frequency/output.json @@ -129,7 +129,7 @@ "end": 20, "ctxt": 0 }, - "value": "hz", + "value": "Hz", "raw": "Hz" } } @@ -178,7 +178,7 @@ "end": 36, "ctxt": 0 }, - "value": "khz", + "value": "kHz", "raw": "kHz" } } diff --git a/crates/swc_css_parser/tests/fixture/value/length/output.json b/crates/swc_css_parser/tests/fixture/value/length/output.json index eca92bffa45..156f97279ce 100644 --- a/crates/swc_css_parser/tests/fixture/value/length/output.json +++ b/crates/swc_css_parser/tests/fixture/value/length/output.json @@ -276,7 +276,7 @@ "end": 78, "ctxt": 0 }, - "value": "px", + "value": "PX", "raw": "PX" } } @@ -325,7 +325,7 @@ "end": 96, "ctxt": 0 }, - "value": "px", + "value": "pX", "raw": "pX" } } diff --git a/crates/swc_css_parser/tests/fixture/value/urange/output.json b/crates/swc_css_parser/tests/fixture/value/urange/output.json index 5190d4ea3fc..21bed75b1c9 100644 --- a/crates/swc_css_parser/tests/fixture/value/urange/output.json +++ b/crates/swc_css_parser/tests/fixture/value/urange/output.json @@ -213,7 +213,7 @@ "ctxt": 0 }, "start": "0", - "end": "7f", + "end": "7F", "raw": "U+0-7F" } ], @@ -245,7 +245,7 @@ "ctxt": 0 }, "start": "0025", - "end": "00ff", + "end": "00FF", "raw": "U+0025-00FF" } ], @@ -309,7 +309,7 @@ "ctxt": 0 }, "start": "0025", - "end": "00ff", + "end": "00FF", "raw": "U+0025-00FF" }, { @@ -360,7 +360,7 @@ "end": 398, "ctxt": 0 }, - "start": "a5", + "start": "A5", "end": null, "raw": "U+A5" }, @@ -380,8 +380,8 @@ "end": 411, "ctxt": 0 }, - "start": "4e00", - "end": "9fff", + "start": "4E00", + "end": "9FFF", "raw": "U+4E00-9FFF" }, { @@ -420,8 +420,8 @@ "end": 432, "ctxt": 0 }, - "start": "ff00", - "end": "ff9f", + "start": "FF00", + "end": "FF9F", "raw": "U+FF00-FF9F" } ], @@ -613,7 +613,7 @@ "ctxt": 0 }, "start": "1e1ee1", - "end": "ffffff", + "end": "FFFFFF", "raw": "U+1e1ee1-FFFFFF" } ], diff --git a/crates/swc_css_parser/tests/fixture/value/url/output.json b/crates/swc_css_parser/tests/fixture/value/url/output.json index e04ed194997..d31c7707527 100644 --- a/crates/swc_css_parser/tests/fixture/value/url/output.json +++ b/crates/swc_css_parser/tests/fixture/value/url/output.json @@ -369,7 +369,7 @@ "end": 291, "ctxt": 0 }, - "value": "url", + "value": "URL", "raw": "URL" }, "value": { @@ -419,7 +419,7 @@ "end": 346, "ctxt": 0 }, - "value": "url", + "value": "URL", "raw": "\\URL" }, "value": { @@ -1087,7 +1087,7 @@ "end": 948, "ctxt": 0 }, - "value": "src", + "value": "SRC", "raw": "SRC" }, "value": { diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/output.json index 9648ebdf8a3..129a5c0d458 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/39pbt1sIeFh8WWhCalZS4g/output.json @@ -112,7 +112,7 @@ "end": 17, "ctxt": 0 }, - "value": "abcd", + "value": "ABCD", "raw": "ABCD" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/output.json index 35b1afca55f..b0c0702bc45 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/3EgMpLwjJNG0ht4U_r6cnw/output.json @@ -112,7 +112,7 @@ "end": 21, "ctxt": 0 }, - "value": "abbbccdd", + "value": "ABBBCCDD", "raw": "ABBBCCDD" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/9IIa-42s3YQFw8ilk39GdQ/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/9IIa-42s3YQFw8ilk39GdQ/output.json index f4d1eb4e7b3..9f17ba114f9 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/9IIa-42s3YQFw8ilk39GdQ/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/9IIa-42s3YQFw8ilk39GdQ/output.json @@ -112,7 +112,7 @@ "end": 21, "ctxt": 0 }, - "value": "aabbccff", + "value": "AABBCCFF", "raw": "AABBCCFF" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/AigZ338AGwCqF4M9a3Quqw/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/AigZ338AGwCqF4M9a3Quqw/output.json index 2455ee0fedb..d5bbaf9e974 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/AigZ338AGwCqF4M9a3Quqw/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/AigZ338AGwCqF4M9a3Quqw/output.json @@ -112,7 +112,7 @@ "end": 21, "ctxt": 0 }, - "value": "aabcccdd", + "value": "AABCCCDD", "raw": "AABCCCDD" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/CQiowK9DjojqKtlpQifemA/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/CQiowK9DjojqKtlpQifemA/output.json index 65fb3208d72..51f4dbec10f 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/CQiowK9DjojqKtlpQifemA/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/CQiowK9DjojqKtlpQifemA/output.json @@ -112,7 +112,7 @@ "end": 19, "ctxt": 0 }, - "value": "abbbcc", + "value": "ABBBCC", "raw": "ABBBCC" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/LoeMqdekBkn3XKYHQFHOZA/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/LoeMqdekBkn3XKYHQFHOZA/output.json index cc3e1af1c0f..7dc32f59d3c 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/LoeMqdekBkn3XKYHQFHOZA/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/LoeMqdekBkn3XKYHQFHOZA/output.json @@ -112,7 +112,7 @@ "end": 19, "ctxt": 0 }, - "value": "aabccc", + "value": "AABCCC", "raw": "AABCCC" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/Oc6Obl7mbH-MlFllIoAbdg/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/Oc6Obl7mbH-MlFllIoAbdg/output.json index dc69aa591ab..a1f5f10a841 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/Oc6Obl7mbH-MlFllIoAbdg/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/Oc6Obl7mbH-MlFllIoAbdg/output.json @@ -112,7 +112,7 @@ "end": 21, "ctxt": 0 }, - "value": "aabbccde", + "value": "AABBCCDE", "raw": "AABBCCDE" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/R6OYU1g_sB_euLV8Yzjw6w/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/R6OYU1g_sB_euLV8Yzjw6w/output.json index 3fa8f1cd23e..54e39c003e5 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/R6OYU1g_sB_euLV8Yzjw6w/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/R6OYU1g_sB_euLV8Yzjw6w/output.json @@ -112,7 +112,7 @@ "end": 21, "ctxt": 0 }, - "value": "aabbccef", + "value": "AABBCCEF", "raw": "AABBCCEF" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/SFBgyV9jnFbMzWZoo9VbSQ/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/SFBgyV9jnFbMzWZoo9VbSQ/output.json index 9857a7d4056..64382d6f51c 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/SFBgyV9jnFbMzWZoo9VbSQ/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/SFBgyV9jnFbMzWZoo9VbSQ/output.json @@ -112,7 +112,7 @@ "end": 17, "ctxt": 0 }, - "value": "abcf", + "value": "ABCF", "raw": "ABCF" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/U2nuhvtnEWZ_kMd6i7EDWA/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/U2nuhvtnEWZ_kMd6i7EDWA/output.json index a72a4b18f27..368be993286 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/U2nuhvtnEWZ_kMd6i7EDWA/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/U2nuhvtnEWZ_kMd6i7EDWA/output.json @@ -112,7 +112,7 @@ "end": 19, "ctxt": 0 }, - "value": "aabbcd", + "value": "AABBCD", "raw": "AABBCD" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/W3R-c5DPSkhG9QWYdcFdFg/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/W3R-c5DPSkhG9QWYdcFdFg/output.json index 751f3080de4..22f039585bc 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/W3R-c5DPSkhG9QWYdcFdFg/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/W3R-c5DPSkhG9QWYdcFdFg/output.json @@ -112,7 +112,7 @@ "end": 21, "ctxt": 0 }, - "value": "aabbccdd", + "value": "AABBCCDD", "raw": "AABBCCDD" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/_APxY5Pe47Bb71-CwD1nhw/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/_APxY5Pe47Bb71-CwD1nhw/output.json index 6af0abf13e2..cc93f46e531 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/_APxY5Pe47Bb71-CwD1nhw/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/_APxY5Pe47Bb71-CwD1nhw/output.json @@ -112,7 +112,7 @@ "end": 21, "ctxt": 0 }, - "value": "aabbcdff", + "value": "AABBCDFF", "raw": "AABBCDFF" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/a0Yurt7E7InOYieD7nMCXg/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/a0Yurt7E7InOYieD7nMCXg/output.json index ad1b44ff347..4f28277c15f 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/a0Yurt7E7InOYieD7nMCXg/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/a0Yurt7E7InOYieD7nMCXg/output.json @@ -112,7 +112,7 @@ "end": 21, "ctxt": 0 }, - "value": "aabcccff", + "value": "AABCCCFF", "raw": "AABCCCFF" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/a7KElWOMF9ilrSsoliHkcg/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/a7KElWOMF9ilrSsoliHkcg/output.json index 452e2da1b69..054608ab312 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/a7KElWOMF9ilrSsoliHkcg/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/a7KElWOMF9ilrSsoliHkcg/output.json @@ -112,7 +112,7 @@ "end": 21, "ctxt": 0 }, - "value": "aabbcddd", + "value": "AABBCDDD", "raw": "AABBCDDD" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/pOZgFOB3GdVvQ0hiAsWfpQ/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/pOZgFOB3GdVvQ0hiAsWfpQ/output.json index 54c2f5b36c5..5e57b9faae1 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/pOZgFOB3GdVvQ0hiAsWfpQ/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/pOZgFOB3GdVvQ0hiAsWfpQ/output.json @@ -98,7 +98,7 @@ "end": 11, "ctxt": 0 }, - "value": "i", + "value": "I", "raw": "I" } } diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/qmXSF9N8euK5gfPoFGmV_Q/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/qmXSF9N8euK5gfPoFGmV_Q/output.json index 0e6884c42bf..87b87811e87 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/qmXSF9N8euK5gfPoFGmV_Q/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/qmXSF9N8euK5gfPoFGmV_Q/output.json @@ -112,7 +112,7 @@ "end": 19, "ctxt": 0 }, - "value": "aabbcc", + "value": "AABBCC", "raw": "AABBCC" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/xc1mD3YfHByTKL-N-FL49A/output.json b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/xc1mD3YfHByTKL-N-FL49A/output.json index 7c063a74d37..916efa4b4e8 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/xc1mD3YfHByTKL-N-FL49A/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/esbuild/misc/xc1mD3YfHByTKL-N-FL49A/output.json @@ -112,7 +112,7 @@ "end": 21, "ctxt": 0 }, - "value": "abbbccff", + "value": "ABBBCCFF", "raw": "ABBBCCFF" } ], diff --git a/crates/swc_css_parser/tests/fixture/vendor/rome/at-page/output.json b/crates/swc_css_parser/tests/fixture/vendor/rome/at-page/output.json index fed665b0414..e9825b1f002 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/rome/at-page/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/rome/at-page/output.json @@ -651,7 +651,7 @@ "end": 234, "ctxt": 0 }, - "value": "content", + "value": "CONTENT", "raw": "CONTENT" }, "value": [ @@ -685,7 +685,7 @@ "end": 255, "ctxt": 0 }, - "value": "margin-left", + "value": "MARGIN-LEFT", "raw": "MARGIN-LEFT" }, "value": [ diff --git a/crates/swc_css_parser/tests/fixture/vendor/rome/at-page/page-properties-case-insensitive/output.json b/crates/swc_css_parser/tests/fixture/vendor/rome/at-page/page-properties-case-insensitive/output.json index 4d85a7d2da6..3f223676c08 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/rome/at-page/page-properties-case-insensitive/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/rome/at-page/page-properties-case-insensitive/output.json @@ -55,7 +55,7 @@ "end": 17, "ctxt": 0 }, - "value": "display", + "value": "DISPLAY", "raw": "DISPLAY" }, "value": [ diff --git a/crates/swc_css_parser/tests/fixture/vendor/rome/selectors/output.json b/crates/swc_css_parser/tests/fixture/vendor/rome/selectors/output.json index cf1a94418ed..1fe94063a3f 100644 --- a/crates/swc_css_parser/tests/fixture/vendor/rome/selectors/output.json +++ b/crates/swc_css_parser/tests/fixture/vendor/rome/selectors/output.json @@ -1181,7 +1181,7 @@ "end": 239, "ctxt": 0 }, - "value": "s", + "value": "S", "raw": "S" } } diff --git a/crates/swc_css_parser/tests/recovery/hacks/output.json b/crates/swc_css_parser/tests/recovery/hacks/output.json index 424f80923d1..de9c52011fc 100644 --- a/crates/swc_css_parser/tests/recovery/hacks/output.json +++ b/crates/swc_css_parser/tests/recovery/hacks/output.json @@ -5942,7 +5942,7 @@ "end": 1980, "ctxt": 0 }, - "value": "-ie7", + "value": "-IE7", "raw": "-IE7" }, "children": null diff --git a/crates/swc_css_parser/tests/recovery/ie-progid/output.json b/crates/swc_css_parser/tests/recovery/ie-progid/output.json index 6b96b780380..4346cf1b261 100644 --- a/crates/swc_css_parser/tests/recovery/ie-progid/output.json +++ b/crates/swc_css_parser/tests/recovery/ie-progid/output.json @@ -456,7 +456,7 @@ "end": 172, "ctxt": 0 }, - "value": "blur", + "value": "Blur", "raw": "Blur" }, "value": [ @@ -608,7 +608,7 @@ "end": 227, "ctxt": 0 }, - "value": "wheel", + "value": "Wheel", "raw": "Wheel" }, "value": [ diff --git a/crates/swc_css_prefixer/src/prefixer.rs b/crates/swc_css_prefixer/src/prefixer.rs index ee0a8703145..292060b1516 100644 --- a/crates/swc_css_prefixer/src/prefixer.rs +++ b/crates/swc_css_prefixer/src/prefixer.rs @@ -566,7 +566,7 @@ impl VisitMut for CalcReplacer<'_> { return; } - let is_calc = n.name == "calc"; + let is_calc = n.name.as_str().eq_ignore_ascii_case("calc"); self.inside_calc = is_calc || is_webkit_calc || is_moz_calc; diff --git a/crates/swc_css_prefixer/tests/fixture/autofill/output.css b/crates/swc_css_prefixer/tests/fixture/autofill/output.css index dc345b4b19c..aae1785d010 100644 --- a/crates/swc_css_prefixer/tests/fixture/autofill/output.css +++ b/crates/swc_css_prefixer/tests/fixture/autofill/output.css @@ -4,6 +4,6 @@ input:-webkit-autofill { input:autofill { border: 3px solid blue; } -input:autofill { +input:AUTOFILL { border: 3px solid blue; } diff --git a/crates/swc_css_prefixer/tests/fixture/autofill/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/autofill/output.defaults-not-ie-11.css index 3e344ab6230..8e1dac1b33f 100644 --- a/crates/swc_css_prefixer/tests/fixture/autofill/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/autofill/output.defaults-not-ie-11.css @@ -1,6 +1,6 @@ input:autofill { border: 3px solid blue; } -input:autofill { +input:AUTOFILL { border: 3px solid blue; } diff --git a/crates/swc_css_prefixer/tests/fixture/calc/output.css b/crates/swc_css_prefixer/tests/fixture/calc/output.css index f29b9f27809..4da1619f3ff 100644 --- a/crates/swc_css_prefixer/tests/fixture/calc/output.css +++ b/crates/swc_css_prefixer/tests/fixture/calc/output.css @@ -25,8 +25,7 @@ div { .mixed-casing { width: -webkit-calc(1 + (2 * 2)); width: -moz-calc(1 + (2 * 2)); - width: calc(1 + (2 * 2)); - width: calc(1 + calc(2 * 2)); + width: calc(1 + cAlC(2 * 2)); } .multi-line { width: -webkit-calc(1 + (2 * 2)); @@ -73,8 +72,7 @@ div { width: calc((1 + calc(2 * 2)) * 10px); width: -webkit-calc((1 + (2 * 2)) * 10px); width: -moz-calc((1 + (2 * 2)) * 10px); - width: calc((1 + (2 * 2)) * 10px); - width: calc((1 + calc(2 * 2)) * 10px); + width: CALC((1 + CALC(2 * 2)) * 10px); padding: -webkit-calc((1 + (2 * 2)) * 10px) -webkit-calc((1 + (2 * 2)) * 10px); padding: -moz-calc((1 + (2 * 2)) * 10px) -moz-calc((1 + (2 * 2)) * 10px); padding: calc((1 + (2 * 2)) * 10px) calc((1 + (2 * 2)) * 10px); diff --git a/crates/swc_css_prefixer/tests/fixture/calc/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/calc/output.defaults-not-ie-11.css index f806876761f..05736e7ac51 100644 --- a/crates/swc_css_prefixer/tests/fixture/calc/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/calc/output.defaults-not-ie-11.css @@ -11,7 +11,7 @@ div { opacity: calc(1 + calc(2 * 2)); } .mixed-casing { - width: calc(1 + calc(2 * 2)); + width: calc(1 + cAlC(2 * 2)); } .multi-line { width: calc(1 + calc(2 * 2)); @@ -36,7 +36,7 @@ div { } .foo { width: calc((1 + calc(2 * 2)) * 10px); - width: calc((1 + calc(2 * 2)) * 10px); + width: CALC((1 + CALC(2 * 2)) * 10px); padding: calc((1 + calc(2 * 2)) * 10px) calc((1 + calc(2 * 2)) * 10px); padding: calc((1 + -webkit-calc(2 * 2)) * 10px); } diff --git a/crates/swc_css_prefixer/tests/fixture/case-insensivity/output.css b/crates/swc_css_prefixer/tests/fixture/case-insensivity/output.css index 5afb84238f6..3df6e9adcb6 100644 --- a/crates/swc_css_prefixer/tests/fixture/case-insensivity/output.css +++ b/crates/swc_css_prefixer/tests/fixture/case-insensivity/output.css @@ -1,24 +1,14 @@ a { - -webkit-appearance: NONE; - -moz-appearance: NONE; - -ms-appearance: NONE; - appearance: NONE; + APPEARANCE: NONE; } b { - -webkit-appearance: AUTO; - -moz-appearance: AUTO; - -ms-appearance: AUTO; - appearance: AUTO; + APPEARANCE: AUTO; } c { - -webkit-appearance: NONE; - -moz-appearance: NONE; - -ms-appearance: NONE; - appearance: NONE; + -WEBKIT-APPEARANCE: NONE; + APPEARANCE: NONE; } d { -webkit-appearance: NONE; - -moz-appearance: NONE; - -ms-appearance: NONE; - appearance: NONE; + APPEARANCE: NONE; } diff --git a/crates/swc_css_prefixer/tests/fixture/case-insensivity/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/case-insensivity/output.defaults-not-ie-11.css index a60999d496a..3df6e9adcb6 100644 --- a/crates/swc_css_prefixer/tests/fixture/case-insensivity/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/case-insensivity/output.defaults-not-ie-11.css @@ -1,14 +1,14 @@ a { - appearance: NONE; + APPEARANCE: NONE; } b { - appearance: AUTO; + APPEARANCE: AUTO; } c { - -webkit-appearance: NONE; - appearance: NONE; + -WEBKIT-APPEARANCE: NONE; + APPEARANCE: NONE; } d { -webkit-appearance: NONE; - appearance: NONE; + APPEARANCE: NONE; } diff --git a/crates/swc_css_prefixer/tests/fixture/cursor/output.css b/crates/swc_css_prefixer/tests/fixture/cursor/output.css index 5c90d3ac0d5..107983b0271 100644 --- a/crates/swc_css_prefixer/tests/fixture/cursor/output.css +++ b/crates/swc_css_prefixer/tests/fixture/cursor/output.css @@ -41,7 +41,7 @@ cursor: grabbing; } .class { - cursor: url(cursor_1.svg) 4 5, url(cursor_2.svg), image_set(url(foo.jpg) 2x) 5 5, -webkit-grab; - cursor: url(cursor_1.svg) 4 5, url(cursor_2.svg), image_set(url(foo.jpg) 2x) 5 5, -moz-grab; - cursor: url(cursor_1.svg) 4 5, url(cursor_2.svg), image_set(url(foo.jpg) 2x) 5 5, GRAB; + cursor: url(cursor_1.svg) 4 5, url(cursor_2.svg), IMAGE_SET(url(foo.jpg) 2x) 5 5, -webkit-grab; + cursor: url(cursor_1.svg) 4 5, url(cursor_2.svg), IMAGE_SET(url(foo.jpg) 2x) 5 5, -moz-grab; + cursor: url(cursor_1.svg) 4 5, url(cursor_2.svg), IMAGE_SET(url(foo.jpg) 2x) 5 5, GRAB; } diff --git a/crates/swc_css_prefixer/tests/fixture/cursor/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/cursor/output.defaults-not-ie-11.css index be6f4207e01..a957b94a10f 100644 --- a/crates/swc_css_prefixer/tests/fixture/cursor/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/cursor/output.defaults-not-ie-11.css @@ -29,5 +29,5 @@ cursor: grabbing; } .class { - cursor: url(cursor_1.svg) 4 5, url(cursor_2.svg), image_set(url(foo.jpg) 2x) 5 5, GRAB; + cursor: url(cursor_1.svg) 4 5, url(cursor_2.svg), IMAGE_SET(url(foo.jpg) 2x) 5 5, GRAB; } diff --git a/crates/swc_css_prefixer/tests/fixture/filter/output.css b/crates/swc_css_prefixer/tests/fixture/filter/output.css index e2315b5a60f..b879992a79e 100644 --- a/crates/swc_css_prefixer/tests/fixture/filter/output.css +++ b/crates/swc_css_prefixer/tests/fixture/filter/output.css @@ -13,11 +13,12 @@ a { transition: filter 2s; } div { - filter: progid:DXImageTransform.Microsoft.alpha(opacity=50); + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50); } b { filter: alpha(opacity=100); } em { - filter: alpha(opacity=100); + -webkit-filter: Alpha(opacity=100); + filter: Alpha(opacity=100); } diff --git a/crates/swc_css_prefixer/tests/fixture/filter/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/filter/output.defaults-not-ie-11.css index f5a494430dd..26ec654af3b 100644 --- a/crates/swc_css_prefixer/tests/fixture/filter/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/filter/output.defaults-not-ie-11.css @@ -7,11 +7,11 @@ a { transition: filter 2s; } div { - filter: progid:DXImageTransform.Microsoft.alpha(opacity=50); + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50); } b { filter: alpha(opacity=100); } em { - filter: alpha(opacity=100); + filter: Alpha(opacity=100); } diff --git a/crates/swc_css_prefixer/tests/fixture/font-face-format/output.css b/crates/swc_css_prefixer/tests/fixture/font-face-format/output.css index f03bb9840c6..b02cc4226f1 100644 --- a/crates/swc_css_prefixer/tests/fixture/font-face-format/output.css +++ b/crates/swc_css_prefixer/tests/fixture/font-face-format/output.css @@ -10,9 +10,8 @@ src: format("woff"), format("truetype"), format("opentype"), format("woff2"), format("embedded-opentype"), format("collection"), format("svg"); src: format(woff), format(truetype), format(opentype), format(woff2), format(embedded-opentype), format(collection), format(svg); } -@font-face{ - src: format("woff"); - src: format(WOFF); +@Font-face{ + src: FORMAT(WOFF); } @font-face{ src: format("woff"); diff --git a/crates/swc_css_prefixer/tests/fixture/font-face-format/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/font-face-format/output.defaults-not-ie-11.css index f03bb9840c6..b02cc4226f1 100644 --- a/crates/swc_css_prefixer/tests/fixture/font-face-format/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/font-face-format/output.defaults-not-ie-11.css @@ -10,9 +10,8 @@ src: format("woff"), format("truetype"), format("opentype"), format("woff2"), format("embedded-opentype"), format("collection"), format("svg"); src: format(woff), format(truetype), format(opentype), format(woff2), format(embedded-opentype), format(collection), format(svg); } -@font-face{ - src: format("woff"); - src: format(WOFF); +@Font-face{ + src: FORMAT(WOFF); } @font-face{ src: format("woff"); diff --git a/crates/swc_css_prefixer/tests/fixture/gradient/output.css b/crates/swc_css_prefixer/tests/fixture/gradient/output.css index 37c347efe28..0568f525062 100644 --- a/crates/swc_css_prefixer/tests/fixture/gradient/output.css +++ b/crates/swc_css_prefixer/tests/fixture/gradient/output.css @@ -170,16 +170,16 @@ div { background: linear-gradient(black); } .background-shorthand { - background: -webkit-radial-gradient(#fff, transparent) 0 0/ cover no-repeat #f0f; - background: -moz-radial-gradient(#fff, transparent) 0 0/ cover no-repeat #f0f; - background: -o-radial-gradient(#fff, transparent) 0 0/ cover no-repeat #f0f; - background: radial-gradient(#fff, transparent) 0 0/ cover no-repeat #f0f; + background: -webkit-radial-gradient(#FFF, transparent) 0 0/ cover no-repeat #F0F; + background: -moz-radial-gradient(#FFF, transparent) 0 0/ cover no-repeat #F0F; + background: -o-radial-gradient(#FFF, transparent) 0 0/ cover no-repeat #F0F; + background: radial-gradient(#FFF, transparent) 0 0/ cover no-repeat #F0F; } .background-advanced { - background: -webkit-radial-gradient(5px 15px, ellipse farthest-corner, rgba(214, 168, 18, 0.7) 0%, rgba(255, 21, 177, 0.7) 50%, rgba(210, 7, 148, 0.7) 95%), -webkit-radial-gradient(#fff, transparent), url(path/to/image.jpg) 50% / cover; - background: -moz-radial-gradient(5px 15px, ellipse farthest-corner, rgba(214, 168, 18, 0.7) 0%, rgba(255, 21, 177, 0.7) 50%, rgba(210, 7, 148, 0.7) 95%), -moz-radial-gradient(#fff, transparent), url(path/to/image.jpg) 50% / cover; - background: -o-radial-gradient(5px 15px, ellipse farthest-corner, rgba(214, 168, 18, 0.7) 0%, rgba(255, 21, 177, 0.7) 50%, rgba(210, 7, 148, 0.7) 95%), -o-radial-gradient(#fff, transparent), url(path/to/image.jpg) 50% / cover; - background: radial-gradient(ellipse farthest-corner at 5px 15px, rgba(214, 168, 18, 0.7) 0%, rgba(255, 21, 177, 0.7) 50%, rgba(210, 7, 148, 0.7) 95%), radial-gradient(#fff, transparent), url(path/to/image.jpg) 50% / cover; + background: -webkit-radial-gradient(5px 15px, ellipse farthest-corner, rgba(214, 168, 18, 0.7) 0%, rgba(255, 21, 177, 0.7) 50%, rgba(210, 7, 148, 0.7) 95%), -webkit-radial-gradient(#FFF, transparent), url(path/to/image.jpg) 50% / cover; + background: -moz-radial-gradient(5px 15px, ellipse farthest-corner, rgba(214, 168, 18, 0.7) 0%, rgba(255, 21, 177, 0.7) 50%, rgba(210, 7, 148, 0.7) 95%), -moz-radial-gradient(#FFF, transparent), url(path/to/image.jpg) 50% / cover; + background: -o-radial-gradient(5px 15px, ellipse farthest-corner, rgba(214, 168, 18, 0.7) 0%, rgba(255, 21, 177, 0.7) 50%, rgba(210, 7, 148, 0.7) 95%), -o-radial-gradient(#FFF, transparent), url(path/to/image.jpg) 50% / cover; + background: radial-gradient(ellipse farthest-corner at 5px 15px, rgba(214, 168, 18, 0.7) 0%, rgba(255, 21, 177, 0.7) 50%, rgba(210, 7, 148, 0.7) 95%), radial-gradient(#FFF, transparent), url(path/to/image.jpg) 50% / cover; } .multiradial { -webkit-mask-image: -webkit-radial-gradient(100% 50%, circle closest-corner, #000, transparent); @@ -262,8 +262,8 @@ div { background: linear-gradient(0turn, green, blue); } a { - background: -webkit-linear-gradient(99.5deg, white, black), -webkit-linear-gradient(220deg, black, white), -webkit-linear-gradient(45deg, black, white); - background: -moz-linear-gradient(99.5deg, white, black), -moz-linear-gradient(220deg, black, white), -moz-linear-gradient(45deg, black, white); - background: -o-linear-gradient(99.5deg, white, black), -o-linear-gradient(220deg, black, white), -o-linear-gradient(45deg, black, white); - background: linear-gradient(350.5deg, white, black), linear-gradient(-130deg, black, white), linear-gradient(45deg, black, white); + background: -webkit-linear-gradient(350.5DEG, white, black), -webkit-linear-gradient(-130DEG, black, white), -webkit-linear-gradient(45DEG, black, white); + background: -moz-linear-gradient(350.5DEG, white, black), -moz-linear-gradient(-130DEG, black, white), -moz-linear-gradient(45DEG, black, white); + background: -o-linear-gradient(350.5DEG, white, black), -o-linear-gradient(-130DEG, black, white), -o-linear-gradient(45DEG, black, white); + background: linear-gradient(350.5DEG, white, black), linear-gradient(-130DEG, black, white), linear-gradient(45DEG, black, white); } diff --git a/crates/swc_css_prefixer/tests/fixture/gradient/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/gradient/output.defaults-not-ie-11.css index 0889198b1d1..7b943569b3f 100644 --- a/crates/swc_css_prefixer/tests/fixture/gradient/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/gradient/output.defaults-not-ie-11.css @@ -83,10 +83,10 @@ div { background: linear-gradient(black); } .background-shorthand { - background: radial-gradient(#fff, transparent) 0 0/ cover no-repeat #f0f; + background: radial-gradient(#FFF, transparent) 0 0/ cover no-repeat #F0F; } .background-advanced { - background: radial-gradient(ellipse farthest-corner at 5px 15px, rgba(214, 168, 18, 0.7) 0%, rgba(255, 21, 177, 0.7) 50%, rgba(210, 7, 148, 0.7) 95%), radial-gradient(#fff, transparent), url(path/to/image.jpg) 50% / cover; + background: radial-gradient(ellipse farthest-corner at 5px 15px, rgba(214, 168, 18, 0.7) 0%, rgba(255, 21, 177, 0.7) 50%, rgba(210, 7, 148, 0.7) 95%), radial-gradient(#FFF, transparent), url(path/to/image.jpg) 50% / cover; } .multiradial { -webkit-mask-image: radial-gradient(circle closest-corner at 100% 50%, #000, transparent); @@ -124,5 +124,5 @@ div { background: linear-gradient(0turn, green, blue); } a { - background: linear-gradient(350.5deg, white, black), linear-gradient(-130deg, black, white), linear-gradient(45deg, black, white); + background: linear-gradient(350.5DEG, white, black), linear-gradient(-130DEG, black, white), linear-gradient(45DEG, black, white); } diff --git a/crates/swc_css_prefixer/tests/fixture/place/output.css b/crates/swc_css_prefixer/tests/fixture/place/output.css index 85126cdcb68..fd5d5bc8e4e 100644 --- a/crates/swc_css_prefixer/tests/fixture/place/output.css +++ b/crates/swc_css_prefixer/tests/fixture/place/output.css @@ -21,28 +21,10 @@ a { justify-self: center; place-self: center; } -a { - -webkit-align-content: space-between; - -ms-flex-line-pack: justify; - align-content: space-between; - -webkit-box-pack: center; - -webkit-justify-content: center; - -moz-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - place-content: space-between center; - -webkit-box-align: center; - -webkit-align-items: center; - -moz-box-align: center; - -ms-flex-align: center; - align-items: center; - justify-items: normal; - place-items: center normal; - -webkit-align-self: auto; - -ms-flex-item-align: auto; - align-self: auto; - justify-self: center; - place-self: auto center; +A { + PLACE-CONTENT: space-between center; + PLACE-ITEMS: center normal; + PLACE-SELF: auto center; } b { -webkit-align-content: space-between; diff --git a/crates/swc_css_prefixer/tests/fixture/place/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/place/output.defaults-not-ie-11.css index d23336ec569..95f8c2efad7 100644 --- a/crates/swc_css_prefixer/tests/fixture/place/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/place/output.defaults-not-ie-11.css @@ -3,10 +3,10 @@ a { place-items: center normal; place-self: center; } -a { - place-content: space-between center; - place-items: center normal; - place-self: auto center; +A { + PLACE-CONTENT: space-between center; + PLACE-ITEMS: center normal; + PLACE-SELF: auto center; } b { place-content: space-between; diff --git a/crates/swc_css_prefixer/tests/fixture/resolution/output.css b/crates/swc_css_prefixer/tests/fixture/resolution/output.css index 9080151e7cb..83255f11252 100644 --- a/crates/swc_css_prefixer/tests/fixture/resolution/output.css +++ b/crates/swc_css_prefixer/tests/fixture/resolution/output.css @@ -88,7 +88,7 @@ @media (min-resolution: 113.38dpcm), (-webkit-min-device-pixel-ratio: 3), (min--moz-device-pixel-ratio: 3) {} @media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (min-resolution: 2dppx) {} @media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2) {} -@media (min-resolution: 113.38dpcm), (-webkit-min-device-pixel-ratio: 3), (min--moz-device-pixel-ratio: 3) { +@media (min-resolution: 113.38DPCM), (-webkit-min-device-pixel-ratio: 113.38), (min--moz-device-pixel-ratio: 113.38) { .class { color: red; } diff --git a/crates/swc_css_prefixer/tests/fixture/resolution/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/resolution/output.defaults-not-ie-11.css index 1d9a9eab349..b409a11191a 100644 --- a/crates/swc_css_prefixer/tests/fixture/resolution/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/resolution/output.defaults-not-ie-11.css @@ -73,7 +73,7 @@ @media (min-resolution: 113.38dpcm), (-webkit-min-device-pixel-ratio: 3) {} @media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (min-resolution: 2dppx) {} @media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2) {} -@media (min-resolution: 113.38dpcm), (-webkit-min-device-pixel-ratio: 3) { +@media (min-resolution: 113.38DPCM), (-webkit-min-device-pixel-ratio: 113.38) { .class { color: red; } diff --git a/crates/swc_css_prefixer/tests/fixture/selection/output.css b/crates/swc_css_prefixer/tests/fixture/selection/output.css index 55b8d1ac178..5d657d2b7f7 100644 --- a/crates/swc_css_prefixer/tests/fixture/selection/output.css +++ b/crates/swc_css_prefixer/tests/fixture/selection/output.css @@ -10,6 +10,6 @@ ::selection { color: red; } -::selection { +::SeLeCtIoN { color: red; } diff --git a/crates/swc_css_prefixer/tests/fixture/selection/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/selection/output.defaults-not-ie-11.css index eae053d9057..81346603179 100644 --- a/crates/swc_css_prefixer/tests/fixture/selection/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/selection/output.defaults-not-ie-11.css @@ -4,6 +4,6 @@ ::selection { color: red; } -::selection { +::SeLeCtIoN { color: red; } diff --git a/crates/swc_css_prefixer/tests/fixture/transform/output.css b/crates/swc_css_prefixer/tests/fixture/transform/output.css index 5a8f5d5b370..3ebfcbb30f4 100644 --- a/crates/swc_css_prefixer/tests/fixture/transform/output.css +++ b/crates/swc_css_prefixer/tests/fixture/transform/output.css @@ -13,16 +13,18 @@ a { transition: -moz-transform 1s; transition: -o-transform 1s; transition: transform 1s; - -webkit-transform: rotatex(45deg); - -moz-transform: rotatex(45deg); - transform: rotatex(45deg); + -webkit-transform: rotateX(45deg); + -moz-transform: rotateX(45deg); + -ms-transform: rotateX(45deg); + -o-transform: rotateX(45deg); + transform: rotateX(45deg); } b { - -webkit-transform: translatex(45deg); - -moz-transform: translatex(45deg); - -ms-transform: translatex(45deg); - -o-transform: translatex(45deg); - transform: translatex(45deg); + -webkit-transform: translateX(45deg); + -moz-transform: translateX(45deg); + -ms-transform: translateX(45deg); + -o-transform: translateX(45deg); + transform: translateX(45deg); -webkit-transform-origin: 0 0; -moz-transform-origin: 0 0; -ms-transform-origin: 0 0; @@ -30,9 +32,11 @@ b { transform-origin: 0 0; } em { - -webkit-transform: rotatez(45deg); - -moz-transform: rotatez(45deg); - transform: rotatez(45deg); + -webkit-transform: rotateZ(45deg); + -moz-transform: rotateZ(45deg); + -ms-transform: rotateZ(45deg); + -o-transform: rotateZ(45deg); + transform: rotateZ(45deg); } @-webkit-keyframes anim { from { @@ -66,7 +70,7 @@ em { transform-style: flat; } .class { - -webkit-transform: perspective(500px) rotatey(3deg); - -moz-transform: perspective(500px) rotatey(3deg); - transform: perspective(500px) rotatey(3deg); + -webkit-transform: perspective(500px) rotateY(3deg); + -moz-transform: perspective(500px) rotateY(3deg); + transform: perspective(500px) rotateY(3deg); } diff --git a/crates/swc_css_prefixer/tests/fixture/transform/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/transform/output.defaults-not-ie-11.css index 0aeb7c2c8e6..cf300743ca3 100644 --- a/crates/swc_css_prefixer/tests/fixture/transform/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/transform/output.defaults-not-ie-11.css @@ -3,14 +3,14 @@ } a { transition: transform 1s; - transform: rotatex(45deg); + transform: rotateX(45deg); } b { - transform: translatex(45deg); + transform: translateX(45deg); transform-origin: 0 0; } em { - transform: rotatez(45deg); + transform: rotateZ(45deg); } @keyframes anim { from { @@ -21,5 +21,5 @@ em { transform-style: flat; } .class { - transform: perspective(500px) rotatey(3deg); + transform: perspective(500px) rotateY(3deg); } diff --git a/crates/swc_css_prefixer/tests/fixture/transition/output.css b/crates/swc_css_prefixer/tests/fixture/transition/output.css index 391dcf9a525..fb284f3edf1 100644 --- a/crates/swc_css_prefixer/tests/fixture/transition/output.css +++ b/crates/swc_css_prefixer/tests/fixture/transition/output.css @@ -91,11 +91,11 @@ input[type=range]::-webkit-slider-thumb { } button::-moz-submit-invalid { opacity: 1; - -webkit-transform: translatex(45px); - -moz-transform: translatex(45px); - -ms-transform: translatex(45px); - -o-transform: translatex(45px); - transform: translatex(45px); + -webkit-transform: translateX(45px); + -moz-transform: translateX(45px); + -ms-transform: translateX(45px); + -o-transform: translateX(45px); + transform: translateX(45px); -webkit-transition: opacity 0.5s 2s, -webkit-transform 0.5s 0.5s; -moz-transition: opacity 0.5s 2s, -moz-transform 0.5s 0.5s; -o-transition: opacity 0.5s 2s, -o-transform 0.5s 0.5s; @@ -107,11 +107,11 @@ button::-moz-submit-invalid { @supports ((transition: opacity 0.5s 2s, transform 0.5s 0.5s) or (-webkit-transition: opacity 0.5s 2s, -webkit-transform 0.5s 0.5s) or (-moz-transition: opacity 0.5s 2s, -moz-transform 0.5s 0.5s) or (-o-transition: opacity 0.5s 2s, -o-transform 0.5s 0.5s) or (transition: opacity 0.5s 2s, -webkit-transform 0.5s 0.5s) or (transition: opacity 0.5s 2s, -moz-transform 0.5s 0.5s) or (transition: opacity 0.5s 2s, -o-transform 0.5s 0.5s)) { button::-moz-submit-invalid { opacity: 1; - -webkit-transform: translatex(45px); - -moz-transform: translatex(45px); - -ms-transform: translatex(45px); - -o-transform: translatex(45px); - transform: translatex(45px); + -webkit-transform: translateX(45px); + -moz-transform: translateX(45px); + -ms-transform: translateX(45px); + -o-transform: translateX(45px); + transform: translateX(45px); -webkit-transition: opacity 0.5s 2s, -webkit-transform 0.5s 0.5s; -moz-transition: opacity 0.5s 2s, -moz-transform 0.5s 0.5s; -o-transition: opacity 0.5s 2s, -o-transform 0.5s 0.5s; @@ -122,11 +122,11 @@ button::-moz-submit-invalid { } button { opacity: 1; - -webkit-transform: translatex(45px); - -moz-transform: translatex(45px); - -ms-transform: translatex(45px); - -o-transform: translatex(45px); - transform: translatex(45px); + -webkit-transform: translateX(45px); + -moz-transform: translateX(45px); + -ms-transform: translateX(45px); + -o-transform: translateX(45px); + transform: translateX(45px); -webkit-transition: opacity 0.5s 2s, -webkit-transform 0.5s 0.5s; -moz-transition: opacity 0.5s 2s, -moz-transform 0.5s 0.5s; -o-transition: opacity 0.5s 2s, -o-transform 0.5s 0.5s; diff --git a/crates/swc_css_prefixer/tests/fixture/transition/output.defaults-not-ie-11.css b/crates/swc_css_prefixer/tests/fixture/transition/output.defaults-not-ie-11.css index 085eb533fa2..40469a60570 100644 --- a/crates/swc_css_prefixer/tests/fixture/transition/output.defaults-not-ie-11.css +++ b/crates/swc_css_prefixer/tests/fixture/transition/output.defaults-not-ie-11.css @@ -31,18 +31,18 @@ input[type=range]::-webkit-slider-thumb { } button::-moz-submit-invalid { opacity: 1; - transform: translatex(45px); + transform: translateX(45px); transition: opacity 0.5s 2s, transform 0.5s 0.5s; } @supports (transition: opacity 0.5s 2s, transform 0.5s 0.5s) { button::-moz-submit-invalid { opacity: 1; - transform: translatex(45px); + transform: translateX(45px); transition: opacity 0.5s 2s, transform 0.5s 0.5s; } button { opacity: 1; - transform: translatex(45px); + transform: translateX(45px); transition: opacity 0.5s 2s, transform 0.5s 0.5s; } } diff --git a/crates/swc_css_utils/src/lib.rs b/crates/swc_css_utils/src/lib.rs index acdb4265257..1fd3f5da9b8 100644 --- a/crates/swc_css_utils/src/lib.rs +++ b/crates/swc_css_utils/src/lib.rs @@ -4,7 +4,7 @@ use std::{borrow::Cow, f64::consts::PI, str}; use once_cell::sync::Lazy; use serde::{Deserialize, Serialize}; -use swc_atoms::StaticString; +use swc_atoms::{Atom, StaticString}; use swc_common::collections::AHashMap; use swc_css_ast::*; use swc_css_visit::{VisitMut, VisitMutWith}; @@ -391,8 +391,8 @@ pub fn hex_to_rgba(hex: &str) -> (u8, u8, u8, f64) { } } -pub fn angle_to_deg(value: f64, from: &str) -> f64 { - match from { +pub fn angle_to_deg(value: f64, from: &Atom) -> f64 { + match &*from.to_ascii_lowercase() { "deg" => value, "grad" => value * 180.0 / 200.0, "turn" => value * 360.0,