Closed nolanlawson closed 3 months ago
! important
was always kind of broken; we just discovered it now due to actually writing tests for all whitespace combinations.
When looking at snapshots in core, I don't see anyone actually using ! important
so it probably doesn't matter.
It occurred to me that, instead of regexes, we can use the
elm.style
CSSStyleDeclaration object to serialize out thestyle
attribute. This has some benefits:data:
base64 URLs correctlyAnd some downsides:
! important
(due to the space) and it doesn't seem to like a leading;
color: yolo
) it will just strip them outbackground-color:#FFFFFF;"
becomesbackground-color: rgb(255, 255, 255);
I think this is an acceptable tradeoff, especially since it makes the code a lot cleaner.