Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #352 (and #327 along the way).
Swaps
@acemir/cssomforcssomnom/parseand backsel.style(esm/interface/css-style-declaration.js) withcssomnom'sCSSStyleDeclaration+onChangehook soel.styleandsheet.cssRules[i].styleshare the same implementation (and we can drop theuhyphendep).What this changes:
exports, so Vite/Rolldown/esbuild browser and worker builds resolve cleanly.el.style.toString()/cssTextnow serializes per the CSSOM spec (#serialize-a-css-declaration-block) with canonical spacing and trailing semicolon ("background-color: blue; ...;"instead of"background-color:blue;..."), matching browsers andsheet.cssRules[i].style, as @lppedd noted in 0.18.14: browser bundlers fail with "parse" is not exported by @acemir/cssom/build/CSSOM.js #352.el.style.color = ''removes the property instead of leavingcolor: ;in the attribute (fixesel.style.property = ''ande.style.setProperty('property', '')should delete the property #327).url("data:image/svg+xml;utf8,...")values containing;or:no longer get split across declarations, and--customPropertypreserves case.If you'd rather keep
esm/interface/css-style-declaration.jsuntouched for now soel.style.toString()formatting stays identical and only swapesm/html/style-element.js, here's what that minimal diff looks like (happy to drop the last commit if you prefer that!). :)