You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The facades for dom.HTMLElement.style is missing several
CSS counterparts. Here are some I've noticed:
justify-content (only justifyText)
text-decoration-colortext-decoration-linetext-direction-styletext-direction-thickness
(only textDecoration which doesn't allow setting multiple decorations at once)
And in my use case I need to programmatically set these styles (not defined a .css file). I could reset the entire style.cssText = "..." file, but this would reset all other styles previously set. I could try style.cssText += "...", but this risks repeatedly appending the same style to the cssText if done in a loop without carefully checking if that style has not already been occurred.
Really, the API should just be complete, no workarounds required.
We should document all known missing style member counterparts in this issue thread with the goal of 1-to-1 completeness.
I assume implementing these missing style setters is trivial, I'm willing to contribute them myself if someone can tell me where in the codebase I need to go to do it.
The text was updated successfully, but these errors were encountered:
sjrd
transferred this issue from scala-js/scala-js
Mar 4, 2025
The facades for
dom.HTMLElement.style
is missing severalCSS counterparts. Here are some I've noticed:
justify-content
(onlyjustifyText
)text-decoration-color
text-decoration-line
text-direction-style
text-direction-thickness
(only
textDecoration
which doesn't allow setting multiple decorations at once)And in my use case I need to programmatically set these styles (not defined a
.css
file). I could reset the entirestyle.cssText = "..."
file, but this would reset all other styles previously set. I could trystyle.cssText += "..."
, but this risks repeatedly appending the same style to thecssText
if done in a loop without carefully checking if that style has not already been occurred.Really, the API should just be complete, no workarounds required.
We should document all known missing style member counterparts in this issue thread with the goal of 1-to-1 completeness.
I assume implementing these missing style setters is trivial, I'm willing to contribute them myself if someone can tell me where in the codebase I need to go to do it.
The text was updated successfully, but these errors were encountered: