Files
logseq/src/main/frontend/components/sidebar.css

400 lines
6.4 KiB
CSS

#app-container {
background-color: var(--ls-primary-background-color, #fff);
position: relative;
}
#root {
> div {
color: var(--ls-primary-text-color, #24292e);
font-size: var(--ls-page-text-size);
}
}
.is-electron.is-mac .cp__sidebar-left-layout {
}
#app-container {
flex: 0 0 100%;
}
#main-container {
position: relative;
}
#main-content {
&.is-left-sidebar-open {
padding-left: var(--ls-left-sidebar-width);
}
&-container {
@apply p-4 sm:px-8;
font-size: 1em;
}
}
#left-sidebar {
width: 240px;
height: 100%;
top: 0;
left: -240px;
position: absolute;
z-index: 11;
opacity: 0;
background-color: #002b36;
.enter {
opacity: 1;
left: 0;
}
}
#left-bar {
background-color: var(--ls-primary-background-color);
> .head-wrap {
background-color: var(--ls-search-background-color);
}
.close-panel-btn {
color: var(--ls-active-primary-color);
}
nav > a {
color: var(--ls-icon-color);
}
a {
color: var(--ls-primary-text-color);
}
}
.ls-mobile-left-sidebar {
position: relative;
z-index: -1;
&.is-left-sidebar-open {
z-index: var(--ls-z-index-level-3);
}
}
.left-sidebar-inner {
position: relative;
height: 100%;
z-index: 1;
overflow: auto;
> .wrap {
padding-top: 60px;
}
.dropdown-wrapper {
min-width: 180px;
}
a.item {
user-select: none;
> span {
margin-top: 3px;
}
}
.nav-content-item {
padding: 32px 0 0 0;
> .hd {
display: flex;
justify-content: space-between;
align-items: center;
user-select: none;
cursor: pointer;
padding: 0 18px;
> span {
> a {
opacity: .4;
padding-left: 12px;
display: none;
transition: none;
&:hover {
opacity: 1 !important;
}
&:last-child {
transform: translateY(-6px) translateX(2px) rotate(90deg);
transform-origin: center center;
transition: .25s transform;
}
}
}
&:hover {
> span {
> a {
display: block;
&:last-child {
display: block;
opacity: .6;
}
}
}
}
&:active {
opacity: .8;
}
}
> .bd {
display: none;
ul {
list-style: none;
padding: 0;
margin: 0;
a {
width: 100%;
padding: 2px 20px;
display: block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
color: var(--ls-primary-text-color);
&:hover {
background-color: var(--ls-quaternary-background-color);
}
&:active {
opacity: .7;
}
}
}
}
&.is-expand {
> .hd > span > a {
&:last-child {
transform: translateY(2px) translateX(-3px);
}
}
> .bd {
display: block;
}
}
}
a.item:hover {
background-color: var(--ls-quaternary-background-color);
}
}
.white-theme .left-sidebar-inner a, .white-theme .left-bar a {
color: var(--ls-primary-text-color);
}
.cp__sidebar-left-layout {
@apply flex-col sm:block;
background-color: var(--ls-secondary-background-color);
width: var(--ls-left-sidebar-width);
height: 100vh;
position: fixed;
top: 0;
left: 0;
z-index: 9;
transition: transform .25s;
transform: translateX(-100%);
overflow: hidden;
&:before {
content: " ";
height: 3rem;
width: calc(var(--ls-left-sidebar-width) - var(--ls-scrollbar-width));
background-color: var(--ls-secondary-background-color);
position: fixed;
left: 0;
top: 0;
z-index: 2;
}
&.is-open {
transform: translateX(0);
}
}
.settings-modal {
margin: -15px;
}
.cp__sidebar-main-layout {
background-color: var(--ls-primary-background-color);
}
.cp__sidebar-main-content {
width: 100%;
max-width: var(--ls-main-content-max-width);
flex: 1;
h1.title {
padding-right: 15px;
}
}
.cp__sidebar-help {
&-docs {
@apply ml-2 mt-1;
td {
word-break: break-all;
}
th {
width: 80%;
}
}
&-btn {
@apply font-bold fixed bottom-4
rounded-full h-8 w-8 flex items-center justify-center font-bold
opacity-70 hover:opacity-100;
user-select: none;
cursor: help;
right: 24px;
background-color: var(--ls-secondary-background-color);
}
}
.cp__right-sidebar {
z-index: var(--ls-z-index-level-1);
transition: width 0.3s;
background-color: var(--ls-secondary-background-color, #d8e1e8);
&.closed {
width: 0 !important;
}
&.open {
width: var(--ls-right-sidebar-width);
}
&-scollable {
min-height: 100%;
overflow-y: scroll;
}
&-inner {
padding-top: 0;
position: relative;
.resizer {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 4px;
user-select: none;
cursor: col-resize !important;
}
}
&-settings {
@apply flex flex-row;
margin: -15px;
margin-bottom: 0;
margin-top: 0;
overflow: auto;
&-btn {
display: block;
white-space: nowrap;
}
}
&-topbar {
position: sticky;
position: -webkit-sticky;
top: 0;
left: 0;
right: 0;
background-color: var(--ls-secondary-background-color, #d8e1e8);
z-index: 999;
user-select: none;
-webkit-app-region: drag;
a, svg {
-webkit-app-region: no-drag;
}
}
.page {
margin-top: 0;
}
.non-block-editor textarea,
pre,
pre.code {
margin: 0;
padding: 0;
font-size: 90%;
background: none;
}
.references {
margin-left: 12px;
}
.sidebar-item {
padding-top: 24px;
padding-bottom: 24px;
margin-bottom: 8px;
.close {
transform: scale(0.8);
transition: transform 0.1s;
&:hover {
transform: scale(1);
}
}
}
.add-button-link {
transform: translateX(10px) scale(.8);
}
}
.cp__sidebar-main-content[data-is-full-width='true'] {
max-width: 100vw;
}
.cp__sidebar-main-content[data-is-global-graph-pages='true'] {
padding: 0;
}
.scrollbar-spacing {
height: 100%;
}
@supports not (overflow-y: overlay) {
.scrollbar-spacing {
overflow-y: auto;
}
}
@supports (overflow-y: overlay) {
.scrollbar-spacing {
overflow-y: overlay;
}
}
.favorites li.dragging-target {
border-left: 5px solid green;
}