Conversation
Previous `@layer` fix caused a regression The root problem I was trying to work around was that there's no way to clear rules that are set in the global list style sheet. You can override them with more specific css rules, but you can't remove them so that other global css rules (such as those for setting file icon colors) work properly Instead of making the default styles apply to every list, it seems like they should only apply the lists the don't have their own styling. I've change it so that you now have to use `default-styled-list` if you want the default styles to apply This seems to work but there are a ton of places where we use lists. Open to other ideas too
roblourens
left a comment
There was a problem hiding this comment.
Got this old issue- #197574
It looks like we always apply the default styles to the individual list's style controller-
so maybe the global one is totally redundant?| this.updateStyles(options.overrideStyles); | ||
| } | ||
|
|
||
| this.getHTMLElement().classList.toggle('default-styled-list', !options.overrideStyles); |
There was a problem hiding this comment.
But if I only set one color in overrideStyles, then do I lose all the default colors?
|
Thanks @roblourens! Removing the global styles would be best and it seems to work fine in quick testing. I was worried about breaking some part of the UI I hadn't tested tho, which is why I went with the current approach @aeschli @joaomoreno What do you think about trying to remove the global styles entirely? |
|
I previously talked to Martin on Slack and Joao via #197574 and I don't think anyone knows why we would still need the global styles. I think we should just look at the code carefully, delete it, and audit the styles on lists including ones that aren't WorkbenchList. I can spend a little time on this today |
I'm trying to write a CSS rule that allows codicon in chat to render as normal. My previous
@layerworkaround caused a regression in other listsThe root problem I was trying to work around was that there's no way to clear rules that are set in the global list style sheet. You can override them with more specific css rules, but you can't remove them so that other global css rules (such as those for setting file icon colors) work properly
After discussion it sounds like we can try removing the global list styles entirely as they may not be used