Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@lezer/css

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lezer/css - npm Package Compare versions

Comparing version
1.2.0
to
1.2.1
+6
-0
CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.2.1 (2025-05-15)
### Bug fixes
Fix parsing of `*` selectors in descendant positions.
## 1.2.0 (2025-05-12)

@@ -2,0 +8,0 @@

+2
-2

@@ -22,3 +22,3 @@ 'use strict';

const colon = 58, parenL = 40, underscore = 95, bracketL = 91, dash = 45, period = 46,
hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10;
hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10, asterisk = 42;

@@ -55,3 +55,3 @@ function isAlpha(ch) { return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 161 }

if (isAlpha(next) || next == underscore || next == hash || next == period ||
next == bracketL || next == colon && isAlpha(input.peek(1)) ||
next == asterisk || next == bracketL || next == colon && isAlpha(input.peek(1)) ||
next == dash || next == ampersand)

@@ -58,0 +58,0 @@ input.acceptToken(descendantOp);

@@ -18,3 +18,3 @@ import { ExternalTokenizer, LRParser, LocalTokenGroup } from '@lezer/lr';

const colon = 58, parenL = 40, underscore = 95, bracketL = 91, dash = 45, period = 46,
hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10;
hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10, asterisk = 42;

@@ -51,3 +51,3 @@ function isAlpha(ch) { return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 161 }

if (isAlpha(next) || next == underscore || next == hash || next == period ||
next == bracketL || next == colon && isAlpha(input.peek(1)) ||
next == asterisk || next == bracketL || next == colon && isAlpha(input.peek(1)) ||
next == dash || next == ampersand)

@@ -54,0 +54,0 @@ input.acceptToken(descendantOp);

{
"name": "@lezer/css",
"version": "1.2.0",
"version": "1.2.1",
"description": "lezer-based CSS grammar",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs",

@@ -10,3 +10,3 @@ /* Hand-written tokenizers for CSS tokens that can't be

const colon = 58, parenL = 40, underscore = 95, bracketL = 91, dash = 45, period = 46,
hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10
hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10, asterisk = 42

@@ -43,3 +43,3 @@ function isAlpha(ch) { return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 161 }

if (isAlpha(next) || next == underscore || next == hash || next == period ||
next == bracketL || next == colon && isAlpha(input.peek(1)) ||
next == asterisk || next == bracketL || next == colon && isAlpha(input.peek(1)) ||
next == dash || next == ampersand)

@@ -46,0 +46,0 @@ input.acceptToken(descendantOp)

# Universal selectors
* {}
div * {}
==>
StyleSheet(RuleSet(UniversalSelector,Block))
StyleSheet(
RuleSet(UniversalSelector,Block),
RuleSet(DescendantSelector(TagSelector(TagName),UniversalSelector),Block))

@@ -9,0 +12,0 @@ # Type selectors