-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(syntax-highlighter): add light variant #8938
Conversation
Hi @xseman thanks for the PR! What would be the implication on the resulting bundle size? I assume minimal as the new file only contains following source code: export default {
"hljs": {
"display": "block",
"overflowX": "auto",
"padding": "0.5em",
"color": "#000",
"background": "#fff"
},
"hljs-subst": {
"fontWeight": "normal",
"color": "#000"
},
"hljs-title": {
"fontWeight": "normal",
"color": "#000"
},
"hljs-comment": {
"color": "#808080",
"fontStyle": "italic"
},
"hljs-quote": {
"color": "#808080",
"fontStyle": "italic"
},
"hljs-meta": {
"color": "#808000"
},
"hljs-tag": {
"background": "#efefef"
},
"hljs-section": {
"fontWeight": "bold",
"color": "#000080"
},
"hljs-name": {
"fontWeight": "bold",
"color": "#000080"
},
"hljs-literal": {
"fontWeight": "bold",
"color": "#000080"
},
"hljs-keyword": {
"fontWeight": "bold",
"color": "#000080"
},
"hljs-selector-tag": {
"fontWeight": "bold",
"color": "#000080"
},
"hljs-type": {
"fontWeight": "bold",
"color": "#000080"
},
"hljs-selector-id": {
"fontWeight": "bold",
"color": "#000080"
},
"hljs-selector-class": {
"fontWeight": "bold",
"color": "#000080"
},
"hljs-attribute": {
"fontWeight": "bold",
"color": "#0000ff"
},
"hljs-number": {
"fontWeight": "normal",
"color": "#0000ff"
},
"hljs-regexp": {
"fontWeight": "normal",
"color": "#0000ff"
},
"hljs-link": {
"fontWeight": "normal",
"color": "#0000ff"
},
"hljs-string": {
"color": "#008000",
"fontWeight": "bold"
},
"hljs-symbol": {
"color": "#000",
"background": "#d0eded",
"fontStyle": "italic"
},
"hljs-bullet": {
"color": "#000",
"background": "#d0eded",
"fontStyle": "italic"
},
"hljs-formula": {
"color": "#000",
"background": "#d0eded",
"fontStyle": "italic"
},
"hljs-doctag": {
"textDecoration": "underline"
},
"hljs-variable": {
"color": "#660e7a"
},
"hljs-template-variable": {
"color": "#660e7a"
},
"hljs-addition": {
"background": "#baeeba"
},
"hljs-deletion": {
"background": "#ffc8bd"
},
"hljs-emphasis": {
"fontStyle": "italic"
},
"hljs-strong": {
"fontWeight": "bold"
}
}; |
@char0n indeed, you are correct, in bytes minified version difference is (1508 bytes).
Do you want me to do any improvements? But I guess I can't do much unless I can remove some of the different dark variations. |
Thanks for confirming
Not really, it's fine as it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks a lot for contributing!
A pozdravujem do Bratislavy ;] |
This pull request adds a new light theme idea for syntax highlighting.
Description
Provide users with an alternative theme option, specifically a light background for syntax highlighting. This offer more customization options to users.
Motivation and Context
Currently, there is only a dark themes available. Personally, I find the light theme easier on the eyes.
How Has This Been Tested?
I have manually tested the changes by applying the new light theme to the syntax highlighting feature.
Screenshots (if appropriate):
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests