Fix css tests (#8264)
* fix `stylefmt-repo` parser * Fix tests * Fix snapshots * fix parsers
This commit is contained in:
1 parent
ce2114533a
commit
85a2db5a0c
36 files changed
+1286
-1193
No files matched your search
@@ -137,645 +137,6 @@ x-panel {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`case.less format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
// in selectors, as well as function names and property keywords.
|
||||
// - Other things should mostly be lowercase.
|
||||
// - The \`/*:*/\` comments are just to bust the \`isLikelySCSS\` check.
|
||||
|
||||
@IMPORT Keep;
|
||||
|
||||
HTML#KeepId.KeepClass,
|
||||
a[HREF=KeepAttrValue]:HOVER::FIRST-letter,
|
||||
svg[viewBox] linearGradient,
|
||||
:Not(:NTH-child(2N+1)) {
|
||||
COLOR: #AAbbCC;
|
||||
BACKGROUND-image: URL("KeepString");
|
||||
Margin: 5PX .2E10Em;
|
||||
--Keep-custom-Prop: red;
|
||||
background: Var(--Keep-custom-Prop);
|
||||
animation-name: KeepAnimationName;
|
||||
important: something !IMPORTANT;
|
||||
font-family: INITIAL;
|
||||
padding: UNSET;
|
||||
border: INHERIT;
|
||||
all: REVERT;
|
||||
-WEBKIT-USER-SELECT: none;
|
||||
-MOZ-USER-SELECT: none;
|
||||
-MS-USER-SELECT: none;
|
||||
USER-SELECT: none;
|
||||
}
|
||||
|
||||
@keyframes KeepAnimationName {
|
||||
FROM {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@{KeepInterpolationVar} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
TO {
|
||||
prop: val;
|
||||
}
|
||||
}
|
||||
|
||||
@custom-media --KeepCustomMedia screen and (width >= 768px);
|
||||
@media (--KeepCustomMedia) {}
|
||||
|
||||
@KeepDetachedRuleset: /*:*/ {
|
||||
BACKGROUND: RED;
|
||||
}
|
||||
|
||||
%KeepScssPlaceholderSelector {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@KeepTopLevelVar: val;
|
||||
$KeepScssVar: val;
|
||||
|
||||
.Keep(@Keep: 12e03PX) when (@Keep=Case) /*:*/ {
|
||||
@KeepVar: KeepName; /*:*/
|
||||
@{KeepInterpolationVar}: val;
|
||||
$KeepScssVar: val;
|
||||
@extend %KeepScssPlaceholderSelector;
|
||||
|
||||
@{Keep}[@{Keep}][@{Keep}^=@{Keep-1A}]:@{Keep} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
&Keep & Element {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@KeepDetachedRuleset();
|
||||
|
||||
&:extend(.Keep ALL);
|
||||
&:EXTEND(.Keep ALL);
|
||||
|
||||
.Keep;
|
||||
.Keep();
|
||||
.Keep(4PX)!IMPORTANT;
|
||||
.Keep() when (@Keep=Keep);
|
||||
.Keep() when (@Keep=12PX);
|
||||
.Keep() when (@Keep="12px");
|
||||
.Keep() when (@Keep="12PX");
|
||||
.Keep() when (@Keep=Keep12PX);
|
||||
}
|
||||
|
||||
.Keep (@Keep) when (lightness(@Keep) >= 12PX) and (@Keep > 0) {}
|
||||
.Keep (@Keep) when (lightness(@Keep) != '12PX') and (@Keep != "12PX") {}
|
||||
.Keep (@Keep) when (lightness(@Keep) >= Keep12PX) and (@Keep > @Keep12E5) {}
|
||||
|
||||
.Keep(@Keep: 12PX; @Keep: @Keep12PX; ...) /*:*/ {}
|
||||
.Keep(@Keep: '12PX'; @Keep: "12PX"; ...) /*:*/ {}
|
||||
|
||||
@MEDIA (MIN-WIDTH: 700PX) /*:*/ {}
|
||||
|
||||
@MEDIA (@{Keep}: @{Keep}) {}
|
||||
|
||||
@KEYFRAMES identifier {
|
||||
FROM {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
TO {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@-WEBKIT-KEYFRAMES float-up {
|
||||
FROM {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
TO {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
TABLE {}
|
||||
|
||||
.foo { &-KeepSelector {} &-KeepSelector & .KeepClassSelector {} &-100\\.200 {} }
|
||||
|
||||
=====================================output=====================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
// in selectors, as well as function names and property keywords.
|
||||
// - Other things should mostly be lowercase.
|
||||
// - The \`/*:*/\` comments are just to bust the \`isLikelySCSS\` check.
|
||||
|
||||
@import Keep;
|
||||
|
||||
HTML#KeepId.KeepClass,
|
||||
a[HREF="KeepAttrValue"]:hover::first-letter,
|
||||
svg[viewBox] linearGradient,
|
||||
:not(:nth-child(2n + 1)) {
|
||||
color: #aabbcc;
|
||||
background-image: URL("KeepString");
|
||||
margin: 5px 0.2e10em;
|
||||
--Keep-custom-Prop: red;
|
||||
background: Var(--Keep-custom-Prop);
|
||||
animation-name: KeepAnimationName;
|
||||
important: something !important;
|
||||
font-family: initial;
|
||||
padding: unset;
|
||||
border: inherit;
|
||||
all: revert;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@keyframes KeepAnimationName {
|
||||
from {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@{KeepInterpolationVar} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
to {
|
||||
prop: val;
|
||||
}
|
||||
}
|
||||
|
||||
@custom-media --KeepCustomMedia screen and (width >= 768px);
|
||||
@media (--KeepCustomMedia) {
|
||||
}
|
||||
|
||||
@KeepDetachedRuleset: /*:*/ {
|
||||
background: RED;
|
||||
};
|
||||
|
||||
%KeepScssPlaceholderSelector {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@KeepTopLevelVar: val;
|
||||
$KeepScssVar: val;
|
||||
|
||||
.Keep(@Keep: 12e03PX) when (@Keep=Case) /*:*/ {
|
||||
@KeepVar: KeepName; /*:*/
|
||||
@{KeepInterpolationVar}: val;
|
||||
$KeepScssVar: val;
|
||||
@extend %KeepScssPlaceholderSelector;
|
||||
|
||||
@{Keep}[@{Keep}][@{Keep}^=@{Keep-1A}]:@{Keep} {
|
||||
prop: val;
|
||||
};
|
||||
|
||||
&Keep & Element {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@KeepDetachedRuleset();
|
||||
|
||||
&:extend(.Keep ALL);
|
||||
&:EXTEND(.Keep ALL);
|
||||
|
||||
.Keep;
|
||||
.Keep();
|
||||
.Keep(4px) !important;
|
||||
.Keep() when (@Keep=Keep);
|
||||
.Keep() when (@Keep=12px);
|
||||
.Keep() when (@Keep="12px");
|
||||
.Keep() when (@Keep="12PX");
|
||||
.Keep() when (@Keep=Keep12PX);
|
||||
}
|
||||
|
||||
.Keep (@Keep) when (lightness(@Keep) >= 12px) and (@Keep > 0) {
|
||||
}
|
||||
.Keep (@Keep) when (lightness(@Keep) != "12PX") and (@Keep != "12PX") {
|
||||
}
|
||||
.Keep (@Keep) when (lightness(@Keep) >= Keep12PX) and (@Keep > @Keep12E5) {
|
||||
}
|
||||
|
||||
.Keep(@Keep: 12PX; @Keep: @Keep12PX; ...) /*:*/ {
|
||||
}
|
||||
.Keep(@Keep: '12PX'; @Keep: "12PX"; ...) /*:*/ {
|
||||
}
|
||||
|
||||
@media (min-width: 700px) /*:*/ {
|
||||
}
|
||||
|
||||
@media (@{Keep}: @{Keep}) {
|
||||
}
|
||||
|
||||
@keyframes identifier {
|
||||
from {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
to {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes float-up {
|
||||
from {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
to {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
TABLE {
|
||||
}
|
||||
|
||||
.foo {
|
||||
&-KeepSelector {
|
||||
}
|
||||
&-KeepSelector & .KeepClassSelector {
|
||||
}
|
||||
&-100\\.200 {
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`case.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
// in selectors, as well as function names and property keywords.
|
||||
// - Other things should mostly be lowercase.
|
||||
|
||||
@IMPORT Keep;
|
||||
|
||||
HTML#KeepId.KeepClass,
|
||||
a[HREF=KeepAttrValue]:HOVER::FIRST-letter,
|
||||
svg[viewBox] linearGradient,
|
||||
:Not(:NTH-child(2N+1)) {
|
||||
COLOR: #AAbbCC;
|
||||
BACKGROUND-image: URL("KeepString");
|
||||
Margin: 5PX .2E10Em;
|
||||
--Keep-custom-Prop: red;
|
||||
background: Var(--Keep-custom-Prop);
|
||||
animation-name: KeepAnimationName;
|
||||
important: something !IMPORTANT;
|
||||
font-family: INITIAL;
|
||||
padding: UNSET;
|
||||
border: INHERIT;
|
||||
all: REVERT;
|
||||
-WEBKIT-USER-SELECT: none;
|
||||
-MOZ-USER-SELECT: none;
|
||||
-MS-USER-SELECT: none;
|
||||
USER-SELECT: none;
|
||||
}
|
||||
|
||||
@keyframes KeepAnimationName {
|
||||
FROM {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
#{$KeepInterpolationVar},
|
||||
#{$Keep + 15PX + Keep15PX + '15PX' + "15PX"},
|
||||
#{$Keep + $Keep15PX} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
TO {
|
||||
prop: val;
|
||||
}
|
||||
}
|
||||
|
||||
@custom-media --KeepCustomMedia screen and (width >= 768px);
|
||||
@media (--KeepCustomMedia) {}
|
||||
|
||||
@function KeepFuncName() {
|
||||
@return 12;
|
||||
}
|
||||
|
||||
%KeepPlaceholderSelector {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
$KeepTopLevelVar: val;
|
||||
@KeepLessVar: val;
|
||||
|
||||
@mixin KeepMixinName($Keep: 15IN, $Keep: $Keep15IN, $Keep: Keep-1E-2Em) {
|
||||
$KeepVar: KeepFuncName();
|
||||
#{$KeepInterpolationVar}: val;
|
||||
#{$Keep + 15PX}: val;
|
||||
#{$Keep + $Keep15PX}: val;
|
||||
@KeepLessVar: val;
|
||||
@extend %KeepPlaceholderSelector;
|
||||
|
||||
#{$Keep}[#{$Keep}][#{Keep}^=#{Keep-1A}]:#{$Keep} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
&Keep & Element {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
BACKGROUND: {
|
||||
COLOR: RED;
|
||||
}
|
||||
|
||||
BACKGROUND: Keep 15PX Keep15PX {
|
||||
COLOR: RED;
|
||||
}
|
||||
|
||||
#{$Keep + 15PX + Keep15PX + '15PX' + "15PX"}: {
|
||||
COLOR: RED;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin Keep($Keep: $Keep15IN, $Keep: Keepå1E1) {}
|
||||
|
||||
@MEDIA (MIN-WIDTH: 700PX) {
|
||||
@include Keep;
|
||||
@include Keep(.12e+01cH);
|
||||
@include Keep($Keep12E01cH);
|
||||
}
|
||||
|
||||
@MEDIA (#{$Keep}: #{$Keep}) {}
|
||||
|
||||
@KEYFRAMES identifier {
|
||||
FROM {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
TO {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@-WEBKIT-KEYFRAMES float-up {
|
||||
FROM {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
TO {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
TABLE {}
|
||||
|
||||
.foo { &-KeepSelector {} &-KeepSelector & .KeepClassSelector {} &-100\\.200 {} }
|
||||
|
||||
=====================================output=====================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
// in selectors, as well as function names and property keywords.
|
||||
// - Other things should mostly be lowercase.
|
||||
|
||||
@import Keep;
|
||||
|
||||
HTML#KeepId.KeepClass,
|
||||
a[HREF="KeepAttrValue"]:hover::first-letter,
|
||||
svg[viewBox] linearGradient,
|
||||
:not(:nth-child(2n + 1)) {
|
||||
color: #aabbcc;
|
||||
background-image: URL("KeepString");
|
||||
margin: 5px 0.2e10em;
|
||||
--Keep-custom-Prop: red;
|
||||
background: Var(--Keep-custom-Prop);
|
||||
animation-name: KeepAnimationName;
|
||||
important: something !important;
|
||||
font-family: initial;
|
||||
padding: unset;
|
||||
border: inherit;
|
||||
all: revert;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@keyframes KeepAnimationName {
|
||||
from {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
#{$KeepInterpolationVar},
|
||||
#{$Keep + 15px + Keep15PX + "15PX" + "15PX"},
|
||||
#{$Keep + $Keep15PX} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
to {
|
||||
prop: val;
|
||||
}
|
||||
}
|
||||
|
||||
@custom-media --KeepCustomMedia screen and (width >= 768px);
|
||||
@media (--KeepCustomMedia) {
|
||||
}
|
||||
|
||||
@function KeepFuncName() {
|
||||
@return 12;
|
||||
}
|
||||
|
||||
%KeepPlaceholderSelector {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
$KeepTopLevelVar: val;
|
||||
@KeepLessVar: val;
|
||||
|
||||
@mixin KeepMixinName($Keep: 15in, $Keep: $Keep15IN, $Keep: Keep-1E-2Em) {
|
||||
$KeepVar: KeepFuncName();
|
||||
#{$KeepInterpolationVar}: val;
|
||||
#{$Keep + 15PX}: val;
|
||||
#{$Keep + $Keep15PX}: val;
|
||||
@KeepLessVar: val;
|
||||
@extend %KeepPlaceholderSelector;
|
||||
|
||||
#{$Keep}[#{$Keep}][#{Keep}^="#{Keep-1A}"]:#{$Keep} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
&Keep & Element {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
background: {
|
||||
color: RED;
|
||||
}
|
||||
|
||||
background: Keep 15px Keep15PX {
|
||||
color: RED;
|
||||
}
|
||||
|
||||
#{$Keep + 15px + Keep15PX + "15PX" + "15PX"}: {
|
||||
color: RED;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin Keep($Keep: $Keep15IN, $Keep: Keepå1E1) {
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
@include Keep;
|
||||
@include Keep(0.12e1ch);
|
||||
@include Keep($Keep12E01cH);
|
||||
}
|
||||
|
||||
@media (#{$Keep}: #{$Keep}) {
|
||||
}
|
||||
|
||||
@keyframes identifier {
|
||||
from {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
to {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes float-up {
|
||||
from {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
to {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
TABLE {
|
||||
}
|
||||
|
||||
.foo {
|
||||
&-KeepSelector {
|
||||
}
|
||||
&-KeepSelector & .KeepClassSelector {
|
||||
}
|
||||
&-100\\.200 {
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`custom-selectors.css format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
|
||||
@@ -50,191 +50,6 @@ printWidth: 80
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`CRLF.less format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@nice-blue: #5B83AD;
|
||||
@light-blue: @nice-blue + #111;
|
||||
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 2
|
||||
*/
|
||||
#header {
|
||||
// Comment 3
|
||||
/*
|
||||
* Comment 4
|
||||
*/
|
||||
color: @light-blue;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 5
|
||||
*/
|
||||
body {
|
||||
background-color: lightblue; // Comment 6
|
||||
color: red; /* Comment 7 */
|
||||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@nice-blue: #5B83AD;
|
||||
@light-blue: @nice-blue + #111;
|
||||
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 2
|
||||
*/
|
||||
#header {
|
||||
// Comment 3
|
||||
/*
|
||||
* Comment 4
|
||||
*/
|
||||
color: @light-blue;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 5
|
||||
*/
|
||||
body {
|
||||
background-color: lightblue; // Comment 6
|
||||
color: red; /* Comment 7 */
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`CRLF.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$nice-blue: #5B83AD;
|
||||
$light-blue: $nice-blue + #111;
|
||||
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 2
|
||||
*/
|
||||
#header {
|
||||
// Comment 3
|
||||
/*
|
||||
* Comment 4
|
||||
*/
|
||||
color: @light-blue;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 5
|
||||
*/
|
||||
body {
|
||||
background-color: lightblue; // Comment 6
|
||||
color: red; /* Comment 7 */
|
||||
}
|
||||
}
|
||||
|
||||
@mixin create-rules($padding) {
|
||||
//
|
||||
// Comment 8
|
||||
//
|
||||
.abc {
|
||||
padding: $padding;
|
||||
}
|
||||
/**
|
||||
* Comment 9
|
||||
*/
|
||||
.def {
|
||||
padding: $padding;
|
||||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
$nice-blue: #5b83ad;
|
||||
$light-blue: $nice-blue + #111;
|
||||
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 2
|
||||
*/
|
||||
#header {
|
||||
// Comment 3
|
||||
/*
|
||||
* Comment 4
|
||||
*/
|
||||
color: @light-blue;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 5
|
||||
*/
|
||||
body {
|
||||
background-color: lightblue; // Comment 6
|
||||
color: red; /* Comment 7 */
|
||||
}
|
||||
}
|
||||
|
||||
@mixin create-rules($padding) {
|
||||
//
|
||||
// Comment 8
|
||||
//
|
||||
.abc {
|
||||
padding: $padding;
|
||||
}
|
||||
/**
|
||||
* Comment 9
|
||||
*/
|
||||
.def {
|
||||
padding: $padding;
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`at-rule.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@at-root .foo
|
||||
// .bar
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@at-root
|
||||
// .bar
|
||||
.foo
|
||||
{
|
||||
|
||||
}
|
||||
=====================================output=====================================
|
||||
@at-root .foo
|
||||
// .bar
|
||||
{
|
||||
}
|
||||
|
||||
@at-root // .bar
|
||||
.foo {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`at-rules.css format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
@@ -683,120 +498,6 @@ body {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`if-eslit-at-rule-decloration.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@function _normalize-include($section) {
|
||||
// Check if $section is in the $include list.
|
||||
@if index($_normalize-include, $section) {
|
||||
@return true;
|
||||
}
|
||||
// If $include is set to (all), make sure $section is not in $exclude.
|
||||
@else if not index($_normalize-exclude, $section) and index($_normalize-include, all) {
|
||||
@return true;
|
||||
}
|
||||
@return false;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@function _normalize-include($section) {
|
||||
// Check if $section is in the $include list.
|
||||
@if index($_normalize-include, $section) {
|
||||
@return true;
|
||||
}
|
||||
// If $include is set to (all), make sure $section is not in $exclude.
|
||||
@else if not
|
||||
index($_normalize-exclude, $section) and
|
||||
index($_normalize-include, all)
|
||||
{
|
||||
@return true;
|
||||
}
|
||||
@return false;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`lists.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$my-list:
|
||||
'foo', // Foo
|
||||
'bar'; // Bar
|
||||
|
||||
$my-list2:
|
||||
a // a
|
||||
b
|
||||
c;
|
||||
|
||||
=====================================output=====================================
|
||||
$my-list: "foo",
|
||||
// Foo
|
||||
"bar"; // Bar
|
||||
|
||||
$my-list2: a // a
|
||||
b c;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`maps.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$my-map: (
|
||||
'foo': 1, // Foo
|
||||
'bar': 2, // Bar
|
||||
);
|
||||
|
||||
=====================================output=====================================
|
||||
$my-map: (
|
||||
"foo": 1,
|
||||
// Foo
|
||||
"bar": 2,
|
||||
// Bar
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`places.css format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
div {
|
||||
// a
|
||||
|
||||
margin-left: -@leftMargin; // b
|
||||
} // c
|
||||
|
||||
// d
|
||||
div {}
|
||||
|
||||
=====================================output=====================================
|
||||
div {
|
||||
// a
|
||||
|
||||
margin-left: -@leftMargin; // b
|
||||
} // c
|
||||
|
||||
// d
|
||||
div {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`prettier-ignore.css format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
@@ -1226,145 +927,6 @@ article /* comment 168 */ :--heading /* comment 169 */ + /* comment 170 */ p /*
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`selectors.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.powerPathNavigator .helm button.pressedButton, // comment 1
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton),
|
||||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
.powerPathNavigator table.powerPathInfo th:active + th:last-child {
|
||||
}
|
||||
|
||||
// comment 2
|
||||
.powerPathNavigator .helm button.pressedButton,
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton) {
|
||||
}
|
||||
|
||||
.foo,
|
||||
// comment 3
|
||||
.bar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.field
|
||||
{
|
||||
&[data-field-id="1"], // comment 4
|
||||
&[data-field-id="2"], // comment 5
|
||||
&[data-field-id="3"], // comment 6
|
||||
{
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
|
||||
// comment 7
|
||||
.field
|
||||
// comment 8
|
||||
{ // comment 9
|
||||
// comment 10
|
||||
&[data-field-id="1"], // comment 11
|
||||
// comment 12
|
||||
&[data-field-id="2"] // comment 13
|
||||
// comment 14
|
||||
, // comment 15
|
||||
// comment 16
|
||||
&[data-field-id="3"], // comment 17
|
||||
// comment 18
|
||||
{ // comment 19
|
||||
// comment 20
|
||||
background: green;
|
||||
// comment 21
|
||||
} // comment 22
|
||||
// comment 23
|
||||
}
|
||||
// comment 24
|
||||
|
||||
.foo
|
||||
// comment 25
|
||||
.bar
|
||||
// comment 26
|
||||
{}
|
||||
|
||||
.foo
|
||||
// comment 27
|
||||
+
|
||||
// comment 28
|
||||
.bar
|
||||
// comment 29
|
||||
{}
|
||||
|
||||
=====================================output=====================================
|
||||
.powerPathNavigator .helm button.pressedButton, // comment 1
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton),
|
||||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
.powerPathNavigator table.powerPathInfo th:active + th:last-child {
|
||||
}
|
||||
|
||||
// comment 2
|
||||
.powerPathNavigator .helm button.pressedButton,
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton) {
|
||||
}
|
||||
|
||||
.foo,
|
||||
// comment 3
|
||||
.bar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.field {
|
||||
&[data-field-id="1"], // comment 4
|
||||
&[data-field-id="2"], // comment 5
|
||||
&[data-field-id="3"], // comment 6
|
||||
{
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
|
||||
// comment 7
|
||||
.field
|
||||
// comment 8
|
||||
{
|
||||
// comment 9
|
||||
// comment 10
|
||||
&[data-field-id="1"], // comment 11
|
||||
// comment 12
|
||||
&[data-field-id="2"] // comment 13
|
||||
// comment 14
|
||||
, // comment 15
|
||||
// comment 16
|
||||
&[data-field-id="3"], // comment 17
|
||||
// comment 18
|
||||
{
|
||||
// comment 19
|
||||
// comment 20
|
||||
background: green;
|
||||
// comment 21
|
||||
} // comment 22
|
||||
// comment 23
|
||||
}
|
||||
// comment 24
|
||||
|
||||
.foo
|
||||
// comment 25
|
||||
.bar
|
||||
// comment 26
|
||||
{
|
||||
}
|
||||
|
||||
.foo
|
||||
// comment 27
|
||||
+
|
||||
// comment 28
|
||||
.bar
|
||||
// comment 29
|
||||
{
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`source-map.css format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
@@ -1387,27 +949,6 @@ printWidth: 80
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`trailing_star_slash.css format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@media (max-width: 1) {}
|
||||
a {
|
||||
// element.style */
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@media (max-width: 1) {
|
||||
}
|
||||
a {
|
||||
// element.style */
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`types.css format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
@@ -1509,45 +1050,3 @@ span {
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`variable-declaration.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */ ; /* comment 4 */
|
||||
|
||||
@mixin text-color {
|
||||
/* comment 5 */
|
||||
/* comment 6 */ $text-color /* comment 7 */ : /* comment 8 */ red /* comment 9 */ !default /* comment 10 */ ; /* comment 11 */
|
||||
/* comment 12 */
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
.error {
|
||||
/* comment 13 */
|
||||
/* comment 14 */ $text-color /* comment 15 */ : /* comment 16 */ green /* comment 17 */ !global /* comment 18 */ ; /* comment 19 */
|
||||
/* comment 20 */
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
$var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */; /* comment 4 */
|
||||
|
||||
@mixin text-color {
|
||||
/* comment 5 */
|
||||
/* comment 6 */
|
||||
$text-color/* comment 7 */ : /* comment 8 */ red /* comment 9 */ !default /* comment 10 */; /* comment 11 */
|
||||
/* comment 12 */
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
.error {
|
||||
/* comment 13 */
|
||||
/* comment 14 */
|
||||
$text-color/* comment 15 */ : /* comment 16 */ green /* comment 17 */ !global /* comment 18 */; /* comment 19 */
|
||||
/* comment 20 */
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
@@ -35,41 +35,3 @@ printWidth: 80
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`variables.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
--#{$prop}: 10px;
|
||||
#{$prop}: 10px;
|
||||
prop1: var(--#{$var});
|
||||
prop2: var(#{$var}, --my-#{$var}, pink);
|
||||
prop3: calc(var(--#{$var}) * 1px);
|
||||
}
|
||||
|
||||
@supports (--#{$prop}: green) {
|
||||
body {
|
||||
color: var(--#{$var});
|
||||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
--#{$prop}: 10px;
|
||||
#{$prop}: 10px;
|
||||
prop1: var(--#{$var});
|
||||
prop2: var(#{$var}, --my-#{$var}, pink);
|
||||
prop3: calc(var(--#{$var}) * 1px);
|
||||
}
|
||||
|
||||
@supports (--#{$prop}: green) {
|
||||
body {
|
||||
color: var(--#{$var});
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
@@ -0,0 +1,323 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`case.less format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["less"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
// in selectors, as well as function names and property keywords.
|
||||
// - Other things should mostly be lowercase.
|
||||
// - The \`/*:*/\` comments are just to bust the \`isLikelySCSS\` check.
|
||||
|
||||
@IMPORT Keep;
|
||||
|
||||
HTML#KeepId.KeepClass,
|
||||
a[HREF=KeepAttrValue]:HOVER::FIRST-letter,
|
||||
svg[viewBox] linearGradient,
|
||||
:Not(:NTH-child(2N+1)) {
|
||||
COLOR: #AAbbCC;
|
||||
BACKGROUND-image: URL("KeepString");
|
||||
Margin: 5PX .2E10Em;
|
||||
--Keep-custom-Prop: red;
|
||||
background: Var(--Keep-custom-Prop);
|
||||
animation-name: KeepAnimationName;
|
||||
important: something !IMPORTANT;
|
||||
font-family: INITIAL;
|
||||
padding: UNSET;
|
||||
border: INHERIT;
|
||||
all: REVERT;
|
||||
-WEBKIT-USER-SELECT: none;
|
||||
-MOZ-USER-SELECT: none;
|
||||
-MS-USER-SELECT: none;
|
||||
USER-SELECT: none;
|
||||
}
|
||||
|
||||
@keyframes KeepAnimationName {
|
||||
FROM {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@{KeepInterpolationVar} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
TO {
|
||||
prop: val;
|
||||
}
|
||||
}
|
||||
|
||||
@custom-media --KeepCustomMedia screen and (width >= 768px);
|
||||
@media (--KeepCustomMedia) {}
|
||||
|
||||
@KeepDetachedRuleset: /*:*/ {
|
||||
BACKGROUND: RED;
|
||||
}
|
||||
|
||||
%KeepScssPlaceholderSelector {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@KeepTopLevelVar: val;
|
||||
$KeepScssVar: val;
|
||||
|
||||
.Keep(@Keep: 12e03PX) when (@Keep=Case) /*:*/ {
|
||||
@KeepVar: KeepName; /*:*/
|
||||
@{KeepInterpolationVar}: val;
|
||||
$KeepScssVar: val;
|
||||
@extend %KeepScssPlaceholderSelector;
|
||||
|
||||
@{Keep}[@{Keep}][@{Keep}^=@{Keep-1A}]:@{Keep} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
&Keep & Element {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@KeepDetachedRuleset();
|
||||
|
||||
&:extend(.Keep ALL);
|
||||
&:EXTEND(.Keep ALL);
|
||||
|
||||
.Keep;
|
||||
.Keep();
|
||||
.Keep(4PX)!IMPORTANT;
|
||||
.Keep() when (@Keep=Keep);
|
||||
.Keep() when (@Keep=12PX);
|
||||
.Keep() when (@Keep="12px");
|
||||
.Keep() when (@Keep="12PX");
|
||||
.Keep() when (@Keep=Keep12PX);
|
||||
}
|
||||
|
||||
.Keep (@Keep) when (lightness(@Keep) >= 12PX) and (@Keep > 0) {}
|
||||
.Keep (@Keep) when (lightness(@Keep) != '12PX') and (@Keep != "12PX") {}
|
||||
.Keep (@Keep) when (lightness(@Keep) >= Keep12PX) and (@Keep > @Keep12E5) {}
|
||||
|
||||
.Keep(@Keep: 12PX; @Keep: @Keep12PX; ...) /*:*/ {}
|
||||
.Keep(@Keep: '12PX'; @Keep: "12PX"; ...) /*:*/ {}
|
||||
|
||||
@MEDIA (MIN-WIDTH: 700PX) /*:*/ {}
|
||||
|
||||
@MEDIA (@{Keep}: @{Keep}) {}
|
||||
|
||||
@KEYFRAMES identifier {
|
||||
FROM {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
TO {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@-WEBKIT-KEYFRAMES float-up {
|
||||
FROM {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
TO {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
TABLE {}
|
||||
|
||||
.foo { &-KeepSelector {} &-KeepSelector & .KeepClassSelector {} &-100\\.200 {} }
|
||||
|
||||
=====================================output=====================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
// in selectors, as well as function names and property keywords.
|
||||
// - Other things should mostly be lowercase.
|
||||
// - The \`/*:*/\` comments are just to bust the \`isLikelySCSS\` check.
|
||||
|
||||
@import Keep;
|
||||
|
||||
HTML#KeepId.KeepClass,
|
||||
a[HREF="KeepAttrValue"]:hover::first-letter,
|
||||
svg[viewBox] linearGradient,
|
||||
:not(:nth-child(2n + 1)) {
|
||||
color: #aabbcc;
|
||||
background-image: URL("KeepString");
|
||||
margin: 5px 0.2e10em;
|
||||
--Keep-custom-Prop: red;
|
||||
background: Var(--Keep-custom-Prop);
|
||||
animation-name: KeepAnimationName;
|
||||
important: something !important;
|
||||
font-family: initial;
|
||||
padding: unset;
|
||||
border: inherit;
|
||||
all: revert;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@keyframes KeepAnimationName {
|
||||
from {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@{KeepInterpolationVar} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
to {
|
||||
prop: val;
|
||||
}
|
||||
}
|
||||
|
||||
@custom-media --KeepCustomMedia screen and (width >= 768px);
|
||||
@media (--KeepCustomMedia) {
|
||||
}
|
||||
|
||||
@KeepDetachedRuleset: /*:*/ {
|
||||
background: RED;
|
||||
};
|
||||
|
||||
%KeepScssPlaceholderSelector {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@KeepTopLevelVar: val;
|
||||
$KeepScssVar: val;
|
||||
|
||||
.Keep(@Keep: 12e03PX) when (@Keep=Case) /*:*/ {
|
||||
@KeepVar: KeepName; /*:*/
|
||||
@{KeepInterpolationVar}: val;
|
||||
$KeepScssVar: val;
|
||||
@extend %KeepScssPlaceholderSelector;
|
||||
|
||||
@{Keep}[@{Keep}][@{Keep}^=@{Keep-1A}]:@{Keep} {
|
||||
prop: val;
|
||||
};
|
||||
|
||||
&Keep & Element {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
@KeepDetachedRuleset();
|
||||
|
||||
&:extend(.Keep ALL);
|
||||
&:EXTEND(.Keep ALL);
|
||||
|
||||
.Keep;
|
||||
.Keep();
|
||||
.Keep(4px) !important;
|
||||
.Keep() when (@Keep=Keep);
|
||||
.Keep() when (@Keep=12px);
|
||||
.Keep() when (@Keep="12px");
|
||||
.Keep() when (@Keep="12PX");
|
||||
.Keep() when (@Keep=Keep12PX);
|
||||
}
|
||||
|
||||
.Keep (@Keep) when (lightness(@Keep) >= 12px) and (@Keep > 0) {
|
||||
}
|
||||
.Keep (@Keep) when (lightness(@Keep) != "12PX") and (@Keep != "12PX") {
|
||||
}
|
||||
.Keep (@Keep) when (lightness(@Keep) >= Keep12PX) and (@Keep > @Keep12E5) {
|
||||
}
|
||||
|
||||
.Keep(@Keep: 12PX; @Keep: @Keep12PX; ...) /*:*/ {
|
||||
}
|
||||
.Keep(@Keep: '12PX'; @Keep: "12PX"; ...) /*:*/ {
|
||||
}
|
||||
|
||||
@media (min-width: 700px) /*:*/ {
|
||||
}
|
||||
|
||||
@media (@{Keep}: @{Keep}) {
|
||||
}
|
||||
|
||||
@keyframes identifier {
|
||||
from {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
to {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes float-up {
|
||||
from {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
to {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
TABLE {
|
||||
}
|
||||
|
||||
.foo {
|
||||
&-KeepSelector {
|
||||
}
|
||||
&-KeepSelector & .KeepClassSelector {
|
||||
}
|
||||
&-100\\.200 {
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
File renamed without changes.
@@ -0,0 +1 @@
|
||||
run_spec(__dirname, ["less"]);
|
||||
File renamed without changes.
@@ -0,0 +1,136 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`CRLF.less format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["less"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@nice-blue: #5B83AD;
|
||||
@light-blue: @nice-blue + #111;
|
||||
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 2
|
||||
*/
|
||||
#header {
|
||||
// Comment 3
|
||||
/*
|
||||
* Comment 4
|
||||
*/
|
||||
color: @light-blue;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 5
|
||||
*/
|
||||
body {
|
||||
background-color: lightblue; // Comment 6
|
||||
color: red; /* Comment 7 */
|
||||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@nice-blue: #5b83ad;
|
||||
@light-blue: @nice-blue + #111;
|
||||
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 2
|
||||
*/
|
||||
#header {
|
||||
// Comment 3
|
||||
/*
|
||||
* Comment 4
|
||||
*/
|
||||
color: @light-blue;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 5
|
||||
*/
|
||||
body {
|
||||
background-color: lightblue; // Comment 6
|
||||
color: red; /* Comment 7 */
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`places.less format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["less"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
div {
|
||||
// a
|
||||
|
||||
margin-left: -@leftMargin; // b
|
||||
} // c
|
||||
|
||||
// d
|
||||
div {}
|
||||
|
||||
=====================================output=====================================
|
||||
div {
|
||||
// a
|
||||
|
||||
margin-left: -@leftMargin; // b
|
||||
} // c
|
||||
|
||||
// d
|
||||
div {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`prettier-ignore.less format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["less"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
foo {
|
||||
/* prettier-ignore */
|
||||
thing: foo;
|
||||
-ms-thing: foo;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
foo {
|
||||
/* prettier-ignore */
|
||||
thing: foo;
|
||||
-ms-thing: foo;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`trailing_star_slash.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["less"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@media (max-width: 1) {}
|
||||
a {
|
||||
// element.style */
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@media (max-width: 1) {
|
||||
}
|
||||
a {
|
||||
// element.style */
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
@@ -0,0 +1 @@
|
||||
run_spec(__dirname, ["less"]);
|
||||
File renamed without changes.
@@ -0,0 +1,6 @@
|
||||
|
||||
foo {
|
||||
/* prettier-ignore */
|
||||
thing: foo;
|
||||
-ms-thing: foo;
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,318 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`case.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
// in selectors, as well as function names and property keywords.
|
||||
// - Other things should mostly be lowercase.
|
||||
|
||||
@IMPORT Keep;
|
||||
|
||||
HTML#KeepId.KeepClass,
|
||||
a[HREF=KeepAttrValue]:HOVER::FIRST-letter,
|
||||
svg[viewBox] linearGradient,
|
||||
:Not(:NTH-child(2N+1)) {
|
||||
COLOR: #AAbbCC;
|
||||
BACKGROUND-image: URL("KeepString");
|
||||
Margin: 5PX .2E10Em;
|
||||
--Keep-custom-Prop: red;
|
||||
background: Var(--Keep-custom-Prop);
|
||||
animation-name: KeepAnimationName;
|
||||
important: something !IMPORTANT;
|
||||
font-family: INITIAL;
|
||||
padding: UNSET;
|
||||
border: INHERIT;
|
||||
all: REVERT;
|
||||
-WEBKIT-USER-SELECT: none;
|
||||
-MOZ-USER-SELECT: none;
|
||||
-MS-USER-SELECT: none;
|
||||
USER-SELECT: none;
|
||||
}
|
||||
|
||||
@keyframes KeepAnimationName {
|
||||
FROM {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
#{$KeepInterpolationVar},
|
||||
#{$Keep + 15PX + Keep15PX + '15PX' + "15PX"},
|
||||
#{$Keep + $Keep15PX} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
TO {
|
||||
prop: val;
|
||||
}
|
||||
}
|
||||
|
||||
@custom-media --KeepCustomMedia screen and (width >= 768px);
|
||||
@media (--KeepCustomMedia) {}
|
||||
|
||||
@function KeepFuncName() {
|
||||
@return 12;
|
||||
}
|
||||
|
||||
%KeepPlaceholderSelector {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
$KeepTopLevelVar: val;
|
||||
@KeepLessVar: val;
|
||||
|
||||
@mixin KeepMixinName($Keep: 15IN, $Keep: $Keep15IN, $Keep: Keep-1E-2Em) {
|
||||
$KeepVar: KeepFuncName();
|
||||
#{$KeepInterpolationVar}: val;
|
||||
#{$Keep + 15PX}: val;
|
||||
#{$Keep + $Keep15PX}: val;
|
||||
@KeepLessVar: val;
|
||||
@extend %KeepPlaceholderSelector;
|
||||
|
||||
#{$Keep}[#{$Keep}][#{Keep}^=#{Keep-1A}]:#{$Keep} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
&Keep & Element {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
BACKGROUND: {
|
||||
COLOR: RED;
|
||||
}
|
||||
|
||||
BACKGROUND: Keep 15PX Keep15PX {
|
||||
COLOR: RED;
|
||||
}
|
||||
|
||||
#{$Keep + 15PX + Keep15PX + '15PX' + "15PX"}: {
|
||||
COLOR: RED;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin Keep($Keep: $Keep15IN, $Keep: Keepå1E1) {}
|
||||
|
||||
@MEDIA (MIN-WIDTH: 700PX) {
|
||||
@include Keep;
|
||||
@include Keep(.12e+01cH);
|
||||
@include Keep($Keep12E01cH);
|
||||
}
|
||||
|
||||
@MEDIA (#{$Keep}: #{$Keep}) {}
|
||||
|
||||
@KEYFRAMES identifier {
|
||||
FROM {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
TO {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@-WEBKIT-KEYFRAMES float-up {
|
||||
FROM {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
TO {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
TABLE {}
|
||||
|
||||
.foo { &-KeepSelector {} &-KeepSelector & .KeepClassSelector {} &-100\\.200 {} }
|
||||
|
||||
=====================================output=====================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
// in selectors, as well as function names and property keywords.
|
||||
// - Other things should mostly be lowercase.
|
||||
|
||||
@import Keep;
|
||||
|
||||
HTML#KeepId.KeepClass,
|
||||
a[HREF="KeepAttrValue"]:hover::first-letter,
|
||||
svg[viewBox] linearGradient,
|
||||
:not(:nth-child(2n + 1)) {
|
||||
color: #aabbcc;
|
||||
background-image: URL("KeepString");
|
||||
margin: 5px 0.2e10em;
|
||||
--Keep-custom-Prop: red;
|
||||
background: Var(--Keep-custom-Prop);
|
||||
animation-name: KeepAnimationName;
|
||||
important: something !important;
|
||||
font-family: initial;
|
||||
padding: unset;
|
||||
border: inherit;
|
||||
all: revert;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@keyframes KeepAnimationName {
|
||||
from {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
#{$KeepInterpolationVar},
|
||||
#{$Keep + 15px + Keep15PX + "15PX" + "15PX"},
|
||||
#{$Keep + $Keep15PX} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
to {
|
||||
prop: val;
|
||||
}
|
||||
}
|
||||
|
||||
@custom-media --KeepCustomMedia screen and (width >= 768px);
|
||||
@media (--KeepCustomMedia) {
|
||||
}
|
||||
|
||||
@function KeepFuncName() {
|
||||
@return 12;
|
||||
}
|
||||
|
||||
%KeepPlaceholderSelector {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
$KeepTopLevelVar: val;
|
||||
@KeepLessVar: val;
|
||||
|
||||
@mixin KeepMixinName($Keep: 15in, $Keep: $Keep15IN, $Keep: Keep-1E-2Em) {
|
||||
$KeepVar: KeepFuncName();
|
||||
#{$KeepInterpolationVar}: val;
|
||||
#{$Keep + 15PX}: val;
|
||||
#{$Keep + $Keep15PX}: val;
|
||||
@KeepLessVar: val;
|
||||
@extend %KeepPlaceholderSelector;
|
||||
|
||||
#{$Keep}[#{$Keep}][#{Keep}^="#{Keep-1A}"]:#{$Keep} {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
&Keep & Element {
|
||||
prop: val;
|
||||
}
|
||||
|
||||
background: {
|
||||
color: RED;
|
||||
}
|
||||
|
||||
background: Keep 15px Keep15PX {
|
||||
color: RED;
|
||||
}
|
||||
|
||||
#{$Keep + 15px + Keep15PX + "15PX" + "15PX"}: {
|
||||
color: RED;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin Keep($Keep: $Keep15IN, $Keep: Keepå1E1) {
|
||||
}
|
||||
|
||||
@media (min-width: 700px) {
|
||||
@include Keep;
|
||||
@include Keep(0.12e1ch);
|
||||
@include Keep($Keep12E01cH);
|
||||
}
|
||||
|
||||
@media (#{$Keep}: #{$Keep}) {
|
||||
}
|
||||
|
||||
@keyframes identifier {
|
||||
from {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
to {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes float-up {
|
||||
from {
|
||||
margin-top: 50px;
|
||||
}
|
||||
50% {
|
||||
margin-top: 150px;
|
||||
}
|
||||
to {
|
||||
margin-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
TABLE {
|
||||
}
|
||||
|
||||
.foo {
|
||||
&-KeepSelector {
|
||||
}
|
||||
&-KeepSelector & .KeepClassSelector {
|
||||
}
|
||||
&-100\\.200 {
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
File renamed without changes.
@@ -0,0 +1 @@
|
||||
run_spec(__dirname, ["scss"]);
|
||||
File renamed without changes.
@@ -0,0 +1,434 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`CRLF.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$nice-blue: #5B83AD;
|
||||
$light-blue: $nice-blue + #111;
|
||||
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 2
|
||||
*/
|
||||
#header {
|
||||
// Comment 3
|
||||
/*
|
||||
* Comment 4
|
||||
*/
|
||||
color: @light-blue;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 5
|
||||
*/
|
||||
body {
|
||||
background-color: lightblue; // Comment 6
|
||||
color: red; /* Comment 7 */
|
||||
}
|
||||
}
|
||||
|
||||
@mixin create-rules($padding) {
|
||||
//
|
||||
// Comment 8
|
||||
//
|
||||
.abc {
|
||||
padding: $padding;
|
||||
}
|
||||
/**
|
||||
* Comment 9
|
||||
*/
|
||||
.def {
|
||||
padding: $padding;
|
||||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
$nice-blue: #5b83ad;
|
||||
$light-blue: $nice-blue + #111;
|
||||
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 2
|
||||
*/
|
||||
#header {
|
||||
// Comment 3
|
||||
/*
|
||||
* Comment 4
|
||||
*/
|
||||
color: @light-blue;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 5
|
||||
*/
|
||||
body {
|
||||
background-color: lightblue; // Comment 6
|
||||
color: red; /* Comment 7 */
|
||||
}
|
||||
}
|
||||
|
||||
@mixin create-rules($padding) {
|
||||
//
|
||||
// Comment 8
|
||||
//
|
||||
.abc {
|
||||
padding: $padding;
|
||||
}
|
||||
/**
|
||||
* Comment 9
|
||||
*/
|
||||
.def {
|
||||
padding: $padding;
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`at-rule.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@at-root .foo
|
||||
// .bar
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@at-root
|
||||
// .bar
|
||||
.foo
|
||||
{
|
||||
|
||||
}
|
||||
=====================================output=====================================
|
||||
@at-root .foo
|
||||
// .bar
|
||||
{
|
||||
}
|
||||
|
||||
@at-root // .bar
|
||||
.foo {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`if-eslit-at-rule-decloration.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@function _normalize-include($section) {
|
||||
// Check if $section is in the $include list.
|
||||
@if index($_normalize-include, $section) {
|
||||
@return true;
|
||||
}
|
||||
// If $include is set to (all), make sure $section is not in $exclude.
|
||||
@else if not index($_normalize-exclude, $section) and index($_normalize-include, all) {
|
||||
@return true;
|
||||
}
|
||||
@return false;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@function _normalize-include($section) {
|
||||
// Check if $section is in the $include list.
|
||||
@if index($_normalize-include, $section) {
|
||||
@return true;
|
||||
}
|
||||
// If $include is set to (all), make sure $section is not in $exclude.
|
||||
@else if not
|
||||
index($_normalize-exclude, $section) and
|
||||
index($_normalize-include, all)
|
||||
{
|
||||
@return true;
|
||||
}
|
||||
@return false;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`lists.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$my-list:
|
||||
'foo', // Foo
|
||||
'bar'; // Bar
|
||||
|
||||
$my-list2:
|
||||
a // a
|
||||
b
|
||||
c;
|
||||
|
||||
=====================================output=====================================
|
||||
$my-list: "foo",
|
||||
// Foo
|
||||
"bar"; // Bar
|
||||
|
||||
$my-list2: a // a
|
||||
b c;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`maps.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$my-map: (
|
||||
'foo': 1, // Foo
|
||||
'bar': 2, // Bar
|
||||
);
|
||||
|
||||
=====================================output=====================================
|
||||
$my-map: (
|
||||
"foo": 1,
|
||||
// Foo
|
||||
"bar": 2,
|
||||
// Bar
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`prettier-ignore.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
foo {
|
||||
/* prettier-ignore */
|
||||
thing: foo;
|
||||
-ms-thing: foo;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
foo {
|
||||
/* prettier-ignore */
|
||||
thing: foo;
|
||||
-ms-thing: foo;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`selectors.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.powerPathNavigator .helm button.pressedButton, // comment 1
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton),
|
||||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
.powerPathNavigator table.powerPathInfo th:active + th:last-child {
|
||||
}
|
||||
|
||||
// comment 2
|
||||
.powerPathNavigator .helm button.pressedButton,
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton) {
|
||||
}
|
||||
|
||||
.foo,
|
||||
// comment 3
|
||||
.bar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.field
|
||||
{
|
||||
&[data-field-id="1"], // comment 4
|
||||
&[data-field-id="2"], // comment 5
|
||||
&[data-field-id="3"], // comment 6
|
||||
{
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
|
||||
// comment 7
|
||||
.field
|
||||
// comment 8
|
||||
{ // comment 9
|
||||
// comment 10
|
||||
&[data-field-id="1"], // comment 11
|
||||
// comment 12
|
||||
&[data-field-id="2"] // comment 13
|
||||
// comment 14
|
||||
, // comment 15
|
||||
// comment 16
|
||||
&[data-field-id="3"], // comment 17
|
||||
// comment 18
|
||||
{ // comment 19
|
||||
// comment 20
|
||||
background: green;
|
||||
// comment 21
|
||||
} // comment 22
|
||||
// comment 23
|
||||
}
|
||||
// comment 24
|
||||
|
||||
.foo
|
||||
// comment 25
|
||||
.bar
|
||||
// comment 26
|
||||
{}
|
||||
|
||||
.foo
|
||||
// comment 27
|
||||
+
|
||||
// comment 28
|
||||
.bar
|
||||
// comment 29
|
||||
{}
|
||||
|
||||
=====================================output=====================================
|
||||
.powerPathNavigator .helm button.pressedButton, // comment 1
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton),
|
||||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
.powerPathNavigator table.powerPathInfo th:active + th:last-child {
|
||||
}
|
||||
|
||||
// comment 2
|
||||
.powerPathNavigator .helm button.pressedButton,
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton) {
|
||||
}
|
||||
|
||||
.foo,
|
||||
// comment 3
|
||||
.bar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.field {
|
||||
&[data-field-id="1"], // comment 4
|
||||
&[data-field-id="2"], // comment 5
|
||||
&[data-field-id="3"], // comment 6
|
||||
{
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
|
||||
// comment 7
|
||||
.field
|
||||
// comment 8
|
||||
{
|
||||
// comment 9
|
||||
// comment 10
|
||||
&[data-field-id="1"], // comment 11
|
||||
// comment 12
|
||||
&[data-field-id="2"] // comment 13
|
||||
// comment 14
|
||||
, // comment 15
|
||||
// comment 16
|
||||
&[data-field-id="3"], // comment 17
|
||||
// comment 18
|
||||
{
|
||||
// comment 19
|
||||
// comment 20
|
||||
background: green;
|
||||
// comment 21
|
||||
} // comment 22
|
||||
// comment 23
|
||||
}
|
||||
// comment 24
|
||||
|
||||
.foo
|
||||
// comment 25
|
||||
.bar
|
||||
// comment 26
|
||||
{
|
||||
}
|
||||
|
||||
.foo
|
||||
// comment 27
|
||||
+
|
||||
// comment 28
|
||||
.bar
|
||||
// comment 29
|
||||
{
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`trailing_star_slash.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@media (max-width: 1) {}
|
||||
a {
|
||||
// element.style */
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@media (max-width: 1) {
|
||||
}
|
||||
a {
|
||||
// element.style */
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`variable-declaration.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */ ; /* comment 4 */
|
||||
|
||||
@mixin text-color {
|
||||
/* comment 5 */
|
||||
/* comment 6 */ $text-color /* comment 7 */ : /* comment 8 */ red /* comment 9 */ !default /* comment 10 */ ; /* comment 11 */
|
||||
/* comment 12 */
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
.error {
|
||||
/* comment 13 */
|
||||
/* comment 14 */ $text-color /* comment 15 */ : /* comment 16 */ green /* comment 17 */ !global /* comment 18 */ ; /* comment 19 */
|
||||
/* comment 20 */
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
$var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */; /* comment 4 */
|
||||
|
||||
@mixin text-color {
|
||||
/* comment 5 */
|
||||
/* comment 6 */
|
||||
$text-color/* comment 7 */ : /* comment 8 */ red /* comment 9 */ !default /* comment 10 */; /* comment 11 */
|
||||
/* comment 12 */
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
.error {
|
||||
/* comment 13 */
|
||||
/* comment 14 */
|
||||
$text-color/* comment 15 */ : /* comment 16 */ green /* comment 17 */ !global /* comment 18 */; /* comment 19 */
|
||||
/* comment 20 */
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
|
||||
run_spec(__dirname, ["scss"]);
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,6 @@
|
||||
|
||||
foo {
|
||||
/* prettier-ignore */
|
||||
thing: foo;
|
||||
-ms-thing: foo;
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,4 @@
|
||||
@media (max-width: 1) {}
|
||||
a {
|
||||
// element.style */
|
||||
}
|
||||
File renamed without changes.
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`at-rules.css - {"trailingComma":"none"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "none"
|
||||
| printWidth
|
||||
@@ -153,7 +153,7 @@ a {
|
||||
|
||||
exports[`declaration.css - {"trailingComma":"none"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "none"
|
||||
| printWidth
|
||||
@@ -190,7 +190,7 @@ a {
|
||||
|
||||
exports[`list.css - {"trailingComma":"none"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "none"
|
||||
| printWidth
|
||||
@@ -401,7 +401,7 @@ $breakpoint-map: (
|
||||
|
||||
exports[`map.css - {"trailingComma":"none"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "none"
|
||||
| printWidth
|
||||
@@ -490,7 +490,7 @@ $map: (
|
||||
|
||||
exports[`selector_list.css - {"trailingComma":"none"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "none"
|
||||
| printWidth
|
||||
@@ -553,7 +553,7 @@ asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsj
|
||||
|
||||
exports[`variable.css - {"trailingComma":"none"} format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "none"
|
||||
| printWidth
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
run_spec(__dirname, ["css"], { trailingComma: "none" });
|
||||
run_spec(__dirname, ["scss"], { trailingComma: "none" });
|
||||
run_spec(__dirname, ["scss"]);
|
||||
@@ -0,0 +1,39 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`variables.scss format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
--#{$prop}: 10px;
|
||||
#{$prop}: 10px;
|
||||
prop1: var(--#{$var});
|
||||
prop2: var(#{$var}, --my-#{$var}, pink);
|
||||
prop3: calc(var(--#{$var}) * 1px);
|
||||
}
|
||||
|
||||
@supports (--#{$prop}: green) {
|
||||
body {
|
||||
color: var(--#{$var});
|
||||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
--#{$prop}: 10px;
|
||||
#{$prop}: 10px;
|
||||
prop1: var(--#{$var});
|
||||
prop2: var(#{$var}, --my-#{$var}, pink);
|
||||
prop3: calc(var(--#{$var}) * 1px);
|
||||
}
|
||||
|
||||
@supports (--#{$prop}: green) {
|
||||
body {
|
||||
color: var(--#{$var});
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
@@ -0,0 +1 @@
|
||||
run_spec(__dirname, ["scss"]);
|
||||
File renamed without changes.
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`inline-comment.css format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
@@ -1 +1 @@
|
||||
run_spec(__dirname, ["css"]);
|
||||
run_spec(__dirname, ["scss"]);
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`readme.css format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
@@ -1 +1 @@
|
||||
run_spec(__dirname, ["css"]);
|
||||
run_spec(__dirname, ["scss"]);
|
||||
@@ -11,7 +11,7 @@ const getCategory = (dirname) =>
|
||||
const categoryParsers = new Map(
|
||||
[
|
||||
["angular", ["angular", "__ng_interpolation"]],
|
||||
["css", ["css" /* ,"less", "scss" These may allow, but not using */]],
|
||||
["css", ["css"]],
|
||||
["flow", ["babel", "flow", "babel-flow"]],
|
||||
["flow-repo", ["babel", "flow", "babel-flow"]],
|
||||
["graphql", ["graphql"]],
|
||||
@@ -20,12 +20,12 @@ const categoryParsers = new Map(
|
||||
["js", ["babel", "flow", "babel-flow", "typescript", "babel-ts"]],
|
||||
["json", ["json", "json5", "json-stringify"]],
|
||||
["jsx", ["babel", "flow", "babel-flow", "typescript", "babel-ts"]],
|
||||
["less", ["css", "less"]],
|
||||
["less", ["less"]],
|
||||
["lwc", ["lwc"]],
|
||||
["markdown", ["markdown"]],
|
||||
["mdx", ["mdx"]],
|
||||
["scss", ["css", "scss"]],
|
||||
["stylefmt-repo", ["css"]],
|
||||
["scss", ["scss"]],
|
||||
["stylefmt-repo", ["css", "scss"]],
|
||||
["typescript", ["typescript", "babel-ts"]],
|
||||
["vue", ["vue"]],
|
||||
["yaml", ["yaml"]],
|
||||
|
||||
Reference in new issue
Block a user