Skip to content

fix: keep CCXP section header rows readable - #6

Open
cjt-0627 wants to merge 1 commit into
sago-cream:mainfrom
cjt-0627:fix/inquire-ge-category-display
Open

fix: keep CCXP section header rows readable#6
cjt-0627 wants to merge 1 commit into
sago-cream:mainfrom
cjt-0627:fix/inquire-ge-category-display

Conversation

@cjt-0627

@cjt-0627 cjt-0627 commented Aug 15, 2026

Copy link
Copy Markdown

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 .class1 in its own stylesheet
(/style/JH/JH.css):

.class1 { background-color: #6699ff; font-size: 10pt; color: #ffffff }

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 a color
attribute or an inline styletd[style*="color:#ffffff"],
font[color="white"], [color="#fff"]. Here the colour comes from a
stylesheet rule, so nothing matches and the text stays white.

Measured on the affected cells: computed foreground rgb(255, 255, 255) on
rgb(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 #6699ff blue was deliberately left out because its high saturation conflicts with the extension's muted theme. Meanwhile, .class2 through .class4 remain readable due to their default dark-on-light setup, and .btn and .btn2 sit 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, 1
failed — test/inquire/inquire-captcha.test.ts ("uses the rendered inquire
captcha image instead of re-fetching php output") already fails on a clean
checkout of main at 06daa52, unchanged by this PR.

Demo

before
Screenshot 2026-08-16 at 1 48 44 PM
after
Screenshot 2026-08-15 at 8 19 43 PM

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant