pages/_sass
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
..
font-awesome Update Font Awesome and Tabler Icons (#2884) 2024-12-11 15:19:38 -03:00
tabler-icons Update Font Awesome and Tabler Icons (#2884) 2024-12-11 15:19:38 -03:00
_base.scss Digital Bookshelf V2 (#2866) 2025-02-28 13:57:36 -03:00
_cv.scss Revert padding from #2617 for CV tables (#2920) 2024-12-29 21:50:59 -03:00
_distill.scss Fix: Improve footnote and citation colors in Distill posts (#3172) 2025-05-23 06:42:09 -07:00
_layout.scss format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
_tabs.scss Added support for jekyll-tabs (#2380) 2024-05-02 14:34:48 -03:00
_themes.scss Fix scrollbar color (#3058) 2025-03-11 11:42:08 -03:00
_typograms.scss Added support for Google Typograms (#2379) 2024-04-30 11:26:56 -03:00
_variables.scss Updated dependencies (#2715) 2024-09-24 15:57:59 -03:00