fix(frontend): keep the widget link color off the check-in badge
sidebar.css paints .widget a with --color-ink-2 (specificity 0,1,1), which out-specifies the .jb-* color group (0,1,0) the badge relies on for its white ink. The user-card widget carries the .widget class, so the check-in bookmark rendered dark-gray text on the orange gradient on widget pages. zibll sets no link color on zib-widget anchors at all. sidebar.css already restores .but colors for exactly this reason; extend that restoration to .img-badge so the badge keeps its own --this-color. Rebuild the homepage bundle and extend the badge contract test.
This commit is contained in:
1 parent
008e63524d
commit
6dc9265260
4 files changed
+23
-5
No files matched your search
@@ -64,6 +64,22 @@ test('the badge typography is pinned to the reference bootstrap body values', ()
|
||||
)
|
||||
})
|
||||
|
||||
test('the sidebar widget link color does not recolor the check-in badge', () => {
|
||||
// .widget a (sidebar.css, shipped in the homepage bundle) out-specifies the
|
||||
// .jb-* color group, so the badge would paint --color-ink-2 instead of the
|
||||
// white --this-color; the established .but restoration must cover img-badge.
|
||||
const sidebar = read('assets/css/frontend/sidebar.css')
|
||||
const start = sidebar.indexOf('.widget a.but')
|
||||
assert.notEqual(start, -1, 'missing the .widget a color restoration')
|
||||
const block = sidebar.slice(start, sidebar.indexOf('}', start))
|
||||
assert.match(block, /\.widget a\.but,/)
|
||||
assert.match(block, /\.widget a\.img-badge/)
|
||||
assert.match(block, /color:\s*var\(--this-color/)
|
||||
|
||||
const bundle = read('assets/css/build/homepage.min.css')
|
||||
assert.match(bundle, /\.widget a\.but,\.widget a\.img-badge\{color:var\(--this-color, #fff\)\}/)
|
||||
})
|
||||
|
||||
test('the user-card check-in badge renders without the dead is-done class and bare span', () => {
|
||||
const userbox = read('inc/helpers/aksrt-header-userbox.php')
|
||||
const fnStart = userbox.indexOf('function aksrt_header_user_checkin_btn')
|
||||
|
||||
Reference in new issue
Block a user