Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Dark mode background overrides text colors on checkboxes when using `class` dark mode variant

Aperta
#74 9 commenti 11 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
tailwindcss
Ambito
frontend

Direzione di ricerca

Start with the linked reproduction repository and reproduce the checkbox behavior using @tailwindcss/forms 0.3.3 and class-based dark mode. Inspect the generated styles for the checkbox's checked and unchecked states; done means the checked text color remains effective instead of being overridden by the background color.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What version of @tailwindcss/forms are you using?

0.3.3

What version of Node.js are you using?

14.15.4

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction repository

https://github.com/johnathanludwig/tailwind-forms-dark-mode

Describe your issue

In light mode you can style a checkbox by setting a background color for the base checkbox, and a text color for the checked version of the checkbox.

With dark mode via the class method, the background classes sets both the unchecked and checked color removing the ability to customize.

The styling works properly when using media for dark mode.

Reproduction Steps:
  1. Build tailwind using @tailwindcss/forms and enable dark mode using the class method.
  2. Add checkbox with a dark background color class and dark text color class.
  3. Enable wrap the checkbox in a dark class.
  4. Check the checkbox
Expected Results

The text color should be displayed when the checkbox is checked.

Actual Results

The background color is used for both checked and unchecked checkboxes.

Lingua principale
HTML
Stelle
4.6k
Fork
230
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tailwindlabs/tailwindcss-forms

Tutte le issue di tailwindlabs/tailwindcss-forms

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.