Bug 478145

Summary: API docs styling for (at least) deprecated list is broken in dark mode
Product: [Frameworks and Libraries] frameworks-kapidox Reporter: FeRD (Frank Dana) <ferdnyc>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In:

Description FeRD (Frank Dana) 2023-12-06 05:35:11 UTC
SUMMARY
See, for example, https://api.kde.org/frameworks/kio/html/deprecated.html#_deprecated000053

In dark mode, the list is unreadable, with the <dd> contents being rendered in white-on-white.

I **believe** this is due to a typo(?) in the CSS files for the documentation.

The doxygen.css file contains the following CSS, which governs that content and is not palette-aware:

.memdoc, dl.reflist dd {
        border-bottom: 1px solid #A8B8D9;      
        border-left: 1px solid #A8B8D9;      
        border-right: 1px solid #A8B8D9; 
        padding: 6px 10px 2px 10px;
        background-color: #FBFCFD;
        border-top-width: 0;
        background-image:url('nav_g.png');
        background-repeat:repeat-x;
        background-color: #FFFFFF;
        /* opera specific markup */
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
        /* firefox specific markup */
        -moz-border-radius-bottomleft: 4px;
        -moz-border-radius-bottomright: 4px;
        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
        /* webkit specific markup */
        -webkit-border-bottom-left-radius: 4px;
        -webkit-border-bottom-right-radius: 4px;
        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}

customdoxygen.css, the palette-aware enhancement which SHOULD override those colors, fails to in this case. The reason is because it contains no style rules for ".memdoc, dl.reflist dd". Instead it contains this similar css, but note the extra 'l' in "refllist":

.memdoc,
dl.refllist dd {
 background:var(--card);
 color:var(--on-card)
}

I don't know if "dl.refllist" — again, note the extra 'l' — is actually a valid CSS selector anywhere ELSE in the code (but I doubt it). Or, perhaps it's simply a typo of "dl.reflist" (probably). But, adding "dl.reflist" to that style rule, like so:

.memdoc,
dl.reflist dd,
dl.refllist dd {
 background:var(--card);
 color:var(--on-card)
}

...conservatively fixes the styling for the deprecation-list page(s) (and possibly elsewhere in the API docs), without any risk of breaking styling elsewhere.
Comment 1 FeRD (Frank Dana) 2023-12-06 14:24:15 UTC
Fixed in kapidox with the merge of https://invent.kde.org/frameworks/kapidox/-/merge_requests/33, though I don't know what's involved in getting https://api.kde.org/resources/css/customdoxygen.css updated for the live site.
Comment 2 FeRD (Frank Dana) 2023-12-13 15:16:26 UTC
Fixed with a rebuild+deploy of Generate_API_Documentation by Carl Schwan.