From fd18105e20df69f5973afdee473d534ef4332197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Sun, 28 Apr 2024 12:09:13 +0200 Subject: [PATCH] css: add reset, fixes box sizing issues --- web/index.html | 1 + web/main.css | 4 +++- web/reset.css | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 web/reset.css diff --git a/web/index.html b/web/index.html index 98501b9..019d47e 100644 --- a/web/index.html +++ b/web/index.html @@ -3,6 +3,7 @@ OCAMIX + diff --git a/web/main.css b/web/main.css index 78f6dfd..cc1f7b9 100644 --- a/web/main.css +++ b/web/main.css @@ -3,6 +3,7 @@ body { font-family: 'Bungee Spice', sans-serif; color: #ffc334; + isolation: isolate; } .on { @@ -84,6 +85,7 @@ body { background-color: #3c4146; overflow: hidden; } + .lwdui-lazy-table>.row_spacer { padding: 0; } @@ -113,4 +115,4 @@ body { audio { width: 100%; -} +} \ No newline at end of file diff --git a/web/reset.css b/web/reset.css new file mode 100644 index 0000000..81baf33 --- /dev/null +++ b/web/reset.css @@ -0,0 +1,61 @@ +/* CSS reset inspired by https://www.joshwcomeau.com/css/custom-css-reset / + +/* + 1. Use a more-intuitive box-sizing model. +*/ +*, +*::before, +*::after { + box-sizing: border-box; +} + +/* + 2. Remove default margin +*/ +* { + margin: 0; +} + +/* + 3. Add accessible line-height + 4. Improve text rendering +*/ +body { + line-height: 1.5; + -webkit-font-smoothing: antialiased; +} + +/* + 5. Improve media defaults +*/ +img, +picture, +video, +canvas, +svg { + display: block; + max-width: 100%; +} + +/* + 6. Remove built-in form typography styles +*/ +input, +button, +textarea, +select { + font: inherit; +} + +/* + 7. Avoid text overflows +*/ +p, +h1, +h2, +h3, +h4, +h5, +h6 { + overflow-wrap: break-word; +} \ No newline at end of file