[6.x]: Checkmark in an enabled lightswitch looks slightly up and to the left of center (minor, cosmetic)
I maintainer di solito rispondono entro 1 giorno
@brianjhanson ci sta già lavorando.
Dal 26/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
What happened?
Description
Very minor cosmetic issue. The checkmark inside the thumb of an enabled lightswitch is centered by its bounding box. A check carries its visual weight in the long upper-right stroke, so it looks about half a pixel too far up and to the left.
Spotting this "flaw" is borderline OCD on my part, but, as the saying goes, "once you see it..."
Steps to reproduce
- Open any screen with a lightswitch, e.g. an entry edit page.
- Turn a lightswitch on.
- Look closely at the checkmark in the thumb. It is easiest to see zoomed in, on the small and default sizes.
Expected behavior
The checkmark looks centered in the thumb.
Actual behavior
The mark sits at the geometric center of the thumb, but looks slightly high and to the left.
Before / after screenshots:
Suggested nudge
--_checkmark-offset in the checked :after rule of craft-switch-button centers the mark's bounding box:
(var(--c-switch-thumb-height) - var(--_checkmark-size)) / 2 - 1px
Adding a small optical correction to that value fixes it by eye:
(var(--c-switch-thumb-height) - var(--_checkmark-size)) / 2 - 1px + 0.04em
Both inset-block-start and inset-inline-start read the same property, so the mark moves right and down together, and RTL follows inset-inline-start with no extra rule.
0.04em is about 0.55px at 14px text. I used em because a share of the mark's size gave small switches a sub-pixel shift that was invisible. The optical error comes from the shape of the check, so it is about the same on both switch sizes.
Version: craftcms/cms 6.x-dev @ 16a41b5e99, Chrome. Checked on the small and default switch sizes. Not checked in RTL or in Firefox/Safari.
Craft CMS version
6.x-dev @ 16a41b5e99
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
- Lingua principale
- PHP
- Stelle
- 3.6k
- Fork
- 710
- Merge medio
- 12h 19m
- PR unite (30g)
- 293
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di craftcms/cms
-
[5.x]: Moving an asset with “Replace it” throws TypeError: volumeUid must be of type string, null givenForse già presa @i-just l’ha presa 1 giorno fa. Apertabug repo:cms
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
craftcms/cms#20128 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
bug repo:cms
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
craftcms/cms#20151 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug repo:cms
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
craftcms/cms#20150 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug repo:cms
Difficoltà 3/5 1-2 giorni Idoneità per principianti 57/100
craftcms/cms#20143 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug repo:cms
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
craftcms/cms#20142 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di craftcms/cms
Issue simili
-
sync-en
Difficoltà 1/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
sync-en
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
bug-report bug-report-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Codeinwp/wp-menu-icons#354 ·
-
🔍 Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
coollabsio/coolify#12373 ·
I maintainer di solito rispondono entro 1 giorno
-
False RedundantFlag for FILTER_FLAG_GLOBAL_RANGE on PHP 8.5 (hardcoded flag value is outdated)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vimeo/psalm#12587 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno