fix(docs): paint the landing page's marks on its translations, and its buttons anywhere - #498
Merged
Conversation
The file-type marks in the diagram, the caret in the command beside them and the filled button's colours were all scoped to .rootpage-index, on the claim that the root-page class is the one the translations carry. It is not. Title::getRootText() only strips a subpage where the namespace has them turned on, and the main namespace does not, so index/ko is one whole title: its body carries page-index_ko and rootpage-index_ko, and .rootpage-index matches neither. Every one of those rules painted nothing on the Korean page. Module:Sequence says this in its own comment, and matches the sidebar's names as prefixes rather than asking a title for its root for exactly this reason. The claim contradicted a fact the repository had already written down. The marks and the caret lose the page scope rather than gain a better one. The wikven-home- classes are written by the landing page's templates and by nothing else, so the class is already the scope; the page selector on top of it only added a way to be wrong. The button's colours had a second problem: --wikven-cta-bg and its hover held the same values as --color-progressive and --color-progressive--hover, in both themes, so the token pair was the brand accent written out again. The fill now reads the accent, and only the foreground -- which cannot be read off it, white being 5.6:1 on the light theme's teal and 2.07:1 on night's -- stays a token of its own, declared beside the accent for the whole site rather than for one page. The page title stays clipped by a page selector, because the heading is outside the content and has no class of its own to hang on. It matches a substring of the body class, which catches page-index, rootpage-index and both of their _ko forms, and can catch nothing else: the class is case-sensitive, so only a page whose title begins "index" reaches it.
lens0021
marked this pull request as ready for review
August 21, 2026 02:42
…ring The built stylesheet on the deployed site carries an error block, which is how these were found: three declarations in Template:home/styles.css never reached a reader, in every language. border-color takes one to four values, so a var() in it is not a colour the sanitiser can check and the declaration is dropped. Both hover rules used it, so neither button's border followed its background on hover -- while the rule directly above, which writes the same colour through the border shorthand with a width and style stated, passes and always has. The hover rules now say it the same way. The focus ring is moved to MediaWiki:Common.css. :focus-visible is not a pseudo-class the sanitiser knows, so the rule was dropped whole: the ring was never drawn on any page, in any language. It had been put in a rule of its own so that the unknown selector could not take the hover rules down with it, and that much worked -- what it could not do was survive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The file-type marks are missing from the diagram on index/ko. Chasing that turned up two separate faults: one that hits the translations, and one that hits every language.
The translations: a page class that is not there
The marks, the caret, the button's night colours and the clipped page title were all scoped to
.rootpage-index, on a claim written into the stylesheet: "the body of index/ko is page-index_ko, and only rootpage-index catches both." The first half is right and the second is not.Title::getRootText()returns the whole title unless the namespace has subpages turned on, and the main namespace does not — this site sets noNamespacesWithSubpages, and MediaWiki's default omitsNS_MAIN. Soindex/kois one title, not a page with a subpage. The body element of the deployed page confirms it, class list quoted verbatim:.rootpage-indexmatches neitherpage-index_konorrootpage-index_ko.Module:Sequencestates the same fact in its own comment and matches the sidebar's names as prefixes rather than asking a title for its root, for exactly this reason — the claim contradicted something the repository had already written down. The same page also renders itsfirstHeadingunclipped, which is the fourth rule failing.The button was the one thing that still looked right, which is why this went unnoticed:
styles.cssreads the tokens with fallbacks, so light mode painted from the fallback whatever the tokens did. Night mode kept the brand teal at 3.2:1 instead of switching to the pale teal.The marks and the caret lose the page scope rather than gain a better one. The
wikven-home-classes are written by the landing page's templates and by nothing else, so the class is already the scope; the page selector on top of it bought nothing and added a way to be wrong.The button's colours turned out to be the accent written twice.
--wikven-cta-bgand--wikven-cta-bg--hoverheld byte-identical values to--color-progressiveand--color-progressive--hover, in both themes. The fill now reads the accent. Only the foreground stays a token — it cannot be read off the accent, white being 5.6:1 on the light theme's teal and 2.07:1 on night's — and it is declared beside the accent, site-wide, in the block that already defines the brand for all three theme states.The page title keeps a page selector, because the heading is outside the content and has no class of its own. It matches a substring of the body class, catching
page-index,rootpage-indexand both_koforms. It can catch nothing else: the class is case-sensitive, so only a page whose title beginsindexreaches it.Every language: three declarations the sanitiser was dropping
The built stylesheet on the deployed site carries an error block, which is how these were found:
border-colortakes one to four values, so avar()in it is not a colour the sanitiser can check and the declaration is dropped. Both hover rules used it, so neither button's border followed its background on hover — while the rule directly above, writing the same colour through thebordershorthand with a width and style stated, passes and always has. The hover rules now say it the same way.The focus ring moves to
MediaWiki:Common.css.:focus-visibleis not a pseudo-class the sanitiser knows, so the rule was dropped whole and the ring was never drawn, on any page, in any language. It had been put in a rule of its own so the unknown selector could not take the hover rules down with it; that much worked, but surviving was not something it could do there.Checked
biome checkclean at the versionbiome.jsonpins (2.5.8). No reference to the two removed tokens survives anywhere in the repository.Template:home/doccarries no translate units, so its rewrite makes no translation stale.The diagnosis is confirmed against the deployed HTML, quoted above. The fix is not verified in a browser — the site is unreachable from this environment and the Docker daemon is not running here, so the
previewdeployment is its first render. Worth a look at the preview before merging, in both themes.