diff --git a/css/reset.css b/css/reset.css index 42249d8..f08ebeb 100644 --- a/css/reset.css +++ b/css/reset.css @@ -7,16 +7,33 @@ Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property - The "symbol *" part is to solve Firefox SVG sprite bug */ -*:where(:not(html, iframe, canvas, img, svg, video, audio):not(svg *, symbol *)) { +*:where(:not( + html, + iframe, canvas, + img, svg, video, audio, + input, textarea, select, button, + table, caption, tbody, tfoot, thead, tr, th, td + ):not(svg *, symbol *)) { all: unset; display: revert; } -/* Preferred box-sizing value */ -*, -*::before, -*::after { - box-sizing: border-box; +/* Reset form elements while keeping essential ui styles */ +:where(input, textarea, select, button, option, optgroup ) { + all: revert; + margin: unset; + font: unset; + appearance: auto; +} + +/* resets table styles nicely so html attribute features are still preserved */ +:where(table, caption, tbody, tfoot, thead, tr, th, td) { + margin: unset; + padding: unset; + border:unset; + background: unset; + border-collapse: collapse; + border-spacing: 0; } /* Reapply the pointer cursor for anchor tags */ @@ -35,11 +52,6 @@ img { max-block-size: 100%; } -/* removes spacing between cells in tables */ -table { - border-collapse: collapse; -} - /* Safari - solving issue when using user-select:none on the text input doesn't working */ input, textarea { -webkit-user-select: auto; @@ -96,4 +108,13 @@ meter { /* Revert Modal native behavior */ :where(dialog:modal) { all: revert; +} + + + +/* Preferred box-sizing value */ +*, +*::before, +*::after { + box-sizing: border-box; } \ No newline at end of file