Responsywność
responsive/viewport-meta
Every HTML document has <meta name="viewport" content="width=device-width, initial-scale=1">.
poważnastatycznefe-responsive
Dlaczego
Without it, mobile browsers lay the page out at a desktop width (usually 980 px) and shrink it, so text is tiny and media queries never match.
Poprawka
Put <meta name="viewport" content="width=device-width, initial-scale=1"> in the head of every document. Next.js and Nuxt add it for you; plain HTML, Astro layouts and SvelteKit's app.html need it written.
Przykłady
<!-- bad -->
<head><title>Shop</title></head>
<!-- good -->
<head><meta name="viewport" content="width=device-width, initial-scale=1"><title>Shop</title></head>Źródła
Fakty
- Identyfikator
responsive/viewport-meta- Waga
- poważna
- Sprawdzanie
- statyczne sprawdzane w kodzie źródłowym przez
audit - Dotyczy plików
htmlastro- Ten sam problem w
- Lighthouse
viewport-insight - Uczy jej skill
fe-responsiveResponsive design- Od wersji
- 0.1.0
Przeczytaj w terminalu
npx github:dawidolko/frontend-skills explain responsive/viewport-meta