mirror of
https://github.com/foreverwelearn/obsidian-superflat.git
synced 2026-07-22 04:20:24 +00:00
138 lines
3.5 KiB
SCSS
138 lines
3.5 KiB
SCSS
$superflat-fade-duration: 0.35s;
|
|
|
|
@keyframes superflat-appear {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
// 1. Obsidian variables ======================================================
|
|
body {
|
|
--border-width: 0;
|
|
|
|
--background-secondary: var(--background-primary);
|
|
--background-secondary-alt: var(--background-primary-alt);
|
|
|
|
--radius-s: 7px;
|
|
--radius-m: 9px;
|
|
--radius-l: 13px;
|
|
--radius-xl: 17px;
|
|
|
|
--divider-color: transparent;
|
|
--divider-color-hover: #ffffff12;
|
|
--divider-width: 5px;
|
|
|
|
--ribbon-background: var(--background-primary);
|
|
--ribbon-width: 4rem;
|
|
--ribbon-padding: 1rem;
|
|
|
|
--scrollbar-width: 5px;
|
|
--scrollbar-thumb-bg: #ffffff10;
|
|
|
|
--vault-profile-actions-display: none;
|
|
|
|
--titlebar-background: var(--background-primary);
|
|
--titlebar-background-focused: var(--background-primary);
|
|
--header-height: 3rem;
|
|
}
|
|
|
|
// 2. Completely remove =======================================================
|
|
.workspace-sidedock-vault-profile, // Vault buttons
|
|
.workspace-tab-header-new-tab, // New tab button
|
|
.workspace-tab-header-tab-list // Tab list button at the header right
|
|
{
|
|
visibility: collapse;
|
|
}
|
|
|
|
.workspace-tab-header-spacer,
|
|
.workspace-tab-header-inner::after, // Tabs separator
|
|
.search-input-clear-button, // X button at the right of prompt input
|
|
.sidebar-toggle-button, // Sidebar toggle button, both left and right
|
|
.empty-state-container, // The guide appear when no tab opened
|
|
.modal-close-button, // Close button in settings popup
|
|
.prompt-instructions // Instruction line at the bottom of prompt popup
|
|
{
|
|
display: none;
|
|
}
|
|
|
|
// Window control buttons
|
|
.titlebar-button-container.mod-right,
|
|
.workspace-tab-header-container::after {
|
|
display: none;
|
|
}
|
|
.workspace-tab-header-container {
|
|
// Fix right tab header auto append an offset padding (for window control buttons)
|
|
padding-inline: var(--size-4-2) !important;
|
|
}
|
|
|
|
// 3. Hide ====================================================================
|
|
.workspace-tab-header-container,
|
|
.workspace-ribbon, // Ribbon
|
|
.view-header, // Tab title bar
|
|
.status-bar, // Status bar
|
|
.nav-header // Sidebar header (list of buttons)
|
|
{
|
|
transition: opacity $superflat-fade-duration;
|
|
opacity: 0;
|
|
&:hover {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
// Hide close button until tab hovered
|
|
.workspace-tab-header-inner {
|
|
& > .workspace-tab-header-inner-close-button {
|
|
visibility: collapse;
|
|
}
|
|
|
|
&:hover > .workspace-tab-header-inner-close-button {
|
|
visibility: initial;
|
|
}
|
|
}
|
|
|
|
.workspace-tab-header-container:has(.sidebar-toggle-button.mod-right) {
|
|
opacity: 1;
|
|
}
|
|
|
|
// Active tab decorators
|
|
.workspace-tab-header.is-active::before,
|
|
.workspace-tab-header.is-active::after {
|
|
opacity: 0;
|
|
}
|
|
|
|
// 4. Alignment ===============================================================
|
|
.workspace-tab-header-container {
|
|
justify-content: center;
|
|
}
|
|
|
|
.prompt {
|
|
top: 15vh;
|
|
}
|
|
.prompt-input {
|
|
margin-top: var(--size-4-2);
|
|
}
|
|
.suggestion-item {
|
|
padding-block: var(--size-4-3);
|
|
}
|
|
|
|
.tree-item-self {
|
|
&,
|
|
&.nav-folder-title {
|
|
padding-block: var(--size-4-2);
|
|
}
|
|
}
|
|
|
|
// 5. Colors ==================================================================
|
|
// Active tab background
|
|
.workspace-tab-header.is-active > .workspace-tab-header-inner {
|
|
background-color: var(--color-base-30);
|
|
}
|
|
|
|
// 6. Animations ==============================================================
|
|
// Popup open
|
|
.modal-container {
|
|
animation: superflat-appear $superflat-fade-duration;
|
|
}
|