Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eudoxos opened this issue Mar 14, 2024 · 1 comment
Open

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

eudoxos opened this issue Mar 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@eudoxos
Copy link

eudoxos commented Mar 14, 2024

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
@eudoxos eudoxos added the bug Something isn't working label Mar 14, 2024
Copy link

welcome bot commented Mar 14, 2024

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

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! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant