tabs: fix borders for high dpi screens #550

This commit is contained in:
Sören Weber 2023-06-07 18:41:16 +02:00
parent 228ab819b9
commit 822a913e83
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -6,60 +6,90 @@
need a way to calculate them ourself */ need a way to calculate them ourself */
:root { :root {
--dpr: 1; --dpr: 1;
--bpx: 1;
} }
@media (min-resolution: 105dpi) { @media (min-resolution: 105dpi) {
:root { :root {
--dpr: 1.1; --dpr: 1.1;
--bpx: 1.1;
} }
} }
@media (min-resolution: 115dpi) { @media (min-resolution: 115dpi) {
:root { :root {
--dpr: 1.2; --dpr: 1.2;
--bpx: 1.2;
} }
} }
@media (min-resolution: 120dpi) { @media (min-resolution: 120dpi) {
:root { :root {
--dpr: 1.25; --dpr: 1.25;
--bpx: 1.25;
} }
} }
@media (min-resolution: 128dpi) { @media (min-resolution: 128dpi) {
:root { :root {
--dpr: 1.333; --dpr: 1.333;
--bpx: 1.333;
} }
} }
@media (min-resolution: 144dpi) { @media (min-resolution: 144dpi) {
:root { :root {
--dpr: 1.5; --dpr: 1.5;
--bpx: 1.5;
} }
} }
@media (min-resolution: 160dpi) { @media (min-resolution: 160dpi) {
:root { :root {
--dpr: 1.666; --dpr: 1.666;
--bpx: 1.666;
} }
} }
@media (min-resolution: 168dpi) { @media (min-resolution: 168dpi) {
:root { :root {
--dpr: 1.75; --dpr: 1.75;
--bpx: 1.75;
} }
} }
@media (min-resolution: 192dpi) { @media (min-resolution: 192dpi) {
:root { :root {
--dpr: 2; --dpr: 2;
--bpx: 1;
} }
} }
@media (min-resolution: 240dpi) { @media (min-resolution: 240dpi) {
:root { :root {
--dpr: 2.5; --dpr: 2.5;
--bpx: 1.25;
} }
} }
@media (min-resolution: 288dpi) { @media (min-resolution: 288dpi) {
:root { :root {
--dpr: 3; --dpr: 3;
--bpx: 1;
} }
} }
@media (min-resolution: 384dpi) { @media (min-resolution: 384dpi) {
:root { :root {
--dpr: 4; --dpr: 4;
--bpx: 1;
}
}
@media (min-resolution: 480dpi) {
:root {
--dpr: 5;
--bpx: 1.25;
}
}
@media (min-resolution: 576dpi) {
:root {
--dpr: 6;
--bpx: 1.5;
}
}
@media (min-resolution: 768dpi) {
:root {
--dpr: 8;
--bpx: 1;
} }
} }
@ -1909,7 +1939,7 @@ html[dir="rtl"] #sidebar ul.collapsible-menu > li > label > i.fa-chevron-right {
display: none; display: none;
/* if setting a border to 1px, a browser instead sets it to 1dppx which is not /* if setting a border to 1px, a browser instead sets it to 1dppx which is not
usable as a unit yet, so we have to calculate it ourself */ usable as a unit yet, so we have to calculate it ourself */
margin-top: calc( -1px / var(--dpr) ); margin-top: calc( -1px / var(--bpx) );
z-index: 10; z-index: 10;
} }