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 use of --vscode-XXX color variables in <span> style in Markdown #176064

Closed
gjsjohnmurray opened this issue Mar 3, 2023 · 1 comment · Fixed by #176312
Closed

Allow use of --vscode-XXX color variables in <span> style in Markdown #176064

gjsjohnmurray opened this issue Mar 3, 2023 · 1 comment · Fixed by #176312
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@gjsjohnmurray
Copy link
Contributor

This code permits hex colors to be specified in styling of <span> tags in Markdown where HTML is permitted:

if (element.tagName === 'SPAN') {
if (e.attrName === 'style') {
e.keepAttr = /^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(e.attrValue);
return;

I would like the constraint relaxed slightly so I can use color variables, for example:

<span style='color:var(--vscode-charts-green);'>

This should give me a green (say) that displays well regardless of what color theme the user has picked.

@mjbvz mjbvz added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Mar 6, 2023
@VSCodeTriageBot VSCodeTriageBot added this to the Backlog Candidates milestone Mar 6, 2023
@VSCodeTriageBot
Copy link
Collaborator

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

gjsjohnmurray added a commit to gjsjohnmurray/vscode that referenced this issue Mar 6, 2023
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Mar 7, 2023
@rzhao271 rzhao271 added the verification-needed Verification of issue is requested label Mar 21, 2023
@connor4312 connor4312 added the verified Verification succeeded label Mar 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants