Bootstrap table variant classes lose their fill in HTML
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- html, sass, scss
- Área
- frontend
Línea de trabajo
Empieza leyendo src/resources/formats/html/bootstrap/_bootstrap-rules.scss y los estilos de tabla de Bootstrap a los que hace referencia la issue. Comprueba cómo interactúa la regla background-color: unset con --bs-table-bg en las clases de variantes de tabla y fila. Se considera terminado cuando las celdas con variantes recuperen su relleno en los temas claros y oscuros, y la corrección para #7566 siga permitiendo que una tabla aplique estilos a sus propias celdas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
A Bootstrap variant class such as .table-primary or .table-danger no longer colours a table or a row in HTML.
The cells stay transparent, in the light theme and in the dark theme.
The cause is this rule in src/resources/formats/html/bootstrap/_bootstrap-rules.scss, added for #7566:
> :not(caption) > * > * {
background-color: unset;
color: unset;
}
Bootstrap paints the variant fill on the cells with background-color: var(--bs-table-bg), so unset removes it.
The ink of the variant still reaches the cells by inheritance, so the text keeps a colour that Bootstrap picked for a fill that is no longer there.
With a theme where that ink is close to the page colour, the text cannot be read.
Steps to reproduce
---
title: "Bootstrap table variants"
format:
html:
theme:
light: cosmo
dark: darkly
respect-user-color-scheme: true
---
```{=html}
<table class="table table-primary">
<thead><tr><th>Table</th><th>Class</th></tr></thead>
<tbody><tr><td>Whole table</td><td>table-primary</td></tr></tbody>
</table>
<table class="table">
<thead><tr><th>Row</th><th>Class</th></tr></thead>
<tbody>
<tr class="table-success"><td>One row</td><td>table-success</td></tr>
<tr class="table-danger"><td>One row</td><td>table-danger</td></tr>
<tr><td>Plain row</td><td>none</td></tr>
</tbody>
</table>
```
Actual behavior
Every cell has background-color: rgba(0, 0, 0, 0), in both colour schemes.
The variant rows look like the plain row.
| Light | Dark |
|---|---|
Expected behavior
The cells of a table or a row with a variant class have the variant fill, as in Bootstrap, while the fix for #7566 still lets a table style its own cells.
Your environment
- OS: macOS 27.2.
- Browser: Brave (Chromium).
Quarto check output
Quarto 99.9.9
[✓] Checking environment information...
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.107.1: OK
Deno version 2.9.8: OK
Typst version 0.15.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: 089ba530b3ed4ec156a355d41b6b7de2db3e44ea
- Lenguaje dominante
- JavaScript
- Estrellas
- 6.1k
- Forks
- 478
- Merge medio
- 17 h 53 min
- PR fusionados (30 d)
- 135
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quarto-dev/quarto-cli
-
accessibility bug embed
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
quarto-dev/quarto-cli#15306 ·
Los mantenedores suelen responder en 1 día
-
bootstrap bug themes
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quarto-dev/quarto-cli#15304 ·
Los mantenedores suelen responder en 1 día
-
accessibility bug code-blocks html themes
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/quarto-cli#15303 ·
Los mantenedores suelen responder en 1 día
-
accessibility brand bug dark-mode
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quarto-dev/quarto-cli#15301 ·
Los mantenedores suelen responder en 1 día
-
bug html
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/quarto-cli#15297 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/quarto-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
hugomrdias/playwright-test#753 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
KonstantinStarovoytov/kitden#21 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
guybedford/es-module-shims#556 ·
-
app ernst:4-klein
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
NewspeedyNL/PidLane#683 ·
Los mantenedores suelen responder en 1 día