From df87a9f8eb6247aa32572de4ca33949219fb4edc Mon Sep 17 00:00:00 2001 From: samzabala Date: Thu, 4 May 2023 09:25:46 -0700 Subject: [PATCH 1/4] prep for bug fixes house keeping --- css/reset.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/css/reset.css b/css/reset.css index 42249d8..13cb355 100644 --- a/css/reset.css +++ b/css/reset.css @@ -7,7 +7,11 @@ 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 + ):not(svg *, symbol *)) { all: unset; display: revert; } From a7b5790dcb5160b9f9482380c6678a30fe5eeacf Mon Sep 17 00:00:00 2001 From: samzabala Date: Thu, 4 May 2023 09:27:18 -0700 Subject: [PATCH 2/4] add box sizing below all unset and or revert styles put at the very end so it doesnt get unintentionally undone by all the unset and revert styles --- css/reset.css | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/css/reset.css b/css/reset.css index 13cb355..ff29c01 100644 --- a/css/reset.css +++ b/css/reset.css @@ -16,13 +16,6 @@ display: revert; } -/* Preferred box-sizing value */ -*, -*::before, -*::after { - box-sizing: border-box; -} - /* Reapply the pointer cursor for anchor tags */ a, button { cursor: revert; @@ -100,4 +93,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 From 8577f0e94ce68d846827353cd647717e24fe26e9 Mon Sep 17 00:00:00 2001 From: samzabala Date: Thu, 4 May 2023 09:28:47 -0700 Subject: [PATCH 3/4] calm forms resets down form elements get reset too hardcore so you end up having to rebuild from scratch. this keeps the essential styles at least, but still easy to customize if needed --- css/reset.css | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/css/reset.css b/css/reset.css index ff29c01..309d7cb 100644 --- a/css/reset.css +++ b/css/reset.css @@ -10,12 +10,21 @@ *:where(:not( html, iframe, canvas, - img, svg, video, audio + img, svg, video, audio, + input, textarea, select, button ):not(svg *, symbol *)) { all: unset; display: revert; } +/* Reset form elements while keeping essential ui styles */ +:where(input, textarea, select, button, option, optgroup ) { + all: revert; + margin: unset; + font: unset; + appearance: auto; +} + /* Reapply the pointer cursor for anchor tags */ a, button { cursor: revert; From f9a8e93657d440fe44cb1f134cc916c75da7aa02 Mon Sep 17 00:00:00 2001 From: samzabala Date: Thu, 4 May 2023 09:30:06 -0700 Subject: [PATCH 4/4] calm the tables resets down allows support for html appearance attribute features available for tables while resetting styles nicely --- css/reset.css | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/css/reset.css b/css/reset.css index 309d7cb..f08ebeb 100644 --- a/css/reset.css +++ b/css/reset.css @@ -11,7 +11,8 @@ html, iframe, canvas, img, svg, video, audio, - input, textarea, select, button + input, textarea, select, button, + table, caption, tbody, tfoot, thead, tr, th, td ):not(svg *, symbol *)) { all: unset; display: revert; @@ -25,6 +26,16 @@ 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 */ a, button { cursor: revert; @@ -41,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;