@cross-css/native-darwin-arm64 0.3.1 → 0.3.3
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/README.md +34 -2
- package/package.json +1 -1
- package/xcss.node +0 -0
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ These APIs do not compile CSS or read files. See the repository's
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
## CSS declaration validation inputs (API v2, native 0.3.
|
|
45
|
+
## CSS declaration validation inputs (API v2, native 0.3.2)
|
|
46
46
|
|
|
47
47
|
`LanguageService.cssDeclarations(uri)` returns `{ revision, declarations }` from
|
|
48
48
|
the same analysis snapshot as other editor queries, without compiling CSS.
|
|
@@ -59,7 +59,39 @@ Unknown references, native var(), recovery regions, transition groups and other
|
|
|
59
59
|
unsupported transformations make values uncheckable; property names remain
|
|
60
60
|
available. Parts on uncheckable declarations are incomplete and must not be
|
|
61
61
|
validated. XCSS directives, variable registrations, and direct declarations in
|
|
62
|
-
at-rule bodies
|
|
62
|
+
descriptor at-rule bodies are excluded. Conditional blocks nested in rules inherit their declaration context. Rules nested inside at-rules remain
|
|
63
63
|
eligible. Consumers may substitute representative CSS values for typed parts;
|
|
64
64
|
this is a broad compatibility check, not proof for all values of that type.
|
|
65
65
|
Changes to any file or resolution invalidate the snapshot revision.
|
|
66
|
+
|
|
67
|
+
## Selector analysis and specificity (API v3)
|
|
68
|
+
|
|
69
|
+
`LanguageService.selectors(uri)` returns `{ revision, selectors }` without
|
|
70
|
+
compiling CSS. Each selector-list member has its original UTF-16 `range`,
|
|
71
|
+
non-overlapping `parts` (`kind`, `range`), and either `specificity`
|
|
72
|
+
(`ids`, `classes`, `types`) or an explanatory `reason` when an exact
|
|
73
|
+
score is unavailable. Compare specificity tuples lexicographically, never as
|
|
74
|
+
decimal numbers. This is selector specificity, not full cascade priority.
|
|
75
|
+
|
|
76
|
+
Classification covers classes, IDs, tags, attribute names, pseudo-classes,
|
|
77
|
+
pseudo-elements, universal selectors, nesting, combinators, and namespace prefixes.
|
|
78
|
+
Attribute strings and numbers keep lexical highlighting. Functional pseudo names
|
|
79
|
+
include colon prefixes, while their selector arguments have independent parts.
|
|
80
|
+
The existing eight semantic token indices are stable; API v3 appends
|
|
81
|
+
`selectorId`, `selectorTag`, `selectorAttribute`, `pseudoClass`,
|
|
82
|
+
`pseudoElement`, `selectorUniversal`, `selectorNesting`,
|
|
83
|
+
`selectorCombinator`, and `selectorNamespace`. IDs no longer use `variable`.
|
|
84
|
+
|
|
85
|
+
Specificity follows [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Cascade/Specificity/)
|
|
86
|
+
and the linked CSS specifications: zero-weight `:where()`, maximum arguments
|
|
87
|
+
for `:is()`, `:not()`, and `:has()`, nth-child selector filters,
|
|
88
|
+
shadow DOM selectors, legacy pseudo-elements, and implicit/explicit nesting.
|
|
89
|
+
Parent lists contribute their maximum tuple; repeated `&` contributes repeatedly.
|
|
90
|
+
XCSS `:local` and `:global` wrappers are transparent. Scoped renaming does
|
|
91
|
+
not change specificity. At-rule boundaries add no specificity; an explicit
|
|
92
|
+
`:scope` counts as a pseudo-class. Keyframe steps are excluded.
|
|
93
|
+
|
|
94
|
+
Invalid/recovered selectors, unsupported functional selectors, unresolved parents,
|
|
95
|
+
and selectors in injection definitions whose call-site context is unknown have
|
|
96
|
+
no exact score. Other valid selector-list members remain queryable. This API does
|
|
97
|
+
not expand injection calls or provide lint thresholds or editor hover UI.
|
package/package.json
CHANGED
package/xcss.node
CHANGED
|
Binary file
|