silverbullet/web/styles/main.scss

240 lines
3.7 KiB
SCSS
Raw Permalink Normal View History

@use "editor";
2022-12-21 23:08:51 +08:00
@use "modals";
@use "theme";
@use "colors";
2022-04-04 21:25:07 +08:00
2022-05-07 00:55:04 +08:00
@font-face {
font-family: "iA-Mono";
src: url("/.client/iAWriterMonoS-Regular.woff2");
2022-05-07 00:55:04 +08:00
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "iA-Mono";
src: url("/.client/iAWriterMonoS-Bold.woff2");
2022-05-07 00:55:04 +08:00
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: "iA-Mono";
src: url("/.client/iAWriterMonoS-Italic.woff2");
2022-05-07 00:55:04 +08:00
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: "iA-Mono";
src: url("/.client/iAWriterMonoS-BoldItalic.woff2");
2022-05-07 00:55:04 +08:00
font-weight: bold;
font-style: italic;
}
html,
body {
margin: 0;
height: 100%;
padding: 0;
width: 100%;
overflow: hidden;
background-color: var(--top-background-color);
}
2022-07-22 19:44:28 +08:00
#sb-root {
2022-04-05 00:33:13 +08:00
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
background-color: var(--root-background-color);
2022-03-28 21:25:05 +08:00
}
2022-07-22 19:44:28 +08:00
#sb-top {
2022-04-05 00:33:13 +08:00
display: flex;
flex-direction: row;
2022-06-18 02:17:22 +08:00
z-index: 20;
2022-04-05 00:33:13 +08:00
2022-08-02 20:40:04 +08:00
height: 55px;
2022-04-05 00:33:13 +08:00
.main {
flex: 2;
2022-06-20 23:24:44 +08:00
max-width: 100%;
2022-04-05 00:33:13 +08:00
.inner {
// Hack to not have SCSS precompile this value but use proper CSS variables
max-width: var(--#{"editor-width"});
2022-04-05 00:33:13 +08:00
margin: auto;
font-size: 28px;
padding: 8px 0;
2022-06-20 23:24:44 +08:00
display: flex;
flex-direction: row;
2022-12-16 18:39:46 +08:00
.wrapper {
width: env(titlebar-area-width, 100%);
padding: 0 20px;
2024-02-28 05:43:39 +08:00
display: flex;
box-sizing: border-box;
2024-02-28 23:22:28 +08:00
position: relative;
.sb-notifications {
position: absolute;
right: 20px;
top: 50px;
2022-12-16 18:39:46 +08:00
2024-02-28 23:22:28 +08:00
font-size: 15px;
z-index: 100;
2024-10-11 21:34:27 +08:00
> div {
2024-02-28 23:22:28 +08:00
padding: 3px;
margin-bottom: 3px;
border-radius: 5px;
}
}
}
}
2022-04-05 00:33:13 +08:00
#sb-current-page {
flex: 1;
2022-06-18 02:17:22 +08:00
overflow: hidden;
white-space: nowrap;
text-align: left;
display: block;
-webkit-app-region: drag;
.cm-scroller {
font-family: var(--ui-font);
}
.cm-content {
padding: 0;
.cm-line {
padding: 0;
caret-color: var(--editor-caret-color);
}
}
}
}
2022-06-18 02:17:22 +08:00
.sb-actions {
2024-02-28 05:43:39 +08:00
display: flex;
flex: 0 0 auto;
text-align: right;
}
2023-06-15 02:58:08 +08:00
.progress-wrapper {
display: inline-block;
position: relative;
margin-top: 4px;
padding: 4px;
background-color: var(--top-background-color);
}
2023-06-15 02:58:08 +08:00
.progress-bar {
display: flex;
justify-content: center;
align-items: center;
2023-06-15 02:58:08 +08:00
width: 24px;
height: 24px;
border-radius: 50%;
font-size: 8px;
2022-04-05 00:33:13 +08:00
}
}
.sb-panel {
flex: 1;
}
.sb-bottom-iframe {
width: 100%;
margin-top: 10px;
border: 1px solid var(--editor-widget-background-color);
border-radius: 5px;
}
.sb-top-iframe {
2023-11-25 20:40:56 +08:00
width: 100%;
margin-top: 10px;
border: 1px solid var(--editor-widget-background-color);
2023-11-25 20:40:56 +08:00
border-radius: 5px;
}
2022-07-22 19:44:28 +08:00
#sb-main {
2022-04-05 00:33:13 +08:00
display: flex;
flex-direction: row;
flex-grow: 1;
height: 0;
2022-08-02 20:40:04 +08:00
.sb-panel {
2022-04-05 00:33:13 +08:00
flex: 1;
}
}
2022-07-22 19:44:28 +08:00
#sb-editor {
2022-04-05 00:33:13 +08:00
flex: 2;
height: 100%;
2023-07-02 17:50:53 +08:00
width: 100%;
2022-03-28 21:25:05 +08:00
}
2022-08-02 20:40:04 +08:00
.sb-bhs {
2022-05-09 20:59:12 +08:00
height: 300px;
2022-04-27 01:04:36 +08:00
width: 100%;
z-index: 10;
2022-05-09 20:59:12 +08:00
2022-08-02 20:40:04 +08:00
.sb-panel {
2022-05-09 20:59:12 +08:00
height: 100%;
2022-04-27 01:04:36 +08:00
}
}
.sb-modal {
position: absolute;
z-index: 100;
.sb-panel {
height: 100%;
}
}
.sb-page-prefix {
display: flex;
align-items: baseline;
flex: 0 0 auto;
text-align: left;
2024-07-14 17:29:43 +08:00
padding-top: 3px;
font-family: var(--ui-font);
2024-07-14 17:29:43 +08:00
white-space: pre-wrap;
}
.sb-panel {
iframe {
background-color: var(--root-background-color);
border: 0;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
}
.sb-preview {
position: relative;
}
.sb-markdown-toolbar {
position: absolute;
opacity: 0;
transition: opacity 0.2s;
width: 100%;
display: flex;
justify-content: flex-end;
box-sizing: border-box;
}
.sb-markdown-toolbar:hover {
opacity: 1;
}