fix: keep CCXP section header rows readable - #6
Open
cjt-0627 wants to merge 1 commit into
Open
Conversation
CCXP styles its section header rows through the .class1 rule in its own stylesheet, which paints white text on a blue band. The main scope clears that band along with every other table background, but none of the white text rules can reach the row: they all match on a colour attribute or an inline style, and .class1 sets the colour from a stylesheet instead. The headings were left as white text on the white page. Restore a muted band for those rows so the headings stay visible, for example the 向度 groupings on the general education listing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Problem
On the general education curriculum listing
(INQUIRE/JH/6/6.2/6.2.F/JH62f002.php), the section headings that group
courses — 向度一 through 向度四 — are invisible with the extension enabled.
They render as white text on the white page. Disabling the extension brings
them back.
Cause
CCXP styles those rows through
.class1in its own stylesheet(
/style/JH/JH.css):The main scope clears every table background, so the blue band goes away. The
white text should then be caught by the white-text rules in
src/main/content.css, but every one of those selectors matches on acolorattribute or an inline
style—td[style*="color:#ffffff"],font[color="white"],[color="#fff"]. Here the colour comes from astylesheet rule, so nothing matches and the text stays white.
Measured on the affected cells: computed foreground
rgb(255, 255, 255)onrgb(255, 255, 255), contrast ratio 1.00.Fix
This update fixes readable contrast for affected rows by applying existing design tokens (muted background with strong text) to achieve a sharp 15:1 contrast ratio, rather than adding new color values that the elements cannot read. The original
#6699ffblue was deliberately left out because its high saturation conflicts with the extension's muted theme. Meanwhile,.class2through.class4remain readable due to their default dark-on-light setup, and.btnand.btn2sit on input elements that are completely untouched by the background suppression rules.Testing
bun run check: typecheck, lint and format pass. Tests are 62 passed, 1failed —
test/inquire/inquire-captcha.test.ts("uses the rendered inquirecaptcha image instead of re-fetching php output") already fails on a clean
checkout of
mainat 06daa52, unchanged by this PR.Demo
before


after