Minor UI/UX improvements

This commit is contained in:
sairaj mote 2022-02-17 18:13:13 +05:30
parent 67f6671444
commit 1297a87fe1
4 changed files with 28 additions and 11 deletions

View File

@ -1216,7 +1216,7 @@ customElements.define('sm-popup', class extends HTMLElement {
resumeScrolling() { resumeScrolling() {
const scrollY = document.body.style.top; const scrollY = document.body.style.top;
window.scrollTo(0, parseInt(scrollY || '0') * -1); window.scrollTo(0, parseInt(scrollY || '0') * -1);
document.body.style.overflow = 'auto'; document.body.style.overflow = '';
document.body.style.top = 'initial'; document.body.style.top = 'initial';
} }

View File

@ -15,6 +15,7 @@ body {
} }
body { body {
scrollbar-gutter: stable;
color: rgba(var(--text-color), 1); color: rgba(var(--text-color), 1);
background: rgba(var(--background-color), 1); background: rgba(var(--background-color), 1);
} }
@ -45,6 +46,9 @@ body[data-theme=dark] sm-popup::part(popup) {
body[data-theme=dark] ::-webkit-calendar-picker-indicator { body[data-theme=dark] ::-webkit-calendar-picker-indicator {
filter: invert(1); filter: invert(1);
} }
body[data-theme=dark] img {
filter: brightness(0.9);
}
p, p,
strong { strong {
@ -608,7 +612,6 @@ sm-copy {
grid-column: 1/-1; grid-column: 1/-1;
grid-template-columns: auto 1fr auto auto; grid-template-columns: auto 1fr auto auto;
background-color: rgba(var(--background-color), 1); background-color: rgba(var(--background-color), 1);
z-index: 2;
} }
#expanding_search { #expanding_search {
@ -963,7 +966,6 @@ theme-toggle {
#preview_popup h1, #preview_popup h1,
#article h1 { #article h1 {
font-weight: 700;
font-size: 1.7rem; font-size: 1.7rem;
line-height: 1.1; line-height: 1.1;
} }
@ -1226,6 +1228,7 @@ theme-toggle {
} }
#main_header { #main_header {
position: relative;
padding: 1rem 1.5rem; padding: 1rem 1.5rem;
} }
@ -1287,8 +1290,8 @@ theme-toggle {
flex-direction: column; flex-direction: column;
padding: 1.5rem; padding: 1.5rem;
width: 20rem; width: 20rem;
height: 100%; height: 100vh;
overflow-y: auto; overflow-y: overlay;
} }
#article_map_container { #article_map_container {
@ -1367,3 +1370,8 @@ button:not(.button--primary):hover {
filter: brightness(120%); filter: brightness(120%);
} }
} }
@supports (overflow: overlay) {
body {
overflow: overlay;
}
}

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -27,7 +27,7 @@ body {
scrollbar-width: thin; scrollbar-width: thin;
} }
scrollbar-gutter: stable;
color: rgba(var(--text-color), 1); color: rgba(var(--text-color), 1);
background: rgba(var(--background-color), 1); background: rgba(var(--background-color), 1);
} }
@ -48,6 +48,9 @@ body[data-theme="dark"] {
::-webkit-calendar-picker-indicator { ::-webkit-calendar-picker-indicator {
filter: invert(1); filter: invert(1);
} }
img {
filter: brightness(0.9);
}
} }
p, p,
@ -572,7 +575,6 @@ sm-copy {
grid-column: 1/-1; grid-column: 1/-1;
grid-template-columns: auto 1fr auto auto; grid-template-columns: auto 1fr auto auto;
background-color: rgba(var(--background-color), 1); background-color: rgba(var(--background-color), 1);
z-index: 2;
} }
#expanding_search { #expanding_search {
position: absolute; position: absolute;
@ -917,7 +919,7 @@ theme-toggle {
#preview_popup, #preview_popup,
#article { #article {
h1 { h1 {
font-weight: 700; // font-weight: 700;
font-size: 1.7rem; font-size: 1.7rem;
line-height: 1.1; line-height: 1.1;
} }
@ -1159,6 +1161,7 @@ theme-toggle {
display: none; display: none;
} }
#main_header { #main_header {
position: relative;
padding: 1rem 1.5rem; padding: 1rem 1.5rem;
} }
.logo { .logo {
@ -1215,8 +1218,8 @@ theme-toggle {
flex-direction: column; flex-direction: column;
padding: 1.5rem; padding: 1.5rem;
width: 20rem; width: 20rem;
height: 100%; height: 100vh;
overflow-y: auto; overflow-y: overlay;
} }
#article_map_container { #article_map_container {
margin-bottom: 3rem; margin-bottom: 3rem;
@ -1288,3 +1291,9 @@ theme-toggle {
} }
} }
} }
@supports (overflow: overlay) {
body {
overflow: overlay;
}
}