pages/assets/js
Maruan 71969cce7e
Fix: Improve footnote and citation colors in Distill posts (#3172)
Fixes #3168. (Implemented by [jules.google](https://jules.google).)

This commit resolves issues with footnote and citation styling in
Distill posts, particularly ensuring that pop-up contents and the
numbers themselves respect the site's light/dark theme via shadow DOM
style definitions.

Key changes:

1.  **`d-hover-box` Internal Styling (template.v2.js):**
    The `<style>` tag within the `d-hover-box` component's template
    in `assets/js/distillpub/template.v2.js` has been updated.
    Styles for `.panel` (the main pop-up container) now define:
    - `background-color: var(--global-card-bg-color);`
    - `border: 1px solid var(--global-divider-color);`
    - `color: var(--global-text-color);` (for default text)
    - Links within the panel are styled with
      `color: var(--global-theme-color);` and
      `color: var(--global-hover-color);` on hover.
    This ensures pop-up content is correctly themed from within its
    shadow DOM.

2.  **Footnote/Citation Number Color (template.v2.js):**
    The hardcoded `hsla(206, 90%, 20%, 0.7)` color previously used for
    footnote numbers (in `d-footnote` template) and citation numbers
    (in `d-cite` template) in `assets/js/distillpub/template.v2.js`
    has been replaced with `color: var(--global-theme-color);`.

3.  **Cleaned `_sass/_distill.scss`:**
    Removed the (now redundant) global CSS overrides for `d-hover-box`
    from `_sass/_distill.scss`, as these styles are now correctly
    encapsulated within the `d-hover-box` component itself.

These changes ensure that all aspects of Distill footnotes and
citations (numbers, pop-up background, pop-up text, and links within
pop-ups) are styled using theme-aware CSS variables, providing
correct visual appearance and readability in both light and dark modes.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-05-23 06:42:09 -07:00
..
distillpub Fix: Improve footnote and citation colors in Distill posts (#3172) 2025-05-23 06:42:09 -07:00
search Fixed bug when search result is inside description of external post (#2710) 2024-09-20 19:04:17 -03:00
bibsearch.js Fixed error in bibsearch.js 2024-07-13 14:05:20 -03:00
bootstrap-toc.min.js Fix prettier (#2062) 2024-01-10 11:21:58 -03:00
bootstrap.bundle.min.js Fix prettier (#2062) 2024-01-10 11:21:58 -03:00
bootstrap.bundle.min.js.map Added support to PurgeCSS (#1562) 2023-09-28 14:22:42 -03:00
chartjs-setup.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
common.js Support superscripts in bibtex author names (#2512) 2024-06-19 14:34:54 -03:00
copy_code.js Added support for plotly js (#3097) 2025-03-26 17:16:03 -03:00
diff2html-setup.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
echarts-setup.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
highlight-search-term.js feat: simple filtering / searching on bibliography (#2523) 2024-07-08 16:51:22 -03:00
jupyter_new_tab.js Add functionality to open external links in jupyter notebooks in new tab (#2233) 2024-02-27 12:25:16 -03:00
leaflet-setup.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
masonry.js format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
mathjax-setup.js Fix issue causing no color inversion when rendering equations (#2956) 2025-01-15 23:11:44 -03:00
mermaid-setup.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
newsletter.js Added missing newsletter components (#2913) 2024-12-26 16:49:45 -03:00
no_defer.js Remove bootstrap-table from archive tables (#2306) 2024-04-03 15:35:18 -03:00
plotly-setup.js Added support for plotly js (#3097) 2025-03-26 17:16:03 -03:00
progress-bar.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
pseudocode-setup.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
search-setup.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
shortcut-key.js Fix code blocks not changing to plots and others (#2497) 2024-06-11 14:06:38 -03:00
tabs.min.js Added support for jekyll-tabs (#2380) 2024-05-02 14:34:48 -03:00
theme.js Added support for plotly js (#3097) 2025-03-26 17:16:03 -03:00
tooltips-setup.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
typograms.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
vanilla-back-to-top.min.js Fix: Add back-to-top button (#2433) 2024-05-24 15:58:55 -03:00
vega-setup.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
venobox-setup.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
wechat.js Replaced jekyll-minifier that uses uglifier by terser (#2571) 2024-12-23 14:00:58 -03:00
zoom.js format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00