Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow display prop on markdown span style #180496

Open
yoavbls opened this issue Apr 21, 2023 · 2 comments
Open

Allow display prop on markdown span style #180496

yoavbls opened this issue Apr 21, 2023 · 2 comments
Assignees
Labels
api feature-request Request for new features or functionality
Milestone

Comments

@yoavbls
Copy link

yoavbls commented Apr 21, 2023

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.

CleanShot 2023-04-21 at 13 37 42@2x

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

@yoavbls
Copy link
Author

yoavbls commented Jul 29, 2023

Hi there!
I just wanted to mention that JetBrains released their alternative solution
and their code blocks are copyable.

CleanShot 2023-07-29 at 19 40 35@2x

We don't want to stay behind, It could be so nice if you'll approve this little line in my PR 🙏🏼
https://github.com/microsoft/vscode/pull/180498/files

@mjbvz mjbvz added feature-request Request for new features or functionality api labels Dec 12, 2023
@VSCodeTriageBot
Copy link
Collaborator

🙂 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.

Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants