Skip to content

fix: #264 convert unparsed computed style to Attr::CSSUnknown - #265

Merged
noahbald merged 2 commits into
mainfrom
fix/264-panic-on-unparsed-computed-style
Aug 14, 2026
Merged

fix: #264 convert unparsed computed style to Attr::CSSUnknown#265
noahbald merged 2 commits into
mainfrom
fix/264-panic-on-unparsed-computed-style

Conversation

@noahbald

@noahbald noahbald commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Description

This fixes a panic when using a stylesheet that has properties lightningcss is unable to parse.

Closes #264 #239

How Has This Been Tested?

  • '<svg><p d="M0 0l0 1" style="fill: var(--c, #fff)"/></svg>' | oxvg optimise

Note that OXVG assumes unparseable properties are invalid, and so drops them.

Types of changes

Fixes

  • TryFrom<Property> for Attr handles Property::UnparsedProperty
  • get_computed_style! returns a new type ComputedStyle with Unparsed variant

Checklist:

  • My code follows the code style of this project
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@noahbald noahbald self-assigned this Aug 13, 2026
@noahbald
noahbald merged commit d4edf03 into main Aug 14, 2026
38 of 39 checks passed
@noahbald
noahbald deleted the fix/264-panic-on-unparsed-computed-style branch August 14, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ComputedStyles::get aborts the process (SIGABRT) on a var() in a style declaration

1 participant