[6.x]: Checkmark in an enabled lightswitch looks slightly up and to the left of center (minor, cosmetic)
Los mantenedores suelen responder en 1 día
@brianjhanson ya está trabajando en esto.
Desde el 26/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- PHP
- Estrellas
- 3.6k
- Forks
- 710
- Merge medio
- 11 h 15 min
- PR fusionados (30 d)
- 277
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 craftcms/cms
-
[5.x]: Closing an element selector modal while it loads makes it load every element in the backgroundPosiblemente ocupada @1070rik la tomó hace 1 día. Abiertorepo:cms
Dificultad 2/5 1-3 horas Aptitud para principiantes 1/100
craftcms/cms#20100 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[6.x]: A long link in a card's body overflows the text column and runs under the thumbnailPosiblemente ocupada @brianjhanson la tomó hace 1 día. Abiertobug repo:cms
craftcms/cms#20098 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
bug repo:cms
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
craftcms/cms#20097 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[5.x]: Passkeys registered with webauthn-lib v4 still fail with an uncaught InvalidUserHandleException (HTTP 500) after the #19530 fixPosiblemente ocupada @i-just la tomó hace 6 días. Abiertorepo:cms
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
craftcms/cms#20052 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[6.x]: Colored chips: link blue has low contrast on tinted backgroundsPosiblemente ocupada @brandonkelly la tomó hace 12 días. Abiertobug repo:cms
craftcms/cms#19984 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de craftcms/cms
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
backdrop-contrib/print#58 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
laravel/nova-issues#7008 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
FriendsOfFlarum/badges#20 ·
-
[Dashboard Redesign] Support and Documentation links should warn they'll be opened in another tabAbiertoModule: dashboard type: enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día