Explain why col backgrounds can be hidden by cell backgrounds - #44980
Open
quepasaquepasa wants to merge 1 commit into
Open
Explain why col backgrounds can be hidden by cell backgrounds#44980quepasaquepasa wants to merge 1 commit into
quepasaquepasa wants to merge 1 commit into
Conversation
Josh-Cena
requested review from
chrisdavidmills
and removed request for
dipikabh
August 12, 2026 23:51
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.
Fixes #44816
The reporter followed the article's own instructions — copy
blank-template.html+minimal-table.css, then try the<colgroup>/<col>shading — and the column colors never appeared.That's expected once you know the painting order: per CSS tables, backgrounds are painted table → column group → column → row group → row → cell, so a cell's own background covers the column's.
minimal-table.csssets one onthand on alternating rows:so every cell in the table already has a background and nothing from
<col>shows through.The live sample on the page is unaffected — its hidden CSS only sets
border/paddingontd, th, no background — which is why the example renders correctly on MDN while the reader's copy does not.Added a note explaining the painting order and pointing out which rules to remove from the stylesheet copy. I kept it to a note rather than changing
minimal-table.cssin the learning-area repo, since those backgrounds are deliberate elsewhere in the module.