This repository has been archived on 2024-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
Nexus-Polestar/astro/styles/index.scss
2023-07-23 20:45:17 -04:00

273 lines
No EOL
6 KiB
SCSS
Executable file

///////////////////////////////////////////
// Configuration for Theming ///
///////////////////////////////////////////
:root {
--TabActiveBackground: #8FECFB;
--TabActiveText: black;
}
///////////////////////////////////////////
// Theme: Auto | Light | Dark ///
///////////////////////////////////////////
// The "Auto" theme does appear to work
// on Linux, tested on GNOME 43 and KDE 2.27.
// The "Auto" option is disabled for Linux.
[theme="auto"] { // Auto
@media (prefers-color-scheme: light) {
--SidebarBackground: rgb(239 240 241 / 75%);
--ContentBackground: #EFF0F1;
--TextColor: black;
--CardBackground: white;
--WebviewControlsColor: white;
--WebViewControlBackground: #EFF0F1;
}
@media (prefers-color-scheme: dark) {
--SidebarBackground: rgba(35, 35, 35, 0.75);
--ContentBackground: #232323;
--TextColor: white;
--CardBackground: #282828;
--WebviewControlsColor: white;
--WebViewControlBackground: #232323;
}
}
[theme="light"] { // Light
--SidebarBackground: rgb(239 240 241 / 75%);
--ContentBackground: #EFF0F1;
--TextColor: black;
--CardBackground: white;
--WebviewControlsColor: white;
--WebViewControlBackground: #EFF0F1;
}
[theme="dark"] { // Dark
--SidebarBackground: rgba(35, 35, 35, 0.75);
--ContentBackground: #232323;
--TextColor: white;
--CardBackground: #282828;
--WebviewControlsColor: white;
--WebViewControlBackground: #232323;
}
///////////////////////////////////////////
* {outline: none}
body {
background: transparent;
color: var(--TextColor);
font-family: arial;
}
::-webkit-scrollbar {
background: #232323;
width: 12px;
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.1);
border-radius: 24px;
border: 4px #232323 solid;
}
// WebViews and iFrames
.fullview {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
border: none;
}
.with-controls {
top: 44px;
height: calc(100% - 44px);
}
// Sidebar
.sidebar {
position: fixed;
top: 0px;
left: 0px;
width: 240px;
height: 100%;
padding: 0px 20px;
display: grid;
grid-template-rows: 50px auto auto;
background: var(--SidebarBackground);
z-index: 5;
.drag-area {
position: absolute;
width: 200px;
height: 74px;
app-region: drag;
}
.sidebar-header {
display: flex;
align-items: center;
margin-top: 20px;
p {
pointer-events: none;
}
img {
width: 32px;
height: 32px;
margin-right: 16px;
pointer-events: none;
align-self: center;
}
.sidebar-header-left {
display: flex;
}
.sidebar-header-right {
margin-inline-start: auto;
display: grid;
grid-auto-flow: column;
button {
border-radius: 6px;
border: none;
fill: white;
color: white;
padding: 8px;
background: transparent;
font-size: 16px;
cursor: pointer;
margin-block-end: auto;
width: 32px;
height: 32px;
margin-left: 2px;
}
button:hover {
background: rgb(255 255 255 / 10%);
}
}
}
.sidebar-top {
padding-top: 24px;
}
.sidebar-bottom {
padding-bottom: 24px;
align-self: end;
}
li {
cursor: pointer;
color: var(--TextColor);
display: flex;
width: 100%;
border-radius: 6px;
margin-bottom: 6px;
align-items: center;
padding: 12px 0px;
p {margin: 0px}
svg {margin: 0px 16px}
}
li:hover {
background: rgb(255 255 255 / 10%);
}
li.active {
background: var(--TabActiveBackground);
color: var(--TabActiveText);
}
li#quick-command {
background: rgb(170 170 170 / 20%);
border: 1px rgb(170 170 170 / 20%) solid;
padding: 8px 0px;
box-sizing: border-box;
margin-bottom: 24px;
border-radius: 50px;
font-size: 14px;
}
}
// Content
.pages {
position: absolute;
top: 0px;
left: 280px;
width: calc(100% - 280px);
max-width: calc(100% - 280px);
height: 100%;
background: var(--ContentBackground);
.page {
display: none;
&.active {display: block}
background: var(--ContentBackground);
}
}
// Webview Navigation
/// Top Bar
.webview-navigation#TopBar {
background: var(--ContentBackground);
padding: 6px;
cursor: default;
button {
fill: var(--WebviewControlsColor);
background: var(--WebViewControlBackground);
border: none;
aspect-ratio: 1;
width: 32px;
border-radius: 6px;
cursor: pointer;
}
button:hover {
background: var(--accent);
}
}
/// Tab
.active .webview-navigation#Tab {
display: grid;
}
.active .loading-indicator {
display: grid;
opacity: 0;
transition: 0.3s opacity;
}
.loading-indicator {
position: absolute;
left: 20px;
background: var(--TabActiveBackground);
color: var(--TabActiveText);
border-radius: 50px;
display: none;
}
.webview-navigation#Tab {
display: none;
grid-auto-flow: column;
position: absolute;
right: 22px;
background: #51909a;
padding: 3px;
border-radius: 6px;
button {
aspect-ratio: 1;
height: 32px;
width: 32px;
color: var(--WebviewControlsColor);
fill: var(--WebviewControlsColor);
border: none;
border-radius: 6px;
background: transparent;
svg {
margin: 0px;
font-size: 12px;
}
}
button:hover {
background: #70aeb8;
}
}