@conduction/docusaurus-preset 3.15.1 → 3.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/css/brand.css +22 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/docusaurus-preset",
3
- "version": "3.15.1",
3
+ "version": "3.15.3",
4
4
  "scripts": {
5
5
  "prepack": "node scripts/prepack-bundle-css.js"
6
6
  },
package/src/css/brand.css CHANGED
@@ -315,25 +315,30 @@ a:not(.navbar__link):not(.footer__link-item):not(.button):hover {
315
315
  Heading anchor hash glyphs.
316
316
 
317
317
  Docusaurus auto-generates a hidden `<a class="hash-link">#</a>`
318
- inside every h2-h6 so readers can copy a deep link. Default
319
- Infima styling renders the glyph in the primary brand colour
320
- (cobalt) which is fine for the visible state, but the affordance
321
- reads stronger when the hash itself lights up in KNVB orange
322
- the moment the cursor touches it.
323
-
324
- We render the glyph in cobalt-300 by default (visible-on-hover
325
- of the heading, via the theme's anchorWithStickyNavbar rule)
326
- and flip it to var(--c-orange-knvb) the moment the user hovers
327
- or focuses the hash itself.
318
+ inside every h2-h6 so readers can copy a deep link. The default
319
+ theme keeps the glyph invisible until the heading is hovered
320
+ (theme/MDXComponents/Heading), which is the affordance we want.
321
+
322
+ Branding: the glyph should always render in KNVB orange — never
323
+ cobalt, never underlined. Hover/focus on the hash itself keeps
324
+ the same orange (no second hover colour) so the visual stays
325
+ stable once the hash is on-screen.
328
326
  ============================================================ */
329
- .hash-link {
330
- color: var(--c-cobalt-300);
331
- transition: color 120ms ease;
332
- }
327
+ /* `!important` survives the cssnano `mergeRules` pass at build time —
328
+ without it the bare `.hash-link` selector gets dropped from the
329
+ comma list when cssnano merges nearby `.hash-link {opacity:0; ...}`
330
+ rules from Docusaurus, leaving only the pseudo-class variants
331
+ orange and the default-state hash inheriting cobalt from the
332
+ surrounding heading. */
333
+ .hash-link,
333
334
  .hash-link:hover,
334
- .hash-link:focus-visible {
335
- color: var(--c-orange-knvb);
336
- text-decoration: none;
335
+ .hash-link:focus,
336
+ .hash-link:focus-visible,
337
+ .hash-link:active,
338
+ .hash-link:visited {
339
+ color: var(--c-orange-knvb) !important;
340
+ text-decoration: none !important;
341
+ border-bottom: 0 !important;
337
342
  }
338
343
 
339
344
  /* ============================================================