Skip to content

Modify parsers to be AST-based #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a6029b0
Move some functions
asamuzaK Jul 27, 2025
5874693
Fix CSSStyleDeclaration.js and parsers.js
asamuzaK Jul 27, 2025
5bc7654
Remove isValid() from background
asamuzaK Jul 27, 2025
83238ce
Fix typo
asamuzaK Jul 27, 2025
b5a28cb
Fix _implicitSetter
asamuzaK Jul 27, 2025
cd9374f
Fix _subImplicitSetter
asamuzaK Jul 27, 2025
4f3f22e
Remove isValid()
asamuzaK Jul 30, 2025
3733d9a
Remove isValidColor()
asamuzaK Jul 30, 2025
1c08f53
Update properties
asamuzaK Jul 31, 2025
238f2b2
Export hasCalcFunc and add parseCalc
asamuzaK Aug 1, 2025
bc44907
Update backgrounds
asamuzaK Aug 1, 2025
c12fadc
Update borders
asamuzaK Aug 1, 2025
0416d4f
Update flex
asamuzaK Aug 1, 2025
0a4f0fb
Update numeric value parsers
asamuzaK Aug 1, 2025
c696fa8
Update fonts
asamuzaK Aug 1, 2025
73e0588
Update colors
asamuzaK Aug 2, 2025
9c87c5a
Update positions and boxes
asamuzaK Aug 2, 2025
a117362
Update floats and display
asamuzaK Aug 2, 2025
ae15a82
Fix colors and opacity
asamuzaK Aug 2, 2025
7b1acaf
Rename variable
asamuzaK Aug 2, 2025
79ae451
Update margins and paddings
asamuzaK Aug 2, 2025
bd512f6
Update parsers.js
asamuzaK Aug 2, 2025
1a3fabe
Add @webref/css
asamuzaK Aug 2, 2025
21bc17d
Update allProperties.js
asamuzaK Aug 2, 2025
96d527a
Update dev dependencies
asamuzaK Aug 2, 2025
66fa6c5
Update parseFunction
asamuzaK Aug 3, 2025
79f8800
Update parsers.js
asamuzaK Aug 3, 2025
c096b7d
Update backgroundColor.js
asamuzaK Aug 3, 2025
7829706
Add generic function to parse property value
asamuzaK Aug 3, 2025
fe2d356
Add edge case test
asamuzaK Aug 3, 2025
1762619
Update CSSStyleDeclaration.js
asamuzaK Aug 4, 2025
3cd3722
Update parsePropertyValue()
asamuzaK Aug 4, 2025
fe5bee5
Update parser functions
asamuzaK Aug 9, 2025
cd86606
Update fonts
asamuzaK Aug 10, 2025
a766882
Fix calc and shorthand handlers
asamuzaK Aug 10, 2025
29d3a59
Fix borders
asamuzaK Aug 11, 2025
b3e1bfe
Fix borders part2
asamuzaK Aug 18, 2025
a798d3b
Update parsers
asamuzaK Aug 20, 2025
80c1298
Update normalizeBorderProperties function
asamuzaK Aug 21, 2025
2510f3c
Update file path
asamuzaK Aug 22, 2025
d399c7a
Update normalize.js
asamuzaK Aug 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
400 changes: 194 additions & 206 deletions lib/CSSStyleDeclaration.js

Large diffs are not rendered by default.

49 changes: 0 additions & 49 deletions lib/allExtraProperties.js

This file was deleted.

40 changes: 39 additions & 1 deletion lib/generated/allProperties.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
// autogenerated - 2025-05-14
// autogenerated - 2025-08-02
// https://www.w3.org/Style/CSS/all-properties.en.html

module.exports = new Set([
Expand Down Expand Up @@ -57,21 +57,29 @@ module.exports = new Set([
"border-block-color",
"border-block-end",
"border-block-end-color",
"border-block-end-radius",
"border-block-end-style",
"border-block-end-width",
"border-block-start",
"border-block-start-color",
"border-block-start-radius",
"border-block-start-style",
"border-block-start-width",
"border-block-style",
"border-block-width",
"border-bottom",
"border-bottom-color",
"border-bottom-left-radius",
"border-bottom-radius",
"border-bottom-right-radius",
"border-bottom-style",
"border-bottom-width",
"border-boundary",
"border-clip",
"border-clip-bottom",
"border-clip-left",
"border-clip-right",
"border-clip-top",
"border-collapse",
"border-color",
"border-end-end-radius",
Expand All @@ -86,37 +94,49 @@ module.exports = new Set([
"border-inline-color",
"border-inline-end",
"border-inline-end-color",
"border-inline-end-radius",
"border-inline-end-style",
"border-inline-end-width",
"border-inline-start",
"border-inline-start-color",
"border-inline-start-radius",
"border-inline-start-style",
"border-inline-start-width",
"border-inline-style",
"border-inline-width",
"border-left",
"border-left-color",
"border-left-radius",
"border-left-style",
"border-left-width",
"border-limit",
"border-radius",
"border-right",
"border-right-color",
"border-right-radius",
"border-right-style",
"border-right-width",
"border-shape",
"border-spacing",
"border-start-end-radius",
"border-start-start-radius",
"border-style",
"border-top",
"border-top-color",
"border-top-left-radius",
"border-top-radius",
"border-top-right-radius",
"border-top-style",
"border-top-width",
"border-width",
"bottom",
"box-decoration-break",
"box-shadow",
"box-shadow-blur",
"box-shadow-color",
"box-shadow-offset",
"box-shadow-position",
"box-shadow-spread",
"box-sizing",
"box-snap",
"break-after",
Expand Down Expand Up @@ -158,6 +178,23 @@ module.exports = new Set([
"content",
"content-visibility",
"continue",
"corner-block-end-shape",
"corner-block-start-shape",
"corner-bottom-left-shape",
"corner-bottom-right-shape",
"corner-bottom-shape",
"corner-end-end-shape",
"corner-end-start-shape",
"corner-inline-end-shape",
"corner-inline-start-shape",
"corner-left-shape",
"corner-right-shape",
"corner-shape",
"corner-start-end-shape",
"corner-start-start-shape",
"corner-top-left-shape",
"corner-top-right-shape",
"corner-top-shape",
"counter-increment",
"counter-reset",
"counter-set",
Expand Down Expand Up @@ -382,6 +419,7 @@ module.exports = new Set([
"overflow-wrap",
"overflow-x",
"overflow-y",
"overlay",
"overscroll-behavior",
"overscroll-behavior-block",
"overscroll-behavior-inline",
Expand Down
Loading