executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
409 stars 196 forks source link

bullets inside table remain dark with both light/dark background #826

Open eudoxos opened 3 months ago

eudoxos commented 3 months ago

Describe the bug

context I put bulleted list inside list-table (same behavior for numbered list).

.. list-table::

   * - what color are the bullets?

       - item 1
       - item 2
       - item 3

expectation Bullets and numbers follow the text color.

bug Bullets in itemized list (and number in enumeration) stay dark when switching to dark mode:

image

image

problem This is a problem for readability and visual consistency.

The offending lines seem to be in _tables.scss:

.table {
  /* ... */
   // Target th & td
  // We need the child combinator to prevent styles leaking to nested tables which doesn't have a `.table` class.
  // We use the universal selectors here to simplify the selector (else we would need 6 different selectors).
  // Another advantage is that this generates less code and makes the selector less specific making it easier to override.
  // stylelint-disable-next-line selector-max-universal
  > :not(caption) > * > * {
    padding: $table-cell-padding-y $table-cell-padding-x;
    // Following the precept of cascades: https://codepen.io/miriamsuzanne/full/vYNgodb
    color: var(--#{$prefix}table-color-state, var(--#{$prefix}table-color-type, var(--#{$prefix}table-color)));
    background-color: var(--#{$prefix}table-bg);
    border-bottom-width: $table-border-width;
    box-shadow: inset 0 0 0 9999px var(--#{$prefix}table-bg-state, var(--#{$prefix}table-bg-type, var(--#{$prefix}table-accent-bg)));
  }

Reproduce the bug

conf.py:

project = 'test'
html_theme = 'sphinx_book_theme'

index.rst:

Bullets inside table
=====================

.. list-table::

   * - what color are the bullets?

       - item 1
       - item 2
       - item 3
$ sphinx-build . _build

List your environment

Jupyter Book      : 1.0.0
External ToC      : 1.0.1
MyST-Parser       : 2.0.0
MyST-NB           : 1.0.0
Sphinx Book Theme : 1.1.0
Jupyter-Cache     : 0.6.1
NbClient          : 0.5.13
welcome[bot] commented 3 months ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada: