You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah that's a problem with how we have to match the inline styles on the elements. Wikipedia, and other MediaWikis by nature, have an overabundance of inline styles that make targeting and overriding them with CSS rather difficult. This is especially true when you're trying not to break other elements of the page, or other unrelated pages in the process. There are a lot of over or under specified selectors exacerbated by !important (and :not() as you suggest above).
Things have gotten better with the adoption of TemplateStyles for most common templates, but WikiTables with inline styles and other types of inline elements are still prevalent everywhere. This will continue to be the case as long as editors are manipulating styles with their edits.
There is also a lot of legacy baggage with how this user style is structured. The MediaWiki interface changes constantly, and older style overrides aren't always removed when that happens. An attempt to rewrite it from scratch and structuring it with the goal of minimizing these malformed selectors and reducing collateral damage would be a massive undertaking, given the complexity of MediaWiki in general, and Wikipedia in particular.
This is one of the reasons we decided that a style generator similar to GitHub-Dark would be the best path forward, though none of us have had much time lately to make progress on that front. If you're interested in tackling the specificity problem (or any other issues), feel free to submit a pull request.
There are rules such as
div[style*="background: #FFF"]
. That causes awkwardness for situations like when colour is#FFFAF0
That would make the colour swatch for 'floral white' [Citation] disappear due to the faulty match clause.
And with that specific example, I have noticed the exact same rule in different sets, which creates potentially conflicting rules.
The text was updated successfully, but these errors were encountered: