From e1a882f40a87b006bac6ae95b8c78ead2fa07869 Mon Sep 17 00:00:00 2001 From: ray Date: Wed, 20 May 2020 19:12:13 +0100 Subject: [PATCH] remove modern-css-reset replace with modified version --- package.json | 3 +- src/scss/_reset.scss | 71 ++++++++++++++++++++++++++++++++++++++++++++ src/scss/style.scss | 2 +- yarn.lock | 5 ---- 4 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 src/scss/_reset.scss diff --git a/package.json b/package.json index 9af08d8..4c1a036 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "@babel/polyfill": "^7.6.0", "gulp-file-include": "^2.2.2", "gulp-mustache": "^5.0.0", - "gulp-svgmin": "^2.2.0", - "modern-css-reset": "^1.1.0" + "gulp-svgmin": "^2.2.0" } } diff --git a/src/scss/_reset.scss b/src/scss/_reset.scss new file mode 100644 index 0000000..6f621ff --- /dev/null +++ b/src/scss/_reset.scss @@ -0,0 +1,71 @@ +// based on https://github.com/hankchizljaw/modern-css-reset +/* Box sizing rules */ +*, +*::before, +*::after { + box-sizing: border-box; +} + +/* Remove default padding */ +ul, +ol { + padding: 0; + list-style: none; +} + +/* Remove default margin */ +body, +h1, +h2, +h3, +h4, +p, +ul, +ol, +figure, +blockquote, +dl, +dd { + margin: 0; +} + +/* Set core root defaults */ +html { + scroll-behavior: smooth; +} + +/* Set core body defaults */ +body { + min-height: 100vh; + text-rendering: optimizeSpeed; + line-height: 1.5; +} + +/* Make images easier to work with */ +img { + max-width: 100%; + display: block; +} + +/* Inherit fonts for inputs and buttons */ +input, +button, +textarea, +select { + font: inherit; +} + +/* Blur images when they have no alt attribute */ +img:not([alt]) { + filter: blur(10px); +} + +/* Remove all animations and transitions for people that prefer not to see them */ +@media (prefers-reduced-motion: reduce) { + * { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } +} diff --git a/src/scss/style.scss b/src/scss/style.scss index b882296..19c1a94 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -1,5 +1,5 @@ @import "variables"; -@import "node_modules/modern-css-reset/src/reset"; +@import "reset"; @import "typography"; @import "base"; @import "layout"; diff --git a/yarn.lock b/yarn.lock index 006cbda..ce0509b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4838,11 +4838,6 @@ mixin-deep@^1.2.0: dependencies: minimist "^1.2.5" -modern-css-reset@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/modern-css-reset/-/modern-css-reset-1.1.0.tgz#91be70bcf6b2aefed0d16e8a439ef174a5f7459a" - integrity sha512-JOsOWxyDiZJWhvvx0LVtY9l4MT/1tlDevBkmPbGFEvxTLGVwCOJ/f0ZoT9moTdMsrqZeShJOX/bTaUfI4WfFQw== - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"