Update implementation

This commit is contained in:
Svilen Markov
2025-05-04 16:49:20 +01:00
parent a2d8410fec
commit c2286f9a22
17 changed files with 583 additions and 402 deletions
+12
View File
@@ -48,6 +48,17 @@
transition: transform .3s;
}
.mobile-navigation-actions > * {
padding-block: .9rem;
padding-inline: var(--content-bounds-padding);
cursor: pointer;
transition: background-color .3s;
}
.mobile-navigation-actions > *:hover, .mobile-navigation-actions > *:active {
background-color: var(--color-widget-background-highlight);
}
.mobile-navigation:has(.mobile-navigation-page-links-input:checked) .hamburger-icon {
--spacing: 7px;
color: var(--color-primary);
@@ -60,6 +71,7 @@
.mobile-navigation-page-links {
border-top: 1px solid var(--color-widget-content-border);
border-bottom: 1px solid var(--color-widget-content-border);
padding: 20px var(--content-bounds-padding);
display: flex;
align-items: center;
+53 -82
View File
@@ -1,25 +1,4 @@
.dark {
--scheme: ;
--bgh: 240;
--bgs: 8%;
--bgl: 9%;
--bghs: var(--bgh), var(--bgs);
--cm: 1;
--tsm: 1;
}
.light {
--scheme: 100% -;
--bgh: 240;
--bgs: 50%;
--bgl: 98%;
--bghs: var(--bgh), var(--bgs);
--cm: 1;
--tsm: 1;
--color-primary: hsl(43, 50%, 70%);
}
.light-scheme {
:root[data-scheme=light] {
--scheme: 100% -;
}
@@ -240,7 +219,7 @@ kbd:active {
max-width: 1100px;
}
.page-center-vertically .page {
.page.center-vertically {
display: flex;
justify-content: center;
flex-direction: column;
@@ -277,6 +256,8 @@ kbd:active {
}
.nav {
overflow-x: auto;
min-width: 0;
height: 100%;
gap: var(--header-items-gap);
}
@@ -315,82 +296,72 @@ kbd:active {
color: var(--color-text-highlight);
}
/*
### Theme Dropdown ###
*/
.theme-dropdown {
position: relative;
display: inline-block;
right: 0;
.theme-choices {
--presets-per-row: 2;
display: grid;
grid-template-columns: repeat(var(--presets-per-row), 1fr);
align-items: center;
gap: 1.35rem;
}
.dropdown-button {
padding: 10px 15px;
background: var(--color-widget-background);
border: 1px solid var(--color-widget-content-border);
border-radius: 4px;
cursor: pointer;
.theme-choices:has(> :nth-child(3)) {
--presets-per-row: 3;
}
.theme-preset {
background-color: var(--color);
display: flex;
align-items: center;
gap: 8px;
min-width: 150px;
transition: border-color .2s;
color: var(--color-text-highlight);
justify-content: center;
gap: 0.5rem;
height: 2rem;
padding-inline: 0.5rem;
border-radius: 0.3rem;
border: none;
cursor: pointer;
position: relative;
}
.dropdown-button:hover {
.theme-choices .theme-preset::before {
content: '';
position: absolute;
inset: -.4rem;
border-radius: .7rem;
border: 2px solid transparent;
transition: border-color .3s;
}
.theme-choices .theme-preset:hover::before {
border-color: var(--color-text-subdue);
}
.dropdown-content {
display: none;
position: absolute;
top: 100%;
left: 0;
background: var(--color-widget-content-border);
min-width: 150px;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
border-radius: 4px;
z-index: 1000;
.theme-choices .theme-preset.current::before {
border-color: var(--color-text-base);
}
.mobile-navigation-page-links .dropdown-content {
top: unset;
bottom: 38px;
.theme-preset-light {
gap: 0.3rem;
height: 1.8rem;
}
.dropdown-content.show {
display: block;
.theme-color {
background-color: var(--color);
width: 0.9rem;
height: 0.9rem;
border-radius: 0.2rem;
}
.theme-option {
padding: 10px 15px;
cursor: pointer;
transition: background-color 0.2s;
.theme-preset-light .theme-color {
width: 1rem;
height: 1rem;
border-radius: 0.3rem;
}
.theme-option:hover {
background-color: #f8f9fa;
.current-theme-preview {
opacity: 0.4;
transition: opacity .3s;
}
.separator {
height: 1px;
background-color: #dee2e6;
margin: 5px 0;
}
.arrow {
border: solid #666;
border-width: 0 2px 2px 0;
display: inline-block;
padding: 3px;
transform: rotate(45deg);
transition: transform 0.2s ease;
margin-left: auto;
position: relative;
top: -1px;
}
.dropdown-button.active .arrow {
transform: rotate(-135deg);
.theme-picker.popover-active .current-theme-preview, .theme-picker:hover {
opacity: 1;
}
+20 -1
View File
@@ -376,7 +376,7 @@ details[open] .summary::after {
gap: 0.5rem;
}
:root:not(.light-scheme) .flat-icon {
:root:not([data-scheme=light]) .flat-icon {
filter: invert(1);
}
@@ -459,6 +459,23 @@ details[open] .summary::after {
filter: none;
}
.hide-scrollbars {
scrollbar-width: none;
}
/* Hide on Safari and Chrome */
.hide-scrollbars::-webkit-scrollbar {
display: none;
}
.ui-icon {
width: 2.3rem;
height: 2.3rem;
display: block;
flex-shrink: 0;
}
.size-h1 { font-size: var(--font-size-h1); }
.size-h2 { font-size: var(--font-size-h2); }
.size-h3 { font-size: var(--font-size-h3); }
@@ -510,6 +527,7 @@ details[open] .summary::after {
.grow { flex-grow: 1; }
.flex-column { flex-direction: column; }
.items-center { align-items: center; }
.self-center { align-self: center; }
.items-start { align-items: start; }
.items-end { align-items: end; }
.gap-5 { gap: 0.5rem; }
@@ -549,6 +567,7 @@ details[open] .summary::after {
.padding-widget { padding: var(--widget-content-padding); }
.padding-block-widget { padding-block: var(--widget-content-vertical-padding); }
.padding-inline-widget { padding-inline: var(--widget-content-horizontal-padding); }
.pointer-events-none { pointer-events: none; }
.padding-block-5 { padding-block: 0.5rem; }
.scale-half { transform: scale(0.5); }
.list { --list-half-gap: 0rem; }