From bac47451645d86fd7645eb385675cde05f89c687 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 11 Nov 2022 16:06:28 +0200 Subject: [PATCH] remove repeated ":not" from the css --- files/assets/css/main.css | 26 +++++++++++++------------- files/assets/css/win98.css | 2 +- files/templates/comments.html | 2 +- files/templates/header.html | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/files/assets/css/main.css b/files/assets/css/main.css index 8f91d4ac8..a8f7cbdec 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -99,7 +99,7 @@ a:hover { color: var(--primary); text-decoration: underline; } -a:not([href]):not([role="button"]) +a:not([href], [role="button"]) { color: inherit; text-decoration: none; @@ -615,12 +615,12 @@ a.btn.disabled, fieldset:disabled a.btn { background-color: var(--primary); border-color: var(--primary); } -.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, .show > .btn-primary.dropdown-toggle { +.btn-primary:not(:disabled, .disabled):active, .btn-primary:not(:disabled, .disabled).active, .show > .btn-primary.dropdown-toggle { color: #fff; background-color: #0062cc; border-color: #005cbf; } -.btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-primary.dropdown-toggle:focus { +.btn-primary:not(:disabled, .disabled):active:focus, .btn-primary:not(:disabled, .disabled).active:focus, .show > .btn-primary.dropdown-toggle:focus { box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); } .btn-secondary { @@ -644,12 +644,12 @@ a.btn.disabled, fieldset:disabled a.btn { background-color: #6c757d; border-color: #6c757d; } -.btn-secondary:not(:disabled):not(.disabled):active, .btn-secondary:not(:disabled):not(.disabled).active, .show > .btn-secondary.dropdown-toggle { +.btn-secondary:not(:disabled, .disabled):active, .btn-secondary:not(:disabled, .disabled).active, .show > .btn-secondary.dropdown-toggle { color: #fff; background-color: #545b62; border-color: #4e555b; } -.btn-secondary:not(:disabled):not(.disabled):active:focus, .btn-secondary:not(:disabled):not(.disabled).active:focus, .show > .btn-secondary.dropdown-toggle:focus { +.btn-secondary:not(:disabled, .disabled):active:focus, .btn-secondary:not(:disabled, .disabled).active:focus, .show > .btn-secondary.dropdown-toggle:focus { box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5); } .btn-success { @@ -673,12 +673,12 @@ a.btn.disabled, fieldset:disabled a.btn { background-color: #38A169; border-color: #38A169; } -.btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active, .show > .btn-success.dropdown-toggle { +.btn-success:not(:disabled, .disabled):active, .btn-success:not(:disabled, .disabled).active, .show > .btn-success.dropdown-toggle { color: #fff; background-color: #1e7e34; border-color: #1c7430; } -.btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus, .show > .btn-success.dropdown-toggle:focus { +.btn-success:not(:disabled, .disabled):active:focus, .btn-success:not(:disabled, .disabled).active:focus, .show > .btn-success.dropdown-toggle:focus { box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5); } .btn-danger { @@ -702,12 +702,12 @@ a.btn.disabled, fieldset:disabled a.btn { background-color: #dc3545; border-color: #dc3545; } -.btn-danger:not(:disabled):not(.disabled):active, .btn-danger:not(:disabled):not(.disabled).active, .show > .btn-danger.dropdown-toggle { +.btn-danger:not(:disabled, .disabled):active, .btn-danger:not(:disabled, .disabled).active, .show > .btn-danger.dropdown-toggle { color: #fff; background-color: #bd2130; border-color: #b21f2d; } -.btn-danger:not(:disabled):not(.disabled):active:focus, .btn-danger:not(:disabled):not(.disabled).active:focus, .show > .btn-danger.dropdown-toggle:focus { +.btn-danger:not(:disabled, .disabled):active:focus, .btn-danger:not(:disabled, .disabled).active:focus, .show > .btn-danger.dropdown-toggle:focus { box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5); } .btn-link { @@ -952,7 +952,7 @@ input[type=submit].btn-follow, input[type=reset].btn-follow, input[type=button]. .input-group-text input[type=radio], .input-group-text input[type=checkbox] { margin-top: 0; } -.input-group > .input-group-append:not(:last-child) > .btn, .input-group > .input-group-append:not(:last-child) > .input-group-text, .input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle), .input-group > .input-group-append:last-child > .input-group-text:not(:last-child) { +.input-group > .input-group-append:not(:last-child) > .btn, .input-group > .input-group-append:not(:last-child) > .input-group-text, .input-group > .input-group-append:last-child > .btn:not(:last-child, .dropdown-toggle), .input-group > .input-group-append:last-child > .input-group-text:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; } @@ -1614,7 +1614,7 @@ a.badge-danger:focus, a.badge-danger.focus { color: #000; text-decoration: none; } -.close:not(:disabled):not(.disabled):hover, .close:not(:disabled):not(.disabled):focus { +.close:not(:disabled, .disabled):hover, .close:not(:disabled, .disabled):focus { opacity: 0.75; } button.close { @@ -4704,7 +4704,7 @@ textarea { } } .in-comment-image, .img, img[alt^="![]("], -.preview img:not(img[src*="/uid/"]):not(img[src*="/pp/"]):not(img[src$="/pic"]):not(img[src="/i/hand.webp"]):not(img[src*="/e/"]) { +.preview img:not(img[src*="/uid/"], img[src*="/pp/"], img[src$="/pic"], img[src="/i/hand.webp"], img[src*="/e/"]) { max-height: 150px !important; max-width: 100% !important; border-radius: 0.2rem !important; @@ -4809,7 +4809,7 @@ input[type=radio] ~ .custom-control-label::before { .emoji-modal { max-width: 80% !important } -.emj, .emoji, strong a img, img[alt^=":"]:not(img[b]):not(img[alt*="#"]) { +.emj, .emoji, strong a img, img[alt^=":"]:not(img[b], img[alt*="#"]) { height: 40px !important; width: 40px !important; } diff --git a/files/assets/css/win98.css b/files/assets/css/win98.css index af4dd5646..963a7a85b 100644 --- a/files/assets/css/win98.css +++ b/files/assets/css/win98.css @@ -43,7 +43,7 @@ color: var(--white) !important; } -.nav-link, .btn:not(.caction):not(.btn-primary), .btn-secondary, .col.px-0.pl-2.btn.btn-dead.my-0.mx-2 { +.nav-link, .btn:not(.caction, .btn-primary), .btn-secondary, .col.px-0.pl-2.btn.btn-dead.my-0.mx-2 { border: 2px outset white !important; border-bottom: 2px solid #a7a5a1 !important; border-right: 2px solid #a7a5a1 !important; diff --git a/files/templates/comments.html b/files/templates/comments.html index 8f9e64431..b92c9c9bb 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -911,7 +911,7 @@ const base64Mark = btoa(markTemplate("{{v.id}}")); var style = document.createElement('style'); - style.innerHTML = `.actual-post:not(.deleted):not(.banned),.comment-section>.comment{background-image:url("data:image/svg+xml;base64,${base64Mark}")}`; + style.innerHTML = `.actual-post:not(.deleted, .banned),.comment-section>.comment{background-image:url("data:image/svg+xml;base64,${base64Mark}")}`; document.getElementsByTagName('head')[0].appendChild(style); } } diff --git a/files/templates/header.html b/files/templates/header.html index b26e55970..d6c5c9160 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -379,7 +379,7 @@ {% if v and v.poor -%}