Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jsdom/cssstyle
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.3.5
Choose a base ref
...
head repository: jsdom/cssstyle
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.3.6
Choose a head ref
  • 16 commits
  • 88 files changed
  • 2 contributors

Commits on Dec 17, 2025

  1. Clean up package.json

    * Expand the "description" field.
    * Update "repository" to the modern format, per complaints from the npm CLI.
    * Remove "homepage" and "bugs", as they can be inferred from "repository".
    * Remove "maintainers", as that is set by npm automatically.
    * Remove "contributors", as it was outdated and that data is better tracked on GitHub anyway.
    * Remove "directories", since an entry for the "lib" directory does nothing.
    * Remove the .npmignore file, since it's redundant with the package.json "files" field.
    domenic committed Dec 17, 2025
    Configuration menu
    Copy the full SHA
    3c7ea59 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2025

  1. Configuration menu
    Copy the full SHA
    05ebb2c View commit details
    Browse the repository at this point in the history
  2. Refactor exports to use module.exports object

    Replaces individual exports assignments with local function declarations and a single module.exports object at the end of the file. This improves code clarity and maintainability by consolidating all exports in one place.
    asamuzaK authored and domenic committed Dec 27, 2025
    Configuration menu
    Copy the full SHA
    78b13dc View commit details
    Browse the repository at this point in the history
  3. Add JSDoc comments to parser utility functions

    Added detailed JSDoc comments to all major functions in lib/parsers.js to improve code readability and provide better context for parameters and return values. This enhances maintainability and developer experience by clarifying function purposes and usage.
    asamuzaK authored and domenic committed Dec 27, 2025
    Configuration menu
    Copy the full SHA
    3b32b0d View commit details
    Browse the repository at this point in the history
  4. Refactor keyword and color lists to use Set

    Replaces arrays for global CSS keywords and system colors with Set objects for improved lookup performance. Updates all relevant checks from .includes() to .has().
    asamuzaK authored and domenic committed Dec 27, 2025
    Configuration menu
    Copy the full SHA
    0bff5e4 View commit details
    Browse the repository at this point in the history
  5. Refactor AST node type checks to use constants

    Introduces an AST_TYPES constant object to centralize AST node type strings and replaces hardcoded type string comparisons throughout the file with references to AST_TYPES. This improves maintainability and reduces the risk of typos or inconsistencies in type checks.
    asamuzaK authored and domenic committed Dec 27, 2025
    Configuration menu
    Copy the full SHA
    b04beb1 View commit details
    Browse the repository at this point in the history
  6. Refactor property value parsing for clarity

    Simplified the extraction of itemValue by replacing regex-based string replacement with a more direct slice operation. This improves readability and maintains the same functionality.
    asamuzaK authored and domenic committed Dec 27, 2025
    Configuration menu
    Copy the full SHA
    11e004a View commit details
    Browse the repository at this point in the history
  7. Refactor numeric value parsing logic

    Introduces a shared parseNumericValue helper to unify and simplify parsing of numbers, lengths, percentages, and angles. This reduces code duplication and improves maintainability across parseNumber, parseLength, parsePercentage, parseLengthPercentage, and parseAngle.
    asamuzaK authored and domenic committed Dec 27, 2025
    Configuration menu
    Copy the full SHA
    b6a4e5f View commit details
    Browse the repository at this point in the history
  8. Refactor calc name assignment in parsePropertyValue

    Replaces hardcoded 'calc' string with the variable 'name' when assigning the 'name' property in parsedValues. This improves code maintainability and consistency for function parsing.
    asamuzaK authored and domenic committed Dec 27, 2025
    Configuration menu
    Copy the full SHA
    0a71683 View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2025

  1. Refactor to prepare for addressing shorthand property issues

    Introduce a mechanism to auto-generate CSS property definitions in propertyDefinitions.js, and refactor the codebase to use these generated definitions. This will be used eventually in jsdom to replace propertiesWithResolvedValueImplemented in jsdom's lib/jsdom/living/helpers/style-rules.js, allowing jsdom to delegate property metadata management entirely to cssstyle.
    
    Refactor normalize.js into smaller functions with clearer roles.
    
    Replace string literals with constants where possible.
    
    This work is mostly preparatory, but it does fix web-platform-tests/to-upstream/css/cssom/style-border-shorthand-var.html.
    
    Follow-up work will implement the complex logic for expanding shorthands into longhands.
    asamuzaK authored Dec 31, 2025
    Configuration menu
    Copy the full SHA
    a3413ab View commit details
    Browse the repository at this point in the history
  2. Add property name exports to property modules

    Each property module now exports its property name as `module.exports.property`. This change enables more consistent and DRY usage of property names throughout the codebase, especially for shorthand and initial value maps, reducing hardcoded strings and potential typos.
    asamuzaK authored and domenic committed Dec 31, 2025
    Configuration menu
    Copy the full SHA
    e337088 View commit details
    Browse the repository at this point in the history
  3. Refactor priority calculation for property setters

    Simplifies and unifies the logic for determining the priority argument in property setters across background, border, flex, font, margin, and padding property modules. The new approach uses a single conditional to check shorthand and property priorities, improving code clarity and maintainability.
    asamuzaK authored and domenic committed Dec 31, 2025
    Configuration menu
    Copy the full SHA
    3705035 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c06fbab View commit details
    Browse the repository at this point in the history
  5. Improve getPropertyDescriptor() fallback code

    getPropertyDescriptor() is used for the generic getters and setters that do not have implementations in properties/*.js. Change from just parsing CSS and setting it as-is, to handle properties more correctly by using the AST types.
    asamuzaK authored and domenic committed Dec 31, 2025
    Configuration menu
    Copy the full SHA
    dcfbbaf View commit details
    Browse the repository at this point in the history
  6. Add LRU cache for CSS parsing and validation

    Should help with jsdom/jsdom#3985.
    asamuzaK authored Dec 31, 2025
    Configuration menu
    Copy the full SHA
    2818a50 View commit details
    Browse the repository at this point in the history
  7. 5.3.6

    domenic committed Dec 31, 2025
    Configuration menu
    Copy the full SHA
    35dbfe7 View commit details
    Browse the repository at this point in the history
Loading