mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 14:26:41 +08:00
c937afc75e
A first step to adding automatic dark mode color scheme switching. Adds a new SCSS file at `color_definitions.scss` that serves to output all SCSS color variables as CSS custom properties. And replaces all SCSS color variables with the new CSS custom properties throughout the stylesheets. This is an alpha feature at this point, can only be enabled via console using the `default_dark_mode_color_scheme_id` site setting.
90 lines
1.8 KiB
SCSS
90 lines
1.8 KiB
SCSS
// --------------------------------------------------
|
|
// Footer nav bar (displayed in DiscourseHub app and PWAs)
|
|
// --------------------------------------------------
|
|
|
|
$footer-nav-height: 49px;
|
|
|
|
body.footer-nav-visible {
|
|
#main-outlet {
|
|
padding-bottom: $footer-nav-height + 15;
|
|
}
|
|
|
|
#topic-progress-wrapper,
|
|
#reply-control.draft {
|
|
bottom: $footer-nav-height;
|
|
}
|
|
|
|
#reply-control.draft {
|
|
margin-bottom: env(safe-area-inset-bottom);
|
|
padding-bottom: 0px;
|
|
}
|
|
}
|
|
|
|
.footer-nav {
|
|
background-color: rgba(var(--header_background-rgb), 0.9);
|
|
box-shadow: shadow("footer-nav");
|
|
height: $footer-nav-height;
|
|
position: fixed;
|
|
bottom: -$footer-nav-height;
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: z("footer-nav");
|
|
transition: all linear 0.1s;
|
|
|
|
.d-icon {
|
|
color: var(--header_primary-medium);
|
|
}
|
|
|
|
&.visible {
|
|
bottom: 0px;
|
|
}
|
|
|
|
.footer-nav-widget {
|
|
display: flex;
|
|
justify-content: "space-evenly";
|
|
@include unselectable;
|
|
button {
|
|
flex: 1;
|
|
margin: 4px;
|
|
border-radius: 2px;
|
|
padding: 14px 18px;
|
|
&:disabled {
|
|
opacity: 0.6;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@supports (padding: max(0px)) {
|
|
.footer-nav.visible {
|
|
padding-bottom: unquote("max(5px, env(safe-area-inset-bottom))");
|
|
}
|
|
}
|
|
|
|
@supports (-webkit-backdrop-filter: blur(10px)) {
|
|
body:not(.footer-nav-ipad) .footer-nav {
|
|
background-color: rgba(var(--header_background-rgb), 0.7);
|
|
-webkit-backdrop-filter: blur(20px);
|
|
}
|
|
}
|
|
|
|
body.footer-nav-ipad {
|
|
padding-top: $footer-nav-height;
|
|
.footer-nav {
|
|
bottom: auto;
|
|
top: 0px;
|
|
background-color: var(--header_background);
|
|
z-index: z("ipad-header-nav");
|
|
padding-bottom: 0; // resets safe-area-inset-bottom
|
|
}
|
|
|
|
#reply-control,
|
|
#reply-control.fullscreen {
|
|
z-index: z("ipad-header-nav") + 1;
|
|
}
|
|
|
|
&.docked .d-header {
|
|
margin-top: $footer-nav-height;
|
|
}
|
|
}
|