diff --git a/dist/preset.css b/dist/preset.css index 18277c7..eccae7e 100644 --- a/dist/preset.css +++ b/dist/preset.css @@ -1,4 +1,4 @@ -/*! Preset v1.0.2 | MIT License | https://github.com/Microflash/preset */ +/*! Preset v1.0.3 | MIT License | https://github.com/Microflash/preset */ * { margin: 0; line-height: calc(0.3rem + 2ex + 0.3rem); @@ -123,6 +123,10 @@ } } +:where(textarea:not([rows])) { + min-height: 10em; +} + :where(a[href], area, button, input:not([type=text]):not([type=email]):not([type=file]):not([type=number]):not([type=password]):not([type=""]):not([type=tel]):not([type=url]), label[for], select, summary, [role=button], [onclick], [tabindex]:not([tabindex*="-"])), :where(input[type=file])::file-selector-button { cursor: pointer; diff --git a/dist/preset.min.css b/dist/preset.min.css index eb1447d..08783c5 100644 --- a/dist/preset.min.css +++ b/dist/preset.min.css @@ -1,2 +1,2 @@ -/*! Preset v1.0.2 | MIT License | https://github.com/Microflash/preset */ -*{margin:0;line-height:calc(.3rem + 2ex + .3rem);line-height:var(--preset-line-height, calc(0.3rem + 2ex + 0.3rem));word-wrap:break-word;overflow-wrap:break-word}*,::after,::before{box-sizing:border-box}:where(html){height:100%;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}@media (prefers-reduced-motion:no-preference){.js-focus-within :where(html)[focus-within],:where(html)[focus-within].js-focus-within{scroll-behavior:smooth}:where(html):focus-within{scroll-behavior:smooth}}:where(body){min-height:100%;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-moz-tab-size:var(--preset-tab-size, 2);-o-tab-size:var(--preset-tab-size, 2);tab-size:var(--preset-tab-size, 2)}:where([hidden]){display:none}:where(:not(fieldset):not(progress):not(meter)){background-origin:border-box;background-repeat:no-repeat}:where(abbr[title]){text-decoration-line:underline;text-decoration-style:dotted;border-bottom:none;cursor:help}:where(h1,h2,h3,h4,h5,h6){text-wrap:balance}:where(p){text-wrap:pretty}:where(img,svg,canvas,audio,video,iframe,embed,object){display:block}:where(img,svg,video){max-width:100%;height:auto}:where(svg:not([fill]),svg[fill=none]){stroke:currentColor;stroke:var(--preset-stroke-color, currentColor);stroke-linecap:round;stroke-linejoin:round}:where(iframe){border:0}:where(summary){display:list-item}:where(dialog)::backdrop{-webkit-backdrop-filter:blur(25px);backdrop-filter:blur(25px);-webkit-backdrop-filter:var(--preset-dialog-backdrop-filter, blur(25px));backdrop-filter:var(--preset-dialog-backdrop-filter, blur(25px))}.js-has-pseudo :where([csstools-has-2w-38-31-30-1m-2w-2p-37-14-2s-2x-2p-30-33-2v-2j-33-34-2t-32-2l-15]:not(does-not-exist):not(does-not-exist)),:where(html:has(dialog[open])){overflow:hidden}:where(table){border-collapse:collapse;border-spacing:0;caption-side:bottom;caption-side:var(--preset-table-caption-side, bottom)}:where(input,button,textarea,select,optgroup),:where(input[type=file])::file-selector-button{color:inherit;font:inherit;font-size:inherit;letter-spacing:inherit;word-spacing:inherit}:where(textarea){resize:vertical}@supports (resize:block){:where(textarea){resize:block}}:where(a[href],area,button,input:not([type=text]):not([type=email]):not([type=file]):not([type=number]):not([type=password]):not([type=""]):not([type=tel]):not([type=url]),label[for],select,summary,[role=button],[onclick],[tabindex]:not([tabindex*="-"])),:where(input[type=file])::file-selector-button{cursor:pointer}:where(a[href],area,button,input,label[for],select,summary,textarea,[role=button],[onclick],[tabindex]:not([tabindex*="-"])){touch-action:manipulation;-webkit-tap-highlight-color:transparent}:where(button,button[type],input[type=button],input[type=submit],input[type=reset]),:where(input[type=file])::file-selector-button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(button,button[type],input[type=button],input[type=submit],input[type=reset])[disabled]{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){.js-focus-visible :where(.focus-visible),:where(.focus-visible).js-focus-visible,:where(:focus-visible){transition:outline-offset 145ms cubic-bezier(.25,0,.4,1)}.js-focus-visible :where(:not(:active).focus-visible),:where(:not(:active).focus-visible).js-focus-visible,:where(:not(:active):focus-visible){transition-duration:.25s}} \ No newline at end of file +/*! Preset v1.0.3 | MIT License | https://github.com/Microflash/preset */ +*{margin:0;line-height:calc(.3rem + 2ex + .3rem);line-height:var(--preset-line-height, calc(0.3rem + 2ex + 0.3rem));word-wrap:break-word;overflow-wrap:break-word}*,::after,::before{box-sizing:border-box}:where(html){height:100%;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}@media (prefers-reduced-motion:no-preference){.js-focus-within :where(html)[focus-within],:where(html)[focus-within].js-focus-within{scroll-behavior:smooth}:where(html):focus-within{scroll-behavior:smooth}}:where(body){min-height:100%;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-moz-tab-size:var(--preset-tab-size, 2);-o-tab-size:var(--preset-tab-size, 2);tab-size:var(--preset-tab-size, 2)}:where([hidden]){display:none}:where(:not(fieldset):not(progress):not(meter)){background-origin:border-box;background-repeat:no-repeat}:where(abbr[title]){text-decoration-line:underline;text-decoration-style:dotted;border-bottom:none;cursor:help}:where(h1,h2,h3,h4,h5,h6){text-wrap:balance}:where(p){text-wrap:pretty}:where(img,svg,canvas,audio,video,iframe,embed,object){display:block}:where(img,svg,video){max-width:100%;height:auto}:where(svg:not([fill]),svg[fill=none]){stroke:currentColor;stroke:var(--preset-stroke-color, currentColor);stroke-linecap:round;stroke-linejoin:round}:where(iframe){border:0}:where(summary){display:list-item}:where(dialog)::backdrop{-webkit-backdrop-filter:blur(25px);backdrop-filter:blur(25px);-webkit-backdrop-filter:var(--preset-dialog-backdrop-filter, blur(25px));backdrop-filter:var(--preset-dialog-backdrop-filter, blur(25px))}.js-has-pseudo :where([csstools-has-2w-38-31-30-1m-2w-2p-37-14-2s-2x-2p-30-33-2v-2j-33-34-2t-32-2l-15]:not(does-not-exist):not(does-not-exist)),:where(html:has(dialog[open])){overflow:hidden}:where(table){border-collapse:collapse;border-spacing:0;caption-side:bottom;caption-side:var(--preset-table-caption-side, bottom)}:where(input,button,textarea,select,optgroup),:where(input[type=file])::file-selector-button{color:inherit;font:inherit;font-size:inherit;letter-spacing:inherit;word-spacing:inherit}:where(textarea){resize:vertical}@supports (resize:block){:where(textarea){resize:block}}:where(textarea:not([rows])){min-height:10em}:where(a[href],area,button,input:not([type=text]):not([type=email]):not([type=file]):not([type=number]):not([type=password]):not([type=""]):not([type=tel]):not([type=url]),label[for],select,summary,[role=button],[onclick],[tabindex]:not([tabindex*="-"])),:where(input[type=file])::file-selector-button{cursor:pointer}:where(a[href],area,button,input,label[for],select,summary,textarea,[role=button],[onclick],[tabindex]:not([tabindex*="-"])){touch-action:manipulation;-webkit-tap-highlight-color:transparent}:where(button,button[type],input[type=button],input[type=submit],input[type=reset]),:where(input[type=file])::file-selector-button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(button,button[type],input[type=button],input[type=submit],input[type=reset])[disabled]{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){.js-focus-visible :where(.focus-visible),:where(.focus-visible).js-focus-visible,:where(:focus-visible){transition:outline-offset 145ms cubic-bezier(.25,0,.4,1)}.js-focus-visible :where(:not(:active).focus-visible),:where(:not(:active).focus-visible).js-focus-visible,:where(:not(:active):focus-visible){transition-duration:.25s}} \ No newline at end of file diff --git a/package.json b/package.json index 7b18b6b..a0ffd8e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@microflash/preset", - "version": "1.0.2", + "version": "1.0.3", "description": "A modern CSS preset", "keywords": [ "css", diff --git a/src/preset.scss b/src/preset.scss index 432e6b6..cfb1696 100644 --- a/src/preset.scss +++ b/src/preset.scss @@ -1,4 +1,4 @@ -/*! Preset v1.0.2 | MIT License | https://github.com/Microflash/preset */ +/*! Preset v1.0.3 | MIT License | https://github.com/Microflash/preset */ // 1. Remove default margin in all browsers // 2. Set `line-height` based on x-height of the font and `font-size` to automatically adjust for all `font-size` values @@ -137,6 +137,11 @@ } } +// Make sure textareas without a rows attribute are not tiny +:where(textarea:not([rows])) { + min-block-size: 10em; +} + // Add explicit cursor to indicate clickable elements :where(a[href], area, button, input:not([type="text"], [type="email"], [type="file"], [type="number"], [type="password"], [type=""], [type="tel"], [type="url"]), label[for], select, summary, [role="button"], [onclick], [tabindex]:not([tabindex*="-"])), :where(input[type="file"])::file-selector-button {