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
Style attribute added to span tags in #97793
Currently, it allows setting color and background-color but many times the background color doesn't apply because span is display: inline by default and doesn't have an actual width and height.
Adding display prop to the allowed styles will fix that and also will open up many other (safe) options for layoutting.
e.g, in pretty-ts-errors I had to use codicon classes to apply background-color and make things inlined. That classes bring unwanted styles like user-select: none that prevent selecting and copying the content.
Now it's a huge deal for tens of thousands of developers that can't copy the types from their errors.
I know that no one wants to keep adding styles to the sanitized regex and it opens the barrier for other requests like this but display prop is different. It is not a niche CSS prop, it is one of the most essential props in CSS and one of the few things that markdown can't do.
I made a pull request that add it, I hope it helps: #180498
The text was updated successfully, but these errors were encountered:
🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
Style attribute added to span tags in #97793
Currently, it allows setting
color
andbackground-color
but many times the background color doesn't apply because span isdisplay: inline
by default and doesn't have an actual width and height.Adding
display
prop to the allowed styles will fix that and also will open up many other (safe) options for layoutting.e.g, in pretty-ts-errors I had to use codicon classes to apply background-color and make things inlined. That classes bring unwanted styles like
user-select: none
that prevent selecting and copying the content.Now it's a huge deal for tens of thousands of developers that can't copy the types from their errors.
I know that no one wants to keep adding styles to the sanitized regex and it opens the barrier for other requests like this but
display
prop is different. It is not a niche CSS prop, it is one of the most essential props in CSS and one of the few things that markdown can't do.I made a pull request that add it, I hope it helps: #180498
The text was updated successfully, but these errors were encountered: