[gtksourceview: 5/13] css.lang (and family): Allow comments inside pseudo-elements/classes
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview: 5/13] css.lang (and family): Allow comments inside pseudo-elements/classes
- Date: Wed, 11 Dec 2019 15:46:18 +0000 (UTC)
commit b0042e4aeb21362abe3a8908b3226833f41fa8d5
Author: Jeffery To <jeffery to gmail com>
Date: Sun Dec 1 02:35:39 2019 +0800
css.lang (and family): Allow comments inside pseudo-elements/classes
Comments are allowed between the colon(s) and the pseudo-element/class
name.
data/language-specs/css.lang | 276 ++++++++++++++++++++----------------
data/language-specs/less.lang | 55 +++----
data/language-specs/scss.lang | 6 +-
tests/syntax-highlighting/file.css | 18 +--
tests/syntax-highlighting/file.less | 18 +--
tests/syntax-highlighting/file.scss | 18 +--
6 files changed, 203 insertions(+), 188 deletions(-)
---
diff --git a/data/language-specs/css.lang b/data/language-specs/css.lang
index 3aee114f..b3ac9230 100644
--- a/data/language-specs/css.lang
+++ b/data/language-specs/css.lang
@@ -87,8 +87,10 @@
<style id="attribute-selector-operator" name="Attribute Selector Operator" map-to="css:selector-symbol"/>
<style id="attribute-selector-name" name="Attribute Selector Name" map-to="def:type"/>
<style id="combinator" name="Combinator" map-to="css:selector-symbol"/>
- <style id="pseudo-element" name="Pseudo-element" map-to="def:function"/>
- <style id="pseudo-class" name="Pseudo-class" map-to="def:function"/>
+ <style id="pseudo-selector" name="Pseudo Selector" map-to="def:function"/>
+ <style id="pseudo-selector-operator" name="Pseudo Selector Operator" map-to="css:pseudo-selector"/>
+ <style id="pseudo-element" name="Pseudo-element" map-to="css:pseudo-selector"/>
+ <style id="pseudo-class" name="Pseudo-class" map-to="css:pseudo-selector"/>
</styles>
@@ -107,6 +109,11 @@
to disable error highlighting for invalid @charset rules and :not() pseudo-classes
-->
+ <!--
+ contexts with end-parent="true" are written as container contexts to work around
+ https://gitlab.gnome.org/GNOME/gtksourceview/issues/14
+ -->
+
<!-- global -->
<!-- https://drafts.csswg.org/css-syntax/#escaping -->
@@ -2109,12 +2116,22 @@
}
-->
- <context id="pseudo-pages" style-ref="pseudo-class">
- <prefix>:</prefix>
- <keyword>blank</keyword>
- <keyword>first</keyword>
- <keyword>left</keyword>
- <keyword>right</keyword>
+ <context id="pseudo-page-names" end-parent="true" style-ref="pseudo-class">
+ <start extended="true">
+ \%[ (?: blank | first | left | right ) \%]
+ </start>
+ <end>\%{def:always-match}</end>
+ </context>
+
+ <context id="pseudo-page">
+ <start>:</start>
+ <end>\%{def:always-match}</end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="pseudo-selector-operator"/>
+ <context ref="embedded-lang-hook"/>
+ <context ref="comment"/>
+ <context ref="pseudo-page-names"/>
+ </include>
</context>
<context id="page-margin-box-types" style-ref="at-rule-inner-selector">
@@ -2157,7 +2174,7 @@
<context sub-pattern="0" where="start" style-ref="at-rule"/>
<context ref="embedded-lang-hook"/>
<context ref="comment"/>
- <context ref="pseudo-pages"/>
+ <context ref="pseudo-page"/>
<context ref="name-value"/>
<context ref="comma"/>
<context ref="at-page-block"/>
@@ -2327,135 +2344,122 @@
<!-- pseudo-elements -->
- <context id="vendor-specific-pseudo-element" style-ref="vendor-specific">
- <match>::\%{vendor-specific-identifier}</match>
+ <context id="vendor-specific-pseudo-element-name" end-parent="true" style-ref="vendor-specific">
+ <start>\%{vendor-specific-identifier}</start>
+ <end>\%{def:always-match}</end>
+ </context>
+
+ <context id="single-colon-pseudo-element-names" end-parent="true" style-ref="pseudo-element">
+ <start extended="true">
+ \%[ (?: after | before | first-letter | first-line ) \%]
+ </start>
+ <end>\%{def:always-match}</end>
</context>
- <context id="single-colon-pseudo-elements" style-ref="pseudo-element">
- <prefix>::?</prefix>
- <keyword>after</keyword>
- <keyword>before</keyword>
- <keyword>first-letter</keyword>
- <keyword>first-line</keyword>
+ <context id="pseudo-element-names" end-parent="true" style-ref="pseudo-element">
+ <start extended="true">
+ \%[ (?: placeholder | selection ) \%]
+ </start>
+ <end>\%{def:always-match}</end>
</context>
- <context id="pseudo-elements" style-ref="pseudo-element">
- <prefix>::</prefix>
- <keyword>placeholder</keyword>
- <keyword>selection</keyword>
+ <context id="pseudo-element-content">
+ <include>
+ <context ref="vendor-specific-pseudo-element-name"/>
+ <context ref="single-colon-pseudo-element-names"/>
+ <context ref="pseudo-element-names"/>
+ </include>
</context>
<context id="pseudo-element">
+ <start>::</start>
+ <end>\%{def:always-match}</end>
<include>
- <context ref="vendor-specific-pseudo-element"/>
- <context ref="single-colon-pseudo-elements"/>
- <context ref="pseudo-elements"/>
+ <context sub-pattern="0" where="start" style-ref="pseudo-selector-operator"/>
+ <context ref="embedded-lang-hook"/>
+ <context ref="comment"/>
+ <context ref="pseudo-element-content"/>
</include>
</context>
<!-- pseudo-classes -->
- <context id="vendor-specific-pseudo-class" style-ref="vendor-specific">
- <match>:\%{vendor-specific-identifier}</match>
- </context>
-
- <context id="pseudo-classes" style-ref="pseudo-class">
- <prefix>:</prefix>
- <keyword>active</keyword>
- <keyword>checked</keyword>
- <keyword>default</keyword>
- <keyword>disabled</keyword>
- <keyword>empty</keyword>
- <keyword>enabled</keyword>
- <keyword>first-child</keyword>
- <keyword>first-of-type</keyword>
- <keyword>focus</keyword>
- <keyword>hover</keyword>
- <keyword>in-range</keyword>
- <keyword>indeterminate</keyword>
- <keyword>invalid</keyword>
- <keyword>lang</keyword>
- <keyword>last-child</keyword>
- <keyword>last-of-type</keyword>
- <keyword>link</keyword>
- <keyword>not</keyword>
- <keyword>nth-child</keyword>
- <keyword>nth-last-child</keyword>
- <keyword>nth-last-of-type</keyword>
- <keyword>nth-of-type</keyword>
- <keyword>only-child</keyword>
- <keyword>only-of-type</keyword>
- <keyword>optional</keyword>
- <keyword>out-of-range</keyword>
- <keyword>read-only</keyword>
- <keyword>read-write</keyword>
- <keyword>required</keyword>
- <keyword>root</keyword>
- <keyword>target</keyword>
- <keyword>valid</keyword>
- <keyword>visited</keyword>
+ <context id="vendor-specific-pseudo-class-name" end-parent="true" style-ref="vendor-specific">
+ <start>\%{vendor-specific-identifier}</start>
+ <end>\%{def:always-match}</end>
</context>
- <context id="pseudo-class">
- <include>
- <context ref="vendor-specific-pseudo-class"/>
- <context ref="pseudo-classes"/>
- </include>
+ <context id="pseudo-class-names" end-parent="true" style-ref="pseudo-class">
+ <start extended="true">
+ \%[
+ (?:
+ active |
+ checked |
+ default |
+ disabled |
+ empty |
+ enabled |
+ first-child |
+ first-of-type |
+ focus |
+ hover |
+ in-range |
+ indeterminate |
+ invalid |
+ last-child |
+ last-of-type |
+ link |
+ only-child |
+ only-of-type |
+ optional |
+ out-of-range |
+ read-only |
+ read-write |
+ required |
+ root |
+ target |
+ valid |
+ visited
+ )
+ \%]
+ </start>
+ <end>\%{def:always-match}</end>
</context>
- <!-- pseudo-class arguments -->
-
- <context id="lang-pseudo-class-argument-content">
+ <context id="lang-pseudo-class-content">
<include>
<context ref="name-value"/>
</include>
</context>
- <context id="lang-pseudo-class-argument">
- <start>(?<=:lang)\(</start>
+ <context id="lang-pseudo-class" end-parent="true">
+ <start>\%[lang\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="pseudo-class"/>
<context sub-pattern="0" where="end" style-ref="pseudo-class"/>
<context ref="embedded-lang-hook"/>
<context ref="comment"/>
- <context ref="lang-pseudo-class-argument-content"/>
- </include>
- </context>
-
- <context id="not-pseudo-class-nested-not-error" style-ref="error">
- <start>:not\(</start>
- <end>\)</end>
- <include>
- <context ref="embedded-lang-hook"/>
- <context ref="comment"/>
- <context ref="pseudo-class-argument"/>
- </include>
- </context>
-
- <context id="not-pseudo-class-nested-pseudo-element-error">
- <include>
- <context ref="vendor-specific-pseudo-element" style-ref="error"/>
- <context ref="single-colon-pseudo-elements" style-ref="error"/>
- <context ref="pseudo-elements" style-ref="error"/>
+ <context ref="lang-pseudo-class-content"/>
</include>
</context>
<context id="not-pseudo-class-highlighting">
<include>
- <context ref="not-pseudo-class-nested-not-error"/>
- <context ref="not-pseudo-class-nested-pseudo-element-error"/>
+ <context ref="pseudo-element" style-ref="error"/>
+ <context ref="pseudo-class-not-pseudo-class-argument"/>
</include>
</context>
<context id="not-pseudo-class-highlighting-no-error">
<include>
<context ref="pseudo-element"/>
+ <context ref="pseudo-class"/>
</include>
</context>
- <context id="not-pseudo-class-argument">
- <start>(?<=:not)\(</start>
+ <context id="not-pseudo-class" end-parent="true">
+ <start>\%[not\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="pseudo-class"/>
@@ -2466,17 +2470,16 @@
<context ref="simple-selector"/>
<context ref="combinator"/>
<context ref="pseudo-class"/>
- <context ref="pseudo-class-argument"/>
<context ref="comma"/>
</include>
</context>
- <context id="nth-pseudo-class-argument-keywords" once-only="true" style-ref="keyword">
+ <context id="nth-pseudo-class-keywords" once-only="true" style-ref="keyword">
<keyword>even</keyword>
<keyword>odd</keyword>
</context>
- <context id="nth-pseudo-class-argument-expression-offset-magnitude" end-parent="true">
+ <context id="nth-pseudo-class-expression-offset-magnitude" end-parent="true">
<start extended="true">
(?<! \%{non-number-char} )
(?=
@@ -2487,17 +2490,17 @@
<end>\%{integer-magnitude}</end>
</context>
- <context id="nth-pseudo-class-argument-expression-offset" end-parent="true">
+ <context id="nth-pseudo-class-expression-offset" end-parent="true">
<start>[+-]</start>
<end>(?=\S)</end>
<include>
<context ref="embedded-lang-hook"/>
<context ref="comment"/>
- <context ref="nth-pseudo-class-argument-expression-offset-magnitude"/>
+ <context ref="nth-pseudo-class-expression-offset-magnitude"/>
</include>
</context>
- <context id="nth-pseudo-class-argument-expression" once-only="true" style-ref="expression">
+ <context id="nth-pseudo-class-expression" once-only="true" style-ref="expression">
<start extended="true">
(?<! \%{non-number-char} )
\%{integer}? n
@@ -2506,11 +2509,11 @@
<include>
<context ref="embedded-lang-hook"/>
<context ref="comment"/>
- <context ref="nth-pseudo-class-argument-expression-offset"/>
+ <context ref="nth-pseudo-class-expression-offset"/>
</include>
</context>
- <context id="nth-pseudo-class-argument-integer-only" once-only="true" style-ref="expression">
+ <context id="nth-pseudo-class-integer-only" once-only="true" style-ref="expression">
<match extended="true">
(?<! \%{non-number-char} )
\%{integer}
@@ -2518,23 +2521,17 @@
</match>
</context>
- <context id="nth-pseudo-class-argument-content">
+ <context id="nth-pseudo-class-content">
<include>
- <context ref="nth-pseudo-class-argument-keywords"/>
- <context ref="nth-pseudo-class-argument-expression"/>
- <context ref="nth-pseudo-class-argument-integer-only"/>
+ <context ref="nth-pseudo-class-keywords"/>
+ <context ref="nth-pseudo-class-expression"/>
+ <context ref="nth-pseudo-class-integer-only"/>
</include>
</context>
- <context id="nth-pseudo-class-argument">
+ <context id="nth-pseudo-class" end-parent="true">
<start extended="true">
- (?<=
- :nth-child |
- :nth-last-child |
- :nth-of-type |
- :nth-last-of-type
- )
- \(
+ \%[ (nth-child | nth-of-type | nth-last-child | nth-last-of-type) \(
</start>
<end>\)</end>
<include>
@@ -2542,15 +2539,51 @@
<context sub-pattern="0" where="end" style-ref="pseudo-class"/>
<context ref="embedded-lang-hook"/>
<context ref="comment"/>
- <context ref="nth-pseudo-class-argument-content"/>
+ <context ref="nth-pseudo-class-content"/>
+ </include>
+ </context>
+
+ <context id="pseudo-class-content">
+ <include>
+ <context ref="vendor-specific-pseudo-class-name"/>
+ <context ref="single-colon-pseudo-element-names"/>
+ <context ref="pseudo-class-names"/>
+ <context ref="lang-pseudo-class"/>
+ <context ref="not-pseudo-class"/>
+ <context ref="nth-pseudo-class"/>
+ </include>
+ </context>
+
+ <context id="pseudo-class">
+ <start>:</start>
+ <end>\%{def:always-match}</end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="pseudo-selector-operator"/>
+ <context ref="embedded-lang-hook"/>
+ <context ref="comment"/>
+ <context ref="pseudo-class-content"/>
</include>
</context>
- <context id="pseudo-class-argument">
+ <context id="pseudo-class-not-pseudo-class-argument-content">
<include>
- <context ref="lang-pseudo-class-argument"/>
- <context ref="not-pseudo-class-argument"/>
- <context ref="nth-pseudo-class-argument"/>
+ <context ref="vendor-specific-pseudo-class-name"/>
+ <context ref="single-colon-pseudo-element-names" style-ref="error"/>
+ <context ref="pseudo-class-names"/>
+ <context ref="lang-pseudo-class"/>
+ <context ref="not-pseudo-class" style-ref="error"/>
+ <context ref="nth-pseudo-class"/>
+ </include>
+ </context>
+
+ <context id="pseudo-class-not-pseudo-class-argument">
+ <start>:</start>
+ <end>\%{def:always-match}</end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="pseudo-selector-operator"/>
+ <context ref="embedded-lang-hook"/>
+ <context ref="comment"/>
+ <context ref="pseudo-class-not-pseudo-class-argument-content"/>
</include>
</context>
@@ -2563,7 +2596,6 @@
<context ref="combinator"/>
<context ref="pseudo-element"/>
<context ref="pseudo-class"/>
- <context ref="pseudo-class-argument"/>
<context ref="comma"/>
</include>
</context>
diff --git a/data/language-specs/less.lang b/data/language-specs/less.lang
index b310f33c..53f83e74 100644
--- a/data/language-specs/less.lang
+++ b/data/language-specs/less.lang
@@ -451,7 +451,6 @@
<context ref="css:at-rule"/> <!-- because Less variables look like at-rules -->
<context ref="detached-ruleset-call"/>
<context ref="standalone-plugin-function-call"/>
- <context ref="inside-ruleset-extend"/>
<context ref="css:style-block-content" original="true"/>
<context ref="css:selector"/>
<context ref="css:style-block"/>
@@ -706,35 +705,19 @@
<match>(?<=})\%{css:identifier-chars}</match>
</context>
- <context id="less-pseudo-classes" style-ref="css:pseudo-class">
- <prefix>:</prefix>
- <keyword>extend</keyword>
- </context>
-
- <context id="extend-pseudo-class-argument-keyword" style-ref="css:keyword">
+ <context id="extend-pseudo-class-keyword" once-only="true" style-ref="css:keyword">
<keyword>all</keyword>
</context>
- <context id="extend-pseudo-class-argument">
- <start>(?<=:extend)\(</start>
+ <context id="extend-pseudo-class" end-parent="true">
+ <start>\%[extend\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="css:pseudo-class"/>
<context sub-pattern="0" where="end" style-ref="css:pseudo-class"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
- <context ref="extend-pseudo-class-argument-keyword"/>
- <context ref="css:selector"/>
- </include>
- </context>
-
- <context id="inside-ruleset-extend">
- <start>(?=&:extend\()</start>
- <end>\%{statement-end}</end>
- <include>
- <context sub-pattern="0" where="end" style-ref="css:delimiter"/>
- <context ref="css:embedded-lang-hook"/>
- <context ref="css:comment"/>
+ <context ref="extend-pseudo-class-keyword"/>
<context ref="css:selector"/>
</include>
</context>
@@ -764,31 +747,31 @@
</include>
</context>
- <context id="less-pseudo-class">
+ <context id="less-lang-pseudo-class-content">
<include>
- <context ref="less-pseudo-classes"/>
- <context ref="css:pseudo-class" original="true"/>
+ <context ref="variable-interpolation-value"/>
+ <context ref="css:lang-pseudo-class-content" original="true"/>
</include>
</context>
- <context id="less-lang-pseudo-class-argument-content">
+ <context id="less-nth-pseudo-class-content">
<include>
<context ref="variable-interpolation-value"/>
- <context ref="css:lang-pseudo-class-argument-content" original="true"/>
+ <context ref="css:nth-pseudo-class-content" original="true"/>
</include>
</context>
- <context id="less-nth-pseudo-class-argument-content">
+ <context id="less-pseudo-class-content">
<include>
- <context ref="variable-interpolation-value"/>
- <context ref="css:nth-pseudo-class-argument-content" original="true"/>
+ <context ref="extend-pseudo-class"/>
+ <context ref="css:pseudo-class-content" original="true"/>
</include>
</context>
- <context id="less-pseudo-class-argument">
+ <context id="less-pseudo-class-not-pseudo-class-argument-content">
<include>
- <context ref="extend-pseudo-class-argument"/>
- <context ref="css:pseudo-class-argument" original="true"/>
+ <context ref="extend-pseudo-class" style-ref="css:error"/>
+ <context ref="css:pseudo-class-not-pseudo-class-argument-content" original="true"/>
</include>
</context>
@@ -805,10 +788,10 @@
<replace id="css:attribute-selector-content" ref="less-attribute-selector-content"/>
<replace id="css:simple-selector" ref="less-simple-selector"/>
<replace id="css:combinator" ref="less-combinator"/>
- <replace id="css:pseudo-class" ref="less-pseudo-class"/>
- <replace id="css:lang-pseudo-class-argument-content" ref="less-lang-pseudo-class-argument-content"/>
- <replace id="css:nth-pseudo-class-argument-content" ref="less-nth-pseudo-class-argument-content"/>
- <replace id="css:pseudo-class-argument" ref="less-pseudo-class-argument"/>
+ <replace id="css:lang-pseudo-class-content" ref="less-lang-pseudo-class-content"/>
+ <replace id="css:nth-pseudo-class-content" ref="less-nth-pseudo-class-content"/>
+ <replace id="css:pseudo-class-content" ref="less-pseudo-class-content"/>
+ <replace id="css:pseudo-class-not-pseudo-class-argument-content"
ref="less-pseudo-class-not-pseudo-class-argument-content"/>
<replace id="css:selector" ref="less-selector"/>
diff --git a/data/language-specs/scss.lang b/data/language-specs/scss.lang
index 32d7978c..00a0f874 100644
--- a/data/language-specs/scss.lang
+++ b/data/language-specs/scss.lang
@@ -871,10 +871,10 @@
</include>
</context>
- <context id="scss-nth-pseudo-class-argument-content">
+ <context id="scss-nth-pseudo-class-content">
<include>
<context ref="interpolation"/>
- <context ref="css:nth-pseudo-class-argument-content" original="true"/>
+ <context ref="css:nth-pseudo-class-content" original="true"/>
</include>
</context>
@@ -887,7 +887,7 @@
<replace id="css:simple-selector" ref="scss-simple-selector"/>
<replace id="css:combinator" ref="scss-combinator"/>
- <replace id="css:nth-pseudo-class-argument-content" ref="scss-nth-pseudo-class-argument-content"/>
+ <replace id="css:nth-pseudo-class-content" ref="scss-nth-pseudo-class-content"/>
<replace id="css:selector" ref="scss-selector"/>
diff --git a/tests/syntax-highlighting/file.css b/tests/syntax-highlighting/file.css
index 21964d48..2d04188c 100644
--- a/tests/syntax-highlighting/file.css
+++ b/tests/syntax-highlighting/file.css
@@ -57,21 +57,21 @@ ul ul { /* descendant */
/* pseudo-elements */
:after,
-::after,
+::/* comment */after,
::placeholder,
-::selection {
+::/* comment */selection {
color: green;
}
/* pseudo-classes */
:hover,
-:required,
+:/* comment */required,
:lang(fr),
-:not(div#sidebar.fancy),
+:/* comment */not(div#sidebar.fancy),
:nth-child(n+1),
-:nth-last-child(-2n /* comment */ - /* comment */ 30),
+:/* comment */nth-last-child(-2n /* comment */ - /* comment */ 30),
:nth-of-type(5),
-:nth-last-of-type(even) {
+:/* comment */nth-last-of-type(even) {
color: yellow;
}
@@ -313,7 +313,7 @@ body {
margin: 2cm;
marks: crop cross;
}
-@page index:left {
+@page index:/*comment*/left {
size: A4;
@top-right {
@@ -336,7 +336,7 @@ body {
/* pseudo-elements */
input[type="number"]::-webkit-outer-spin-button,
-input[type="number"]::-webkit-inner-spin-button {
+input[type="number"]::/* comment */-webkit-inner-spin-button {
-webkit-appearance: none;
}
input[type="number"] {
@@ -345,7 +345,7 @@ input[type="number"] {
/* pseudo-classes */
#page:-moz-full-screen,
-#page:-ms-fullscreen,
+#page:/* comment */-ms-fullscreen,
#page:-webkit-full-screen {
background: silver;
}
diff --git a/tests/syntax-highlighting/file.less b/tests/syntax-highlighting/file.less
index 889931d7..1132b4cc 100644
--- a/tests/syntax-highlighting/file.less
+++ b/tests/syntax-highlighting/file.less
@@ -479,21 +479,21 @@ ul ul { /* descendant */
/* pseudo-elements */
:after,
-::after,
+::/* comment */after,
::placeholder,
-::selection {
+::/* comment */selection {
color: green;
}
/* pseudo-classes */
:hover,
-:required,
+:/* comment */required,
:lang(fr),
-:not(div#sidebar.fancy),
+:/* comment */not(div#sidebar.fancy),
:nth-child(n+1),
-:nth-last-child(-2n /* comment */ - /* comment */ 30),
+:/* comment */nth-last-child(-2n /* comment */ - /* comment */ 30),
:nth-of-type(5),
-:nth-last-of-type(even) {
+:/* comment */nth-last-of-type(even) {
color: yellow;
}
@@ -735,7 +735,7 @@ body {
margin: 2cm;
marks: crop cross;
}
-@page index:left {
+@page index:/*comment*/left {
size: A4;
@top-right {
@@ -758,7 +758,7 @@ body {
/* pseudo-elements */
input[type="number"]::-webkit-outer-spin-button,
-input[type="number"]::-webkit-inner-spin-button {
+input[type="number"]::/* comment */-webkit-inner-spin-button {
-webkit-appearance: none;
}
input[type="number"] {
@@ -767,7 +767,7 @@ input[type="number"] {
/* pseudo-classes */
#page:-moz-full-screen,
-#page:-ms-fullscreen,
+#page:/* comment */-ms-fullscreen,
#page:-webkit-full-screen {
background: silver;
}
diff --git a/tests/syntax-highlighting/file.scss b/tests/syntax-highlighting/file.scss
index 12d70a57..a2e611d4 100644
--- a/tests/syntax-highlighting/file.scss
+++ b/tests/syntax-highlighting/file.scss
@@ -504,21 +504,21 @@ ul ul { /* descendant */
/* pseudo-elements */
:after,
-::after,
+::/* comment */after,
::placeholder,
-::selection {
+::/* comment */selection {
color: green;
}
/* pseudo-classes */
:hover,
-:required,
+:/* comment */required,
:lang(fr),
-:not(div#sidebar.fancy),
+:/* comment */not(div#sidebar.fancy),
:nth-child(n+1),
-:nth-last-child(-2n /* comment */ - /* comment */ 30),
+:/* comment */nth-last-child(-2n /* comment */ - /* comment */ 30),
:nth-of-type(5),
-:nth-last-of-type(even) {
+:/* comment */nth-last-of-type(even) {
color: yellow;
}
@@ -760,7 +760,7 @@ body {
margin: 2cm;
marks: crop cross;
}
-@page index:left {
+@page index:/*comment*/left {
size: A4;
@top-right {
@@ -783,7 +783,7 @@ body {
/* pseudo-elements */
input[type="number"]::-webkit-outer-spin-button,
-input[type="number"]::-webkit-inner-spin-button {
+input[type="number"]::/* comment */-webkit-inner-spin-button {
-webkit-appearance: none;
}
input[type="number"] {
@@ -792,7 +792,7 @@ input[type="number"] {
/* pseudo-classes */
#page:-moz-full-screen,
-#page:-ms-fullscreen,
+#page:/* comment */-ms-fullscreen,
#page:-webkit-full-screen {
background: silver;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]