From 9107ae3a102ee2e3f57dd2d4d4ea1971f2bd8d14 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Mon, 12 Dec 2022 15:00:18 +0100 Subject: [PATCH] Share some properties between all input elements Some properties, like 'font', 'appearance', and 'color' are shared between all our input elements. Let's reflect that in our rules. --- app/styles/input.css | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/app/styles/input.css b/app/styles/input.css index 5985b175..faac8747 100644 --- a/app/styles/input.css +++ b/app/styles/input.css @@ -8,22 +8,7 @@ input, input::file-selector-button, button, select, textarea { /* Respect standard font settings */ font: inherit; -} -input:not([type]), -input[type=date], -input[type=datetime-local], -input[type=email], -input[type=month], -input[type=number], -input[type=password], -input[type=search], -input[type=tel], -input[type=text], -input[type=time], -input[type=url], -input[type=week], -textarea { /* Disable default rendering */ appearance: none; background: none; @@ -43,20 +28,11 @@ input[type=submit], input::file-selector-button, button, select { - /* Disable default rendering */ - appearance: none; - background: none; - - border: 1px solid rgb(192, 192, 192); border-bottom-width: 2px; - border-radius: 5px; - color: black; - background-image: linear-gradient(to top, rgb(255, 255, 255), rgb(240, 240, 240)); /* This avoids it jumping around when :active */ vertical-align: middle; - padding: 5px; padding-left: 20px; padding-right: 20px; } @@ -93,8 +69,8 @@ option { input[type=checkbox] { position: relative; - appearance: none; background-color: white; + background-image: unset; border: 1px solid dimgrey; border-radius: 3px; width: 13px; @@ -133,9 +109,10 @@ input[type=radio]:checked { } input[type=range] { - appearance: none; + border: unset; border-radius: 3px; height: 20px; + padding: 0; background: transparent; } /* -webkit-slider.. & -moz-range.. cant be in selector lists: