From 9656dbab74005a0814459037b4e79285586c0e27 Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Fri, 27 Dec 2024 18:54:49 +0100 Subject: better css --- scss/index.scss | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) (limited to 'scss') diff --git a/scss/index.scss b/scss/index.scss index 803793f..338920d 100644 --- a/scss/index.scss +++ b/scss/index.scss @@ -1,37 +1,17 @@ -body { - margin: 0; - background-color: grey; -} - -img { - position: absolute; - top: 0; - left: 0; -} +@mixin abs {position: absolute; top: 0; left: 0;} +@mixin rel {position: relative; top: 0; left: 0;} -.pixelated { - image-rendering: pixelated; -} +body { margin: 0; background-color: grey; } +#spawn { @include rel; width: 0; height: 0;} -.background { - width: 100%; - height: 100%; -} +img {@include abs;} +.pixelated { image-rendering: pixelated; } -#spawn { - position: relative; - top: 0; - left: 0; - width: 0; - height: 0; -} #screen { display: block; overflow: hidden; background-size: cover; - position: absolute; - top: 0; - left: 0; + @include abs; } -- cgit v1.2.3