Skip to content

Replace @acemir/cssom with cssomnom/parse - #356

Merged
WebReflection merged 4 commits into
WebReflection:mainfrom
paulirish:cssomnom
Nov 1, 2026
Merged

WebReflection merged 4 commits into
WebReflection:mainfrom
paulirish:cssomnom

Conversation

@paulirish

@paulirish paulirish commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #352.

Swaps @acemir/cssom for cssomnom/parse in esm/html/style-element.js (leaving esm/interface/css-style-declaration.js and uhyphen untouched so el.style.toString() stays identical).

What this changes:

Comment thread esm/dom/string-map.js Outdated
@@ -1,4 +1,4 @@
import uhyphen from 'uhyphen';
const uhyphen = camel => camel.replace(/(([A-Z0-9])([A-Z0-9][a-z]))|(([a-z0-9]+)([A-Z]))/g, '$2$5-$3$6').toLowerCase();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know uhyphen is one line dependency but that's still used in more than a place, was this change necessary? 🤔

@WebReflection

Copy link
Copy Markdown
Owner

hi @paulirish - first of all, thank you! secondly, I believe inlining uhyphen did cause the regression around coverage ... I know that module is left-pad-ish but it's still my module, code-covered and everything, and I've been using it here and there to stop thinking about it ... shall we put back it as import?

Last, b ut not least, what should I bump? major, minor or patch? if things are similar but fixed I think patch is fine but as the library is different maybe minor would be appropriate? I had different ideas for major but I also wouldn't mind bumping major if needed, thanks for helping me out brainstorming this!

@paulirish paulirish changed the title Replace @acemir/cssom and uhyphen with cssomnom/parse Replace @acemir/cssom with cssomnom/parse Oct 31, 2026
@paulirish

paulirish commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Yeah I preferred dropping the uphyphen dependency (not realizing it was yours) especially cuz we could delete code and improve on conformance.

BUTTT I also don't care that much... I dropped that bit.. which also means no userfacing change too (the toString() thing).

Now with el.style untouched, IMO patch (0.18.15) makes total sense here. :)

@WebReflection
WebReflection merged commit 4b80ce6 into WebReflection:main Nov 1, 2026
2 checks passed
@WebReflection

Copy link
Copy Markdown
Owner

it's in, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants