Uh oh!
There was an error while loading. Please reload this page.
Add pug (jade) support - #67
Conversation
lee-dohm
commented
May 8, 2016
Would you mind creating the same change for https://github.com/atom/one-light-syntax? |
webdif
commented
May 9, 2016
Of course. The PR is here: atom/one-light-syntax#17 |
lee-dohm
commented
May 10, 2016
@simurai what do you think? |
simurai
commented
May 13, 2016
The styles seem fine. 👍 But not sure where we wanna draw the line what language should be supported in the default theme. Should it only be languages that come bundled by default with Atom? I guess every selector that gets added comes with a tiny tiny performance cost, even though you might never need those styles. Or is that so small that we shouldn't worry about it? /cc @atom/languages @atom/feedback |
thomasjo
commented
May 13, 2016
I'm personally leaning towards only adding support for languages bundled with Atom. At the same time, I realize that might not provide an optimal end-user experience... |
webdif
commented
May 13, 2016
Is it possible to add language support to a theme, via a separated package? That's what I searched for, before ending up with this PR. |
lee-dohm
commented
May 13, 2016
@webdif Yes, it is. For example, here is some code from my .theme-one-light-ui, .theme-one-dark-ui {
.status-bar { font-size:15px; }
.tab-bar { font-size:15px; }
.tree-view { font-size:15px; }
}Atom adds the names of the themes as classes on On the flip side, a separate package isn't going to have access as easily to the color information you're using in this PR. |
simurai
commented
May 14, 2016
In this case, you could hard code the colors in your .theme-one-dark-syntax atom-text-editor::shadow {
.source.pug,
.source.jade {
.meta {
&.tag.attribute {
&.id {
color: hsl(207, 82%, 66%);
}
&.class {
color: hsl( 29, 54%, 61%);
}
}
&.delimiter {
color: hsl( 5, 48%, 51%);
}
}
.constant.character.entity {
color: hsl( 39, 67%, 69%);
}
}
}Of course, the colors could change, unlikely anytime soon, but still. So another option is to try to use the official variables. Other themes might support them too and if not, there is a fallback from core: @import"syntax-variables";
atom-text-editor::shadow {
.source.pug,
.source.jade {
.meta {
&.tag.attribute {
&.id {
color: @syntax-color-method; // @hue-2
}
&.class {
color: @syntax-color-attribute; // @hue-6
}
}
&.delimiter {
color: @syntax-color-variable; // @hue-5-2
}
}
.constant.character.entity {
color: @syntax-color-class; // @hue-6-2
}
}
}But it might not always be easy to map the right variables. |
Options I can think of:
|
simurai
commented
May 18, 2016
For now I would suggest doing option Then when Atom @webdif Are you ok customizing it in your |
webdif
commented
May 18, 2016
I'm OK with this 👍 |
Before / after: