-
Notifications
You must be signed in to change notification settings - Fork 39
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
popup_css
should override plugins inline css
#3650
Comments
I'm not entirely sure, but I think beeing inline CSS isn't the primary reason here. There must be a more general issue with the evaluation of CSS specifity, because once a certain CSS property is defined in a plugin, it seems that it cannot be overridden from the |
This is following standard CSS resolution rules where styles directly on the element have the highest precedence unless
|
I have to retract my conclusion from earlier because the repro instructions don't represent the text surrounding it. The following code still reproduces the behavior seen in the screenshot when it should not: view.show_popup('<style>#abc { color: yellow; background-color: green; }</style><div id="abc">Hello World!</div>') In fact, even adding |
Description
https://discord.com/channels/280102180189634562/280157083356233728/756245423290712147
When I tried to override the styling of LSP's popups (https:/sublimelsp/LSP/blob/master/popups.css) through the
popup_css
in the active color scheme, i couldn't, even if i made the selector more specific (e.gdiv.lsp_popup warnings
vs.lsp_popup .warnings
)What I understand is that ST is applying specificity matching correctly, in that inline styles have higher precedence over
popup_css
which is considered external css, but I think this is inconvenient because it prevents color schemes from styling popups.Steps to reproduce
view.show_popup('<div id="abc" style="color: yellow; background-color: green;">Hello World!</div>')
in the console(Note That there's another issue here, the default styling of the popup is lost when a
popup_css
is specified)Expected behavior
the
popup_css
styles are applied.Actual behavior
the inline styles are applied.
Environment
The text was updated successfully, but these errors were encountered: