nebula-syntax-atom
nebula-syntax-atom copied to clipboard
Deprecated selector in `nebula-syntax/index.less`
In nebula-syntax/index.less
:
Starting from Atom v1.13.0, the contents of atom-text-editor
elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host
and ::shadow
pseudo-selectors, and prepend all your syntax selectors with syntax--
. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:
-
atom-text-editor.editor .linter-highlight.error .region, .linter-highlight.error .region
=>atom-text-editor.editor .linter-highlight.syntax--error .region, .linter-highlight.syntax--error .region
-
atom-text-editor.editor .linter-highlight.warning .region, .linter-highlight.warning .region
=>atom-text-editor.editor .linter-highlight.syntax--warning .region, .linter-highlight.syntax--warning .region
-
atom-text-editor.editor .linter-highlight.trace .region, .linter-highlight.trace .region, atom-text-editor.editor .linter-highlight.info .region, .linter-highlight.info .region
=>atom-text-editor.editor .linter-highlight.syntax--trace .region, .linter-highlight.syntax--trace .region, atom-text-editor.editor .linter-highlight.syntax--info .region, .linter-highlight.syntax--info .region
Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.
This was a regression bug due to styles added in #1. Has been fixed and released with 0.4.1.
What? These classes (syntax--error
etc.) don't even exist. On the newest version of Atom and linter
, the HTML for linter highlights looks like this:
<div class="highlights">
<div class="highlight linter-highlight error">
<div class="region" style="..."></div>
</div>
</div>
So with those changes the highlighting no longer works. Please revert!
@jgierer12 Hmm. So to make them work, Nebula Syntax will have a deprecated warning? What's the permanent solution to this?
Isn't it a problem with the Linter?
Update: I reverted the change back to:
&.error .region {
.highlight-underline(@background-color-error; transparent);
}
&.warning .region {
.highlight-underline(@background-color-warning);
}
&.trace .region, &.info .region {
.highlight-underline(@background-color-info);
}
and it still does NOT seem to work for me.
I believe it's because the Linter has not yet been updated. See this issue
Yeah but I don't even get why Atom reports it as deprecated.
atom-text-editor.editor .linter-highlight.error .region, .linter-highlight.error .region
No :host
or ::shadow
in there
Edit: OK, after some research I think the best solution would be to move the whole linter highlighting code to nebula-ui
instead, since Atom doesn't do the automatic prefixing with syntax--
in UI themes...
Really sorry to cause so much trouble with my PR 🙈
I could temporarily fix the issue by moving Linter to UI, but that's not a proper solution. I'd recommend bugging the Linter developer(s) because the fact that they're writing deprecated classes is their issue, not ours.
When they update their package with the syntax--*
selectors, I'll gladly reactivate the Linter support. But for now, it's not viable. Rolling it back with 0.5.2. Sorry, guys. You'll have to deal with the ugly dotted lines of the Linter until they get their act together.
I just hit the report issue button in Atom, and didn't think it would cause such a big discussion, haha! Sorry if this caused you any troubles. I gave the issue you filed a +1.
@goronfreeman No trouble at all! This is how stuff gets done. We appreciate your input.
@tjkohli Let me know if there's any way I can help out with the linter CSS fixes. I'd be happy to contribute. You got me to change my UI and syntax theme for the first time in over a year.
@goronfreeman Will definitely let you know. For now, I ask that if you like this theme and want it to keep floating, spread the word! The more people have it, the better it's going to get for everyone.