diff --git a/components/foot.php b/components/foot.php index bdddf1d..7703e35 100644 --- a/components/foot.php +++ b/components/foot.php @@ -1,64 +1,68 @@ diff --git a/css/base.css b/css/base.css index 441b33d..33e5256 100644 --- a/css/base.css +++ b/css/base.css @@ -23,16 +23,16 @@ p, small, label, input, -input:is(:-webkit-autofill, :autofill), +.autofilled, textarea, a, .modal_button, th, td, li { - font-family: 'Hack Nerd Font Mono', Hack, sans-serif !important; - padding: 0 !important; - margin: 0 !important; + font-family: 'Hack Nerd Font Mono', Hack, sans-serif; + padding: 0; + margin: 0; } h1 { @@ -358,26 +358,25 @@ i:hover { } input, -input:is(:-webkit-autofill, :autofill), +.autofilled, textarea { - border-radius: 12px !important; - width: 100% !important; - padding: 15px !important; - margin: 15px 15px 15px 0px !important; - box-sizing: border-box !important; - transition-duration: 500ms !important; - resize: none !important; + border-radius: 12px; + width: 100%; + padding: 15px; + margin: 15px 15px 15px 0px; + box-sizing: border-box; + transition-duration: 500ms; + resize: none; } input:focus, -input:is(:-webkit-autofill, :autofill):focus, +.autofilled, textarea:focus, input:hover, -input:is(:-webkit-autofill, :autofill):hover, textarea:hover { - border: 3px solid orange !important; - box-shadow: 0 2px 4px 0 rgba(255, 165, 0, 0.3), 0 3px 8px 0 rgba(255, 165, 0, 0.7) !important; - outline: none !important; + border: 3px solid orange; + box-shadow: 0 2px 4px 0 rgba(255, 165, 0, 0.3), 0 3px 8px 0 rgba(255, 165, 0, 0.7); + outline: none; } textarea { diff --git a/js/override_browser_styles.js b/js/override_browser_styles.js new file mode 100644 index 0000000..b321144 --- /dev/null +++ b/js/override_browser_styles.js @@ -0,0 +1,16 @@ +document.addEventListener('DOMContentLoaded', function() { + let inputs = document.querySelectorAll('input'); + + inputs.forEach(input => { + if (input.matches(':-webkit-autofill')) { + input.classList.add('autofilled'); + } + + function apply_hover(el) { + input.classList.add('autofilled'); + } + + input.addEventListener('hover', apply_hover); + input.addEventListener('focus', apply_hover); + }); +});