vscode-css-languageservice 6.2.12 → 6.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/beautify/beautify-css.js +4 -4
- package/lib/esm/parser/lessParser.js +1 -0
- package/lib/esm/parser/scssParser.js +2 -1
- package/lib/esm/services/cssHover.js +18 -11
- package/lib/esm/services/selectorPrinting.js +15 -9
- package/lib/umd/beautify/beautify-css.js +4 -4
- package/lib/umd/parser/lessParser.js +1 -0
- package/lib/umd/parser/scssParser.js +2 -1
- package/lib/umd/services/cssHover.js +18 -11
- package/lib/umd/services/selectorPrinting.js +15 -9
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// copied from js-beautify/js/lib/beautify-css.js
|
|
2
|
-
// version: 1.
|
|
2
|
+
// version: 1.15.1
|
|
3
3
|
/* AUTO-GENERATED. DO NOT MODIFY. */
|
|
4
4
|
/*
|
|
5
5
|
|
|
@@ -570,10 +570,10 @@ function Options(options, merge_child_field) {
|
|
|
570
570
|
|
|
571
571
|
this.indent_empty_lines = this._get_boolean('indent_empty_lines');
|
|
572
572
|
|
|
573
|
-
// valid templating languages ['django', 'erb', 'handlebars', 'php', 'smarty']
|
|
574
|
-
// For now, 'auto' = all off for javascript, all on for html (and inline javascript).
|
|
573
|
+
// valid templating languages ['django', 'erb', 'handlebars', 'php', 'smarty', 'angular']
|
|
574
|
+
// For now, 'auto' = all off for javascript, all except angular on for html (and inline javascript/css).
|
|
575
575
|
// other values ignored
|
|
576
|
-
this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);
|
|
576
|
+
this.templating = this._get_selection_list('templating', ['auto', 'none', 'angular', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
Options.prototype._get_array = function(name, default_value) {
|
|
@@ -274,6 +274,7 @@ export class LESSParser extends cssParser.Parser {
|
|
|
274
274
|
|| this._parseSupports(true) // @supports
|
|
275
275
|
|| this._parseLayer() // @layer
|
|
276
276
|
|| this._parsePropertyAtRule() // @property
|
|
277
|
+
|| this._parseContainer() // @container
|
|
277
278
|
|| this._parseDetachedRuleSetMixin() // less detached ruleset mixin
|
|
278
279
|
|| this._parseVariableDeclaration() // Variable declarations
|
|
279
280
|
|| this._parseRuleSetDeclarationAtStatement();
|
|
@@ -219,6 +219,7 @@ export class SCSSParser extends cssParser.Parser {
|
|
|
219
219
|
|| this._parseSupports(true) // @supports
|
|
220
220
|
|| this._parseLayer() // @layer
|
|
221
221
|
|| this._parsePropertyAtRule() // @property
|
|
222
|
+
|| this._parseContainer() // @container
|
|
222
223
|
|| this._parseRuleSetDeclarationAtStatement();
|
|
223
224
|
}
|
|
224
225
|
return this._parseVariableDeclaration() // variable declaration
|
|
@@ -801,7 +802,7 @@ export class SCSSParser extends cssParser.Parser {
|
|
|
801
802
|
// Consume all variables and idents ahead.
|
|
802
803
|
this.accept(TokenType.Comma);
|
|
803
804
|
}
|
|
804
|
-
// More than just identifier
|
|
805
|
+
// More than just identifier
|
|
805
806
|
return node.getChildren().length > 1 ? node : null;
|
|
806
807
|
}
|
|
807
808
|
_parseSupportsCondition() {
|
|
@@ -29,12 +29,21 @@ export class CSSHover {
|
|
|
29
29
|
* Build up the hover by appending inner node's information
|
|
30
30
|
*/
|
|
31
31
|
let hover = null;
|
|
32
|
+
let flagOpts;
|
|
32
33
|
for (let i = 0; i < nodepath.length; i++) {
|
|
33
34
|
const node = nodepath[i];
|
|
35
|
+
if (node instanceof nodes.Media) {
|
|
36
|
+
const regex = /@media[^\{]+/g;
|
|
37
|
+
const matches = node.getText().match(regex);
|
|
38
|
+
flagOpts = {
|
|
39
|
+
isMedia: true,
|
|
40
|
+
text: matches?.[0],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
34
43
|
if (node instanceof nodes.Selector) {
|
|
35
44
|
hover = {
|
|
36
|
-
contents: this.selectorPrinting.selectorToMarkedString(node),
|
|
37
|
-
range: getRange(node)
|
|
45
|
+
contents: this.selectorPrinting.selectorToMarkedString(node, flagOpts),
|
|
46
|
+
range: getRange(node),
|
|
38
47
|
};
|
|
39
48
|
break;
|
|
40
49
|
}
|
|
@@ -45,7 +54,7 @@ export class CSSHover {
|
|
|
45
54
|
if (!startsWith(node.getText(), '@')) {
|
|
46
55
|
hover = {
|
|
47
56
|
contents: this.selectorPrinting.simpleSelectorToMarkedString(node),
|
|
48
|
-
range: getRange(node)
|
|
57
|
+
range: getRange(node),
|
|
49
58
|
};
|
|
50
59
|
}
|
|
51
60
|
break;
|
|
@@ -58,7 +67,7 @@ export class CSSHover {
|
|
|
58
67
|
if (contents) {
|
|
59
68
|
hover = {
|
|
60
69
|
contents,
|
|
61
|
-
range: getRange(node)
|
|
70
|
+
range: getRange(node),
|
|
62
71
|
};
|
|
63
72
|
}
|
|
64
73
|
else {
|
|
@@ -75,7 +84,7 @@ export class CSSHover {
|
|
|
75
84
|
if (contents) {
|
|
76
85
|
hover = {
|
|
77
86
|
contents,
|
|
78
|
-
range: getRange(node)
|
|
87
|
+
range: getRange(node),
|
|
79
88
|
};
|
|
80
89
|
}
|
|
81
90
|
else {
|
|
@@ -86,15 +95,13 @@ export class CSSHover {
|
|
|
86
95
|
}
|
|
87
96
|
if (node instanceof nodes.Node && node.type === nodes.NodeType.PseudoSelector) {
|
|
88
97
|
const selectorName = node.getText();
|
|
89
|
-
const entry = selectorName.slice(0, 2) === '::'
|
|
90
|
-
? this.cssDataManager.getPseudoElement(selectorName)
|
|
91
|
-
: this.cssDataManager.getPseudoClass(selectorName);
|
|
98
|
+
const entry = selectorName.slice(0, 2) === '::' ? this.cssDataManager.getPseudoElement(selectorName) : this.cssDataManager.getPseudoClass(selectorName);
|
|
92
99
|
if (entry) {
|
|
93
100
|
const contents = languageFacts.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
|
|
94
101
|
if (contents) {
|
|
95
102
|
hover = {
|
|
96
103
|
contents,
|
|
97
|
-
range: getRange(node)
|
|
104
|
+
range: getRange(node),
|
|
98
105
|
};
|
|
99
106
|
}
|
|
100
107
|
else {
|
|
@@ -118,12 +125,12 @@ export class CSSHover {
|
|
|
118
125
|
else if ('kind' in contents) {
|
|
119
126
|
return {
|
|
120
127
|
kind: 'plaintext',
|
|
121
|
-
value: contents.value
|
|
128
|
+
value: contents.value,
|
|
122
129
|
};
|
|
123
130
|
}
|
|
124
131
|
// MarkedString[]
|
|
125
132
|
else if (Array.isArray(contents)) {
|
|
126
|
-
return contents.map(c => {
|
|
133
|
+
return contents.map((c) => {
|
|
127
134
|
return typeof c === 'string' ? c : c.value;
|
|
128
135
|
});
|
|
129
136
|
}
|
|
@@ -112,7 +112,7 @@ class MarkedStringPrinter {
|
|
|
112
112
|
this.result = [];
|
|
113
113
|
// empty
|
|
114
114
|
}
|
|
115
|
-
print(element) {
|
|
115
|
+
print(element, flagOpts) {
|
|
116
116
|
this.result = [];
|
|
117
117
|
if (element instanceof RootElement) {
|
|
118
118
|
if (element.children) {
|
|
@@ -122,7 +122,13 @@ class MarkedStringPrinter {
|
|
|
122
122
|
else {
|
|
123
123
|
this.doPrint([element], 0);
|
|
124
124
|
}
|
|
125
|
-
|
|
125
|
+
let value;
|
|
126
|
+
if (flagOpts) {
|
|
127
|
+
value = `${flagOpts.text}\n … ` + this.result.join('\n');
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
value = this.result.join('\n');
|
|
131
|
+
}
|
|
126
132
|
return [{ language: 'html', value }];
|
|
127
133
|
}
|
|
128
134
|
doPrint(elements, indent) {
|
|
@@ -298,10 +304,10 @@ export class SelectorPrinting {
|
|
|
298
304
|
constructor(cssDataManager) {
|
|
299
305
|
this.cssDataManager = cssDataManager;
|
|
300
306
|
}
|
|
301
|
-
selectorToMarkedString(node) {
|
|
307
|
+
selectorToMarkedString(node, flagOpts) {
|
|
302
308
|
const root = selectorToElement(node);
|
|
303
309
|
if (root) {
|
|
304
|
-
const markedStrings = new MarkedStringPrinter('"').print(root);
|
|
310
|
+
const markedStrings = new MarkedStringPrinter('"').print(root, flagOpts);
|
|
305
311
|
markedStrings.push(this.selectorToSpecificityMarkedString(node));
|
|
306
312
|
return markedStrings;
|
|
307
313
|
}
|
|
@@ -320,7 +326,7 @@ export class SelectorPrinting {
|
|
|
320
326
|
if (!match) {
|
|
321
327
|
return false;
|
|
322
328
|
}
|
|
323
|
-
return !!this.cssDataManager.getPseudoElement(
|
|
329
|
+
return !!this.cssDataManager.getPseudoElement('::' + match[1]);
|
|
324
330
|
}
|
|
325
331
|
selectorToSpecificityMarkedString(node) {
|
|
326
332
|
const calculateMostSpecificListItem = (childElements) => {
|
|
@@ -368,7 +374,7 @@ export class SelectorPrinting {
|
|
|
368
374
|
break;
|
|
369
375
|
case nodes.NodeType.ElementNameSelector:
|
|
370
376
|
//ignore universal selector
|
|
371
|
-
if (element.matches(
|
|
377
|
+
if (element.matches('*')) {
|
|
372
378
|
break;
|
|
373
379
|
}
|
|
374
380
|
specificity.tag++;
|
|
@@ -417,7 +423,7 @@ export class SelectorPrinting {
|
|
|
417
423
|
/* The specificity of the :nth-child(An+B [of S]?) pseudo-class is the specificity of a single pseudo-class plus, if S is specified, the specificity of the most specific complex selector in S */
|
|
418
424
|
// https://www.w3.org/TR/selectors-4/#the-nth-child-pseudo
|
|
419
425
|
specificity.attr++;
|
|
420
|
-
// 23 = Binary Expression.
|
|
426
|
+
// 23 = Binary Expression.
|
|
421
427
|
if (childElements.length === 3 && childElements[1].type === 23) {
|
|
422
428
|
let mostSpecificListItem = calculateMostSpecificListItem(childElements[2].getChildren());
|
|
423
429
|
specificity.id += mostSpecificListItem.id;
|
|
@@ -431,7 +437,7 @@ export class SelectorPrinting {
|
|
|
431
437
|
parser.scanner.setSource(pseudoSelectorText);
|
|
432
438
|
const firstToken = parser.scanner.scan();
|
|
433
439
|
const secondToken = parser.scanner.scan();
|
|
434
|
-
if (firstToken.text === 'n' || firstToken.text === '-n' && secondToken.text === 'of') {
|
|
440
|
+
if (firstToken.text === 'n' || (firstToken.text === '-n' && secondToken.text === 'of')) {
|
|
435
441
|
const complexSelectorListNodes = [];
|
|
436
442
|
const complexSelectorText = pseudoSelectorText.slice(secondToken.offset + 2);
|
|
437
443
|
const complexSelectorArray = complexSelectorText.split(',');
|
|
@@ -462,7 +468,7 @@ export class SelectorPrinting {
|
|
|
462
468
|
return specificity;
|
|
463
469
|
};
|
|
464
470
|
const specificity = calculateScore(node);
|
|
465
|
-
return `[${l10n.t(
|
|
471
|
+
return `[${l10n.t('Selector Specificity')}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${specificity.id}, ${specificity.attr}, ${specificity.tag})`;
|
|
466
472
|
}
|
|
467
473
|
}
|
|
468
474
|
class SelectorElementBuilder {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// copied from js-beautify/js/lib/beautify-css.js
|
|
2
|
-
// version: 1.
|
|
2
|
+
// version: 1.15.1
|
|
3
3
|
/* AUTO-GENERATED. DO NOT MODIFY. */
|
|
4
4
|
/*
|
|
5
5
|
|
|
@@ -573,10 +573,10 @@ function Options(options, merge_child_field) {
|
|
|
573
573
|
|
|
574
574
|
this.indent_empty_lines = this._get_boolean('indent_empty_lines');
|
|
575
575
|
|
|
576
|
-
// valid templating languages ['django', 'erb', 'handlebars', 'php', 'smarty']
|
|
577
|
-
// For now, 'auto' = all off for javascript, all on for html (and inline javascript).
|
|
576
|
+
// valid templating languages ['django', 'erb', 'handlebars', 'php', 'smarty', 'angular']
|
|
577
|
+
// For now, 'auto' = all off for javascript, all except angular on for html (and inline javascript/css).
|
|
578
578
|
// other values ignored
|
|
579
|
-
this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);
|
|
579
|
+
this.templating = this._get_selection_list('templating', ['auto', 'none', 'angular', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);
|
|
580
580
|
}
|
|
581
581
|
|
|
582
582
|
Options.prototype._get_array = function(name, default_value) {
|
|
@@ -285,6 +285,7 @@
|
|
|
285
285
|
|| this._parseSupports(true) // @supports
|
|
286
286
|
|| this._parseLayer() // @layer
|
|
287
287
|
|| this._parsePropertyAtRule() // @property
|
|
288
|
+
|| this._parseContainer() // @container
|
|
288
289
|
|| this._parseDetachedRuleSetMixin() // less detached ruleset mixin
|
|
289
290
|
|| this._parseVariableDeclaration() // Variable declarations
|
|
290
291
|
|| this._parseRuleSetDeclarationAtStatement();
|
|
@@ -230,6 +230,7 @@
|
|
|
230
230
|
|| this._parseSupports(true) // @supports
|
|
231
231
|
|| this._parseLayer() // @layer
|
|
232
232
|
|| this._parsePropertyAtRule() // @property
|
|
233
|
+
|| this._parseContainer() // @container
|
|
233
234
|
|| this._parseRuleSetDeclarationAtStatement();
|
|
234
235
|
}
|
|
235
236
|
return this._parseVariableDeclaration() // variable declaration
|
|
@@ -812,7 +813,7 @@
|
|
|
812
813
|
// Consume all variables and idents ahead.
|
|
813
814
|
this.accept(cssScanner_1.TokenType.Comma);
|
|
814
815
|
}
|
|
815
|
-
// More than just identifier
|
|
816
|
+
// More than just identifier
|
|
816
817
|
return node.getChildren().length > 1 ? node : null;
|
|
817
818
|
}
|
|
818
819
|
_parseSupportsCondition() {
|
|
@@ -40,12 +40,21 @@
|
|
|
40
40
|
* Build up the hover by appending inner node's information
|
|
41
41
|
*/
|
|
42
42
|
let hover = null;
|
|
43
|
+
let flagOpts;
|
|
43
44
|
for (let i = 0; i < nodepath.length; i++) {
|
|
44
45
|
const node = nodepath[i];
|
|
46
|
+
if (node instanceof nodes.Media) {
|
|
47
|
+
const regex = /@media[^\{]+/g;
|
|
48
|
+
const matches = node.getText().match(regex);
|
|
49
|
+
flagOpts = {
|
|
50
|
+
isMedia: true,
|
|
51
|
+
text: matches?.[0],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
45
54
|
if (node instanceof nodes.Selector) {
|
|
46
55
|
hover = {
|
|
47
|
-
contents: this.selectorPrinting.selectorToMarkedString(node),
|
|
48
|
-
range: getRange(node)
|
|
56
|
+
contents: this.selectorPrinting.selectorToMarkedString(node, flagOpts),
|
|
57
|
+
range: getRange(node),
|
|
49
58
|
};
|
|
50
59
|
break;
|
|
51
60
|
}
|
|
@@ -56,7 +65,7 @@
|
|
|
56
65
|
if (!(0, strings_1.startsWith)(node.getText(), '@')) {
|
|
57
66
|
hover = {
|
|
58
67
|
contents: this.selectorPrinting.simpleSelectorToMarkedString(node),
|
|
59
|
-
range: getRange(node)
|
|
68
|
+
range: getRange(node),
|
|
60
69
|
};
|
|
61
70
|
}
|
|
62
71
|
break;
|
|
@@ -69,7 +78,7 @@
|
|
|
69
78
|
if (contents) {
|
|
70
79
|
hover = {
|
|
71
80
|
contents,
|
|
72
|
-
range: getRange(node)
|
|
81
|
+
range: getRange(node),
|
|
73
82
|
};
|
|
74
83
|
}
|
|
75
84
|
else {
|
|
@@ -86,7 +95,7 @@
|
|
|
86
95
|
if (contents) {
|
|
87
96
|
hover = {
|
|
88
97
|
contents,
|
|
89
|
-
range: getRange(node)
|
|
98
|
+
range: getRange(node),
|
|
90
99
|
};
|
|
91
100
|
}
|
|
92
101
|
else {
|
|
@@ -97,15 +106,13 @@
|
|
|
97
106
|
}
|
|
98
107
|
if (node instanceof nodes.Node && node.type === nodes.NodeType.PseudoSelector) {
|
|
99
108
|
const selectorName = node.getText();
|
|
100
|
-
const entry = selectorName.slice(0, 2) === '::'
|
|
101
|
-
? this.cssDataManager.getPseudoElement(selectorName)
|
|
102
|
-
: this.cssDataManager.getPseudoClass(selectorName);
|
|
109
|
+
const entry = selectorName.slice(0, 2) === '::' ? this.cssDataManager.getPseudoElement(selectorName) : this.cssDataManager.getPseudoClass(selectorName);
|
|
103
110
|
if (entry) {
|
|
104
111
|
const contents = languageFacts.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
|
|
105
112
|
if (contents) {
|
|
106
113
|
hover = {
|
|
107
114
|
contents,
|
|
108
|
-
range: getRange(node)
|
|
115
|
+
range: getRange(node),
|
|
109
116
|
};
|
|
110
117
|
}
|
|
111
118
|
else {
|
|
@@ -129,12 +136,12 @@
|
|
|
129
136
|
else if ('kind' in contents) {
|
|
130
137
|
return {
|
|
131
138
|
kind: 'plaintext',
|
|
132
|
-
value: contents.value
|
|
139
|
+
value: contents.value,
|
|
133
140
|
};
|
|
134
141
|
}
|
|
135
142
|
// MarkedString[]
|
|
136
143
|
else if (Array.isArray(contents)) {
|
|
137
|
-
return contents.map(c => {
|
|
144
|
+
return contents.map((c) => {
|
|
138
145
|
return typeof c === 'string' ? c : c.value;
|
|
139
146
|
});
|
|
140
147
|
}
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
this.result = [];
|
|
127
127
|
// empty
|
|
128
128
|
}
|
|
129
|
-
print(element) {
|
|
129
|
+
print(element, flagOpts) {
|
|
130
130
|
this.result = [];
|
|
131
131
|
if (element instanceof RootElement) {
|
|
132
132
|
if (element.children) {
|
|
@@ -136,7 +136,13 @@
|
|
|
136
136
|
else {
|
|
137
137
|
this.doPrint([element], 0);
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
let value;
|
|
140
|
+
if (flagOpts) {
|
|
141
|
+
value = `${flagOpts.text}\n … ` + this.result.join('\n');
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
value = this.result.join('\n');
|
|
145
|
+
}
|
|
140
146
|
return [{ language: 'html', value }];
|
|
141
147
|
}
|
|
142
148
|
doPrint(elements, indent) {
|
|
@@ -313,10 +319,10 @@
|
|
|
313
319
|
constructor(cssDataManager) {
|
|
314
320
|
this.cssDataManager = cssDataManager;
|
|
315
321
|
}
|
|
316
|
-
selectorToMarkedString(node) {
|
|
322
|
+
selectorToMarkedString(node, flagOpts) {
|
|
317
323
|
const root = selectorToElement(node);
|
|
318
324
|
if (root) {
|
|
319
|
-
const markedStrings = new MarkedStringPrinter('"').print(root);
|
|
325
|
+
const markedStrings = new MarkedStringPrinter('"').print(root, flagOpts);
|
|
320
326
|
markedStrings.push(this.selectorToSpecificityMarkedString(node));
|
|
321
327
|
return markedStrings;
|
|
322
328
|
}
|
|
@@ -335,7 +341,7 @@
|
|
|
335
341
|
if (!match) {
|
|
336
342
|
return false;
|
|
337
343
|
}
|
|
338
|
-
return !!this.cssDataManager.getPseudoElement(
|
|
344
|
+
return !!this.cssDataManager.getPseudoElement('::' + match[1]);
|
|
339
345
|
}
|
|
340
346
|
selectorToSpecificityMarkedString(node) {
|
|
341
347
|
const calculateMostSpecificListItem = (childElements) => {
|
|
@@ -383,7 +389,7 @@
|
|
|
383
389
|
break;
|
|
384
390
|
case nodes.NodeType.ElementNameSelector:
|
|
385
391
|
//ignore universal selector
|
|
386
|
-
if (element.matches(
|
|
392
|
+
if (element.matches('*')) {
|
|
387
393
|
break;
|
|
388
394
|
}
|
|
389
395
|
specificity.tag++;
|
|
@@ -432,7 +438,7 @@
|
|
|
432
438
|
/* The specificity of the :nth-child(An+B [of S]?) pseudo-class is the specificity of a single pseudo-class plus, if S is specified, the specificity of the most specific complex selector in S */
|
|
433
439
|
// https://www.w3.org/TR/selectors-4/#the-nth-child-pseudo
|
|
434
440
|
specificity.attr++;
|
|
435
|
-
// 23 = Binary Expression.
|
|
441
|
+
// 23 = Binary Expression.
|
|
436
442
|
if (childElements.length === 3 && childElements[1].type === 23) {
|
|
437
443
|
let mostSpecificListItem = calculateMostSpecificListItem(childElements[2].getChildren());
|
|
438
444
|
specificity.id += mostSpecificListItem.id;
|
|
@@ -446,7 +452,7 @@
|
|
|
446
452
|
parser.scanner.setSource(pseudoSelectorText);
|
|
447
453
|
const firstToken = parser.scanner.scan();
|
|
448
454
|
const secondToken = parser.scanner.scan();
|
|
449
|
-
if (firstToken.text === 'n' || firstToken.text === '-n' && secondToken.text === 'of') {
|
|
455
|
+
if (firstToken.text === 'n' || (firstToken.text === '-n' && secondToken.text === 'of')) {
|
|
450
456
|
const complexSelectorListNodes = [];
|
|
451
457
|
const complexSelectorText = pseudoSelectorText.slice(secondToken.offset + 2);
|
|
452
458
|
const complexSelectorArray = complexSelectorText.split(',');
|
|
@@ -477,7 +483,7 @@
|
|
|
477
483
|
return specificity;
|
|
478
484
|
};
|
|
479
485
|
const specificity = calculateScore(node);
|
|
480
|
-
return `[${l10n.t(
|
|
486
|
+
return `[${l10n.t('Selector Specificity')}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${specificity.id}, ${specificity.attr}, ${specificity.tag})`;
|
|
481
487
|
}
|
|
482
488
|
}
|
|
483
489
|
exports.SelectorPrinting = SelectorPrinting;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscode-css-languageservice",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.13",
|
|
4
4
|
"description": "Language service for CSS, LESS and SCSS",
|
|
5
5
|
"main": "./lib/umd/cssLanguageService.js",
|
|
6
6
|
"typings": "./lib/umd/cssLanguageService",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/mocha": "^10.0.6",
|
|
19
19
|
"@types/node": "16.x",
|
|
20
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
21
|
-
"@typescript-eslint/parser": "^6.
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
21
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
22
22
|
"@vscode/web-custom-data": "^0.4.9",
|
|
23
|
-
"eslint": "^8.
|
|
24
|
-
"js-beautify": "^1.
|
|
25
|
-
"mocha": "^10.
|
|
23
|
+
"eslint": "^8.57.0",
|
|
24
|
+
"js-beautify": "^1.15.1",
|
|
25
|
+
"mocha": "^10.3.0",
|
|
26
26
|
"rimraf": "^5.0.5",
|
|
27
27
|
"source-map-support": "^0.5.21",
|
|
28
28
|
"typescript": "^5.3.3"
|