Deprecated selector in `language-javascript-semantic/styles/semantic-colors.atom-text-editor.less`
mwelchunium opened this issue · 3 comments
In language-javascript-semantic/styles/semantic-colors.atom-text-editor.less
:
Starting from Atom v1.13.0, the contents of atom-text-editor
elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host
and ::shadow
pseudo-selectors, and prepend all your syntax selectors with syntax--
. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:
-
.source.js-semantic
=>.syntax--source.js-semantic
-
.source.js-semantic.identifier.color-index-1
=>.syntax--source.js-semantic.syntax--identifier.color-index-1
-
.source.js-semantic.identifier.color-index-2
=>.syntax--source.js-semantic.syntax--identifier.color-index-2
-
.source.js-semantic.identifier.color-index-3
=>.syntax--source.js-semantic.syntax--identifier.color-index-3
-
.source.js-semantic.identifier.color-index-4
=>.syntax--source.js-semantic.syntax--identifier.color-index-4
-
.source.js-semantic.identifier.color-index-5
=>.syntax--source.js-semantic.syntax--identifier.color-index-5
-
.source.js-semantic.identifier.color-index-6
=>.syntax--source.js-semantic.syntax--identifier.color-index-6
-
.source.js-semantic.identifier.color-index-7
=>.syntax--source.js-semantic.syntax--identifier.color-index-7
-
.source.js-semantic.identifier.color-index-8
=>.syntax--source.js-semantic.syntax--identifier.color-index-8
-
.source.js-semantic.comment
=>.syntax--source.js-semantic.syntax--comment
-
.source.js-semantic.keyword
=>.syntax--source.js-semantic.syntax--keyword
-
.source.js-semantic.number
=>.syntax--source.js-semantic.syntax--number
-
.source.js-semantic.string, .source.js-semantic.regex
=>.syntax--source.js-semantic.syntax--string, .syntax--source.js-semantic.syntax--regex
Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.
If highlighting stops working, replace the contents of this file: <path-to-atom-install>\.atom\packages\language-javascript-semantic\styles\semantic-colors.atom-text-editor.less
with:
@import "syntax-variables";
@bright-text-color:
contrast(@syntax-background-color,
lighten(@syntax-text-color, 20%),
darken(@syntax-text-color, 20%));
.text-color(@contrast) {
color: mix(@bright-text-color, @syntax-background-color, @contrast);
}
.syntax--source.syntax--js-semantic {
// Reset font attributes to prevent interference from main syntax theme
.text-color(80%);
background-color: transparent;
font-style: normal;
font-weight: normal;
text-decoration: none;
&.syntax--identifier {
.color-indices(8);
.color-indices(@n, @i: 1) when (@i =< @n) {
@hue: @i * (360 / @n);
&.syntax--color-index-@{i} {
// Choose a color of the given hue with good contrast
color: contrast(@syntax-background-color,
hsl(@hue, 100%, 25%),
hsl(@hue, 65%, 75%));
}
.color-indices(@n, @i + 1);
}
}
&.syntax--comment {
.text-color(40%);
}
&.syntax--keyword {
font-weight: bold;
}
&.syntax--number {
.text-color(100%);
}
&.syntax--string,
&.syntax--regex {
// TODO: Currently, these are simply the string colors from Atom's default syntax themes
color: contrast(@syntax-background-color, #a8ff60, #dd1144);
}
}
Worked for me.
Now Deprecation Cop shows:
Deprecated calls: No deprecated calls
Deprecated selectors: No deprecated selectors
Atom 1.14.3 for Ubuntu x64
Thanks.
language-javascript-semantic/styles/semantic-colors.atom-text-editor.less
Starting from Atom v1.13.0, the contents of atom-text-editor elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host and ::shadow pseudo-selectors, and prepend all your syntax selectors with syntax--. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:
.source.js-semantic => .syntax--source.js-semantic
.source.js-semantic.identifier.color-index-1 => .syntax--source.js-semantic.syntax--identifier.color-index-1
.source.js-semantic.identifier.color-index-2 => .syntax--source.js-semantic.syntax--identifier.color-index-2
.source.js-semantic.identifier.color-index-3 => .syntax--source.js-semantic.syntax--identifier.color-index-3
.source.js-semantic.identifier.color-index-4 => .syntax--source.js-semantic.syntax--identifier.color-index-4
.source.js-semantic.identifier.color-index-5 => .syntax--source.js-semantic.syntax--identifier.color-index-5
.source.js-semantic.identifier.color-index-6 => .syntax--source.js-semantic.syntax--identifier.color-index-6
.source.js-semantic.identifier.color-index-7 => .syntax--source.js-semantic.syntax--identifier.color-index-7
.source.js-semantic.identifier.color-index-8 => .syntax--source.js-semantic.syntax--identifier.color-index-8
.source.js-semantic.comment => .syntax--source.js-semantic.syntax--comment
.source.js-semantic.keyword => .syntax--source.js-semantic.syntax--keyword
.source.js-semantic.number => .syntax--source.js-semantic.syntax--number
.source.js-semantic.string, .source.js-semantic.regex => .syntax--source.js-semantic.syntax--string, .syntax--source.js-semantic.syntax--regex
Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.