From bff7de3ea299178f37a89e828d7a43708c9ef10f Mon Sep 17 00:00:00 2001 From: Evilebot Tnawi Date: Mon, 12 Feb 2018 20:11:55 +0300 Subject: [PATCH] tests(css): more tests around pseudo-classes and pseudo-elements (#3957) --- .../css_case/__snapshots__/jsfmt.spec.js.snap | 108 ++++++++++++++++++ tests/css_case/case.css | 18 +++ tests/css_case/case.less | 18 +++ tests/css_case/case.scss | 18 +++ 4 files changed, 162 insertions(+) diff --git a/tests/css_case/__snapshots__/jsfmt.spec.js.snap b/tests/css_case/__snapshots__/jsfmt.spec.js.snap index 67f275b2..d3f1dc47 100644 --- a/tests/css_case/__snapshots__/jsfmt.spec.js.snap +++ b/tests/css_case/__snapshots__/jsfmt.spec.js.snap @@ -6,6 +6,24 @@ exports[`case.css 1`] = ` .foo { color: hsl(0.75TURN, 60%, 70%); } + +p:FIRST-CHILD { + color: lime; + background-color: black; + padding: 5px; +} + +a::AFTER { + content: "→"; +} + +a:AFTER { + content: "→"; +} + +::-WEBKIT-PROGRESS-BAR { + background-color: orange; +} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @custom-media --KeepName (min-width: 500px); @@ -13,6 +31,24 @@ exports[`case.css 1`] = ` color: hsl(0.75turn, 60%, 70%); } +p:first-child { + color: lime; + background-color: black; + padding: 5px; +} + +a::after { + content: "→"; +} + +a:after { + content: "→"; +} + +::-webkit-progress-bar { + background-color: orange; +} + `; exports[`case.less 1`] = ` @@ -139,6 +175,24 @@ $KeepScssVar: val; .foo { color: hsl(0.75TURN, 60%, 70%); } + +p:FIRST-CHILD { + color: lime; + background-color: black; + padding: 5px; +} + +a::AFTER { + content: "→"; +} + +a:AFTER { + content: "→"; +} + +::-WEBKIT-PROGRESS-BAR { + background-color: orange; +} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Convention in this test file: // - The case should be preserved for things prefixed with "Keep". @@ -272,6 +326,24 @@ $KeepScssVar: val; color: hsl(0.75turn, 60%, 70%); } +p:first-child { + color: lime; + background-color: black; + padding: 5px; +} + +a::after { + content: "→"; +} + +a:after { + content: "→"; +} + +::-webkit-progress-bar { + background-color: orange; +} + `; exports[`case.scss 1`] = ` @@ -400,6 +472,24 @@ $KeepTopLevelVar: val; .foo { color: hsl(0.75TURN, 60%, 70%); } + +p:FIRST-CHILD { + color: lime; + background-color: black; + padding: 5px; +} + +a::AFTER { + content: "→"; +} + +a:AFTER { + content: "→"; +} + +::-WEBKIT-PROGRESS-BAR { + background-color: orange; +} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Convention in this test file: // - The case should be preserved for things prefixed with "Keep". @@ -530,4 +620,22 @@ $KeepTopLevelVar: val; color: hsl(0.75turn, 60%, 70%); } +p:first-child { + color: lime; + background-color: black; + padding: 5px; +} + +a::after { + content: "→"; +} + +a:after { + content: "→"; +} + +::-webkit-progress-bar { + background-color: orange; +} + `; diff --git a/tests/css_case/case.css b/tests/css_case/case.css index 8d705c02..4fdff82b 100644 --- a/tests/css_case/case.css +++ b/tests/css_case/case.css @@ -3,3 +3,21 @@ .foo { color: hsl(0.75TURN, 60%, 70%); } + +p:FIRST-CHILD { + color: lime; + background-color: black; + padding: 5px; +} + +a::AFTER { + content: "→"; +} + +a:AFTER { + content: "→"; +} + +::-WEBKIT-PROGRESS-BAR { + background-color: orange; +} diff --git a/tests/css_case/case.less b/tests/css_case/case.less index b650c46f..1afb47c5 100644 --- a/tests/css_case/case.less +++ b/tests/css_case/case.less @@ -121,3 +121,21 @@ $KeepScssVar: val; .foo { color: hsl(0.75TURN, 60%, 70%); } + +p:FIRST-CHILD { + color: lime; + background-color: black; + padding: 5px; +} + +a::AFTER { + content: "→"; +} + +a:AFTER { + content: "→"; +} + +::-WEBKIT-PROGRESS-BAR { + background-color: orange; +} diff --git a/tests/css_case/case.scss b/tests/css_case/case.scss index 90215aec..1e1c5fee 100644 --- a/tests/css_case/case.scss +++ b/tests/css_case/case.scss @@ -123,3 +123,21 @@ $KeepTopLevelVar: val; .foo { color: hsl(0.75TURN, 60%, 70%); } + +p:FIRST-CHILD { + color: lime; + background-color: black; + padding: 5px; +} + +a::AFTER { + content: "→"; +} + +a:AFTER { + content: "→"; +} + +::-WEBKIT-PROGRESS-BAR { + background-color: orange; +}