-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fixes #208
base: dev
Are you sure you want to change the base?
Fixes #208
Conversation
removed the "[style=""]" because it would not restyle infoboxes with colors, but many times the text is unreadable (i think it's maybe better to make all of them gray for now?) (examples: https://en.wikipedia.org/wiki/Kefalonia_International_Airport https://en.wikipedia.org/wiki/Al_otro_lado_del_muro https://en.wikipedia.org/wiki/ASK/Ogre)
Rebased onto dev after merging #206 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many of these changes will need to be revisited after the merge of #206, which affected some of the same areas as this PR. Any changes that are still relevant would need to be moved to the most appropriate section of the stylesheet, instead of lumped in near the top.
As mentioned in the comments, tread carefully when making changes with a high potential for collateral damage, such as combining !important
with low specificity selectors, or changing the behavior of one.
I would also suggest reviewing the contributing guidelines for additional advice.
@@ -504,7 +507,7 @@ | |||
.ve-ui-mwSaveDialog-options, | |||
.mw-parser-output #siteContainer div:first-child, | |||
#mw-page-base { | |||
background-color: transparent; | |||
background-color: transparent !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer necessary after the background fix in #206.
Making the table of contents transparent is closer aligned with the original style though.
.tracklist-total-length span, | ||
.tracklist-total-length td { | ||
background-color: var(--gray-3) !important; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding new blocks for these rules, find one of the aggregated block of selectors implementing this rule and add the selectors there. This style is broken into sections based on the element being modified, and the colors being applied.
.wikitable > * > tr > th, | ||
.wikitable > * > tr > td:not(.break), | ||
.wikitable > * > tr > td:not(.break):not([style*="color"]):not([style*="background"]):not([bgcolor]), | ||
.wikitable th span[style*="background"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has a high potential for collateral damage, especially given the amount of custom wikitable colors and styles employed on Wikipedia. Until they have more specific fixes, this rule remains necessary.
I would be hesitant to accept this change without reviewing quite a few wikitables with color scales to ensure it has the desired effect. We man find this starts an endless game of whack-a-mole.
.infobox-data { | ||
background-color: var(--gray-2) !important; | ||
} | ||
.infobox-header { | ||
border-color: var(--gray-5) !important; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two rules no longer seem to be necessary after #206 was applied. If you find an area where it appears to be needed, we can revisit this one. Also try to avoid low specificity selectors using !important
, where possible.
@@ -3721,6 +3762,7 @@ | |||
table.wikitable, | |||
button.formBtn { | |||
border: 1px solid var(--gray-5) !important; | |||
background-color: var(--gray-2) !important; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is handling borders, so adding rules affecting backgrounds is not appropriate here (and will cause collateral damage). A more specific selector should be chosen for this rule as well.
No description provided.