diff --git a/dist/reset.css b/dist/reset.css index 9dde13c..f3d489c 100644 --- a/dist/reset.css +++ b/dist/reset.css @@ -26,7 +26,7 @@ ol[role="list"] { } /* Set core root defaults */ -html { +html:focus-within { scroll-behavior: smooth; } @@ -59,6 +59,9 @@ select { /* Remove all animations and transitions for people that prefer not to see them */ @media (prefers-reduced-motion: reduce) { + html:focus-within { + scroll-behavior: auto; + } *, *::before, *::after { diff --git a/dist/reset.min.css b/dist/reset.min.css index d65626c..de3be44 100644 --- a/dist/reset.min.css +++ b/dist/reset.min.css @@ -1 +1 @@ -*,*::before,*::after{box-sizing:border-box}body,h1,h2,h3,h4,p,figure,blockquote,dl,dd{margin:0}ul[role="list"],ol[role="list"]{list-style:none}html{scroll-behavior:smooth}body{min-height:100vh;text-rendering:optimizeSpeed;line-height:1.5}a:not([class]){text-decoration-skip-ink:auto}img,picture{max-width:100%;display:block}input,button,textarea,select{font:inherit}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}} +*,*::before,*::after{box-sizing:border-box}body,h1,h2,h3,h4,p,figure,blockquote,dl,dd{margin:0}ul[role="list"],ol[role="list"]{list-style:none}html:focus-within{scroll-behavior:smooth}body{min-height:100vh;text-rendering:optimizeSpeed;line-height:1.5}a:not([class]){text-decoration-skip-ink:auto}img,picture{max-width:100%;display:block}input,button,textarea,select{font:inherit}@media(prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}} diff --git a/package-lock.json b/package-lock.json index 0344f92..89ccd2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "modern-css-reset", - "version": "1.0.4", + "version": "1.4.0", "lockfileVersion": 1, "requires": true, "dependencies": {