* { padding: 0; margin: 0; box-sizing: border-box; font-family: "Roboto", sans-serif; } :root { font-size: clamp(1rem, 1.2vmax, 1.2rem); } html, body { height: 100%; scroll-behavior: smooth; } body { &, * { --accent-color: rgb(0, 156, 78); --text-color: 36, 36, 36; --foreground-color: 252, 253, 255; --background-color: 241, 243, 248; --danger-color: rgb(255, 75, 75); --green: #1cad59; --yellow: #f3a600; scrollbar-width: thin; } color: rgba(var(--text-color), 1); background: rgba(var(--background-color), 1); } body[data-theme="dark"] { &, * { --accent-color: rgb(14, 230, 122); --text-color: 230, 230, 230; --text-color-light: 170, 170, 170; --foreground-color: 27, 28, 29; --background-color: 21, 22, 22; --danger-color: rgb(255, 106, 106); --green: #00e676; --yellow: #ffd13a; } sm-popup::part(popup) { background-color: rgba(var(--foreground-color), 1); } } p, strong { font-size: 0.9rem; max-width: 70ch; line-height: 1.7; color: rgba(var(--text-color), 0.8); &:not(:last-of-type) { margin-bottom: 1.5rem; } } a { color: var(--accent-color); text-decoration: none; overflow: hidden; &:focus-visible { box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset; } } button, .button { user-select: none; position: relative; display: inline-flex; border: none; background-color: transparent; overflow: hidden; color: inherit; cursor: pointer; transition: transform 0.3s; -webkit-tap-highlight-color: transparent; align-items: center; font-size: 0.9rem; font-weight: 500; overflow: hidden; } .button { white-space: nowrap; padding: 0.5rem 0.8rem; border-radius: 0.3rem; background-color: rgba(var(--text-color), 0.06); color: rgba(var(--text-color), 0.8); justify-content: center; &--primary { background-color: var(--accent-color); color: rgba(var(--background-color), 1); } } .icon-only { padding: 0.5rem; border-radius: 0.3rem; } button:disabled { opacity: 0.5; cursor: not-allowed; } a:any-link:focus-visible { outline: rgba(var(--text-color), 1) 0.1rem solid; } sm-input, sm-textarea, tags-input { font-size: 1rem; --border-radius: 0.3rem; } sm-button { --padding: 0.5rem 0.8rem; transition: transform 0.3s; overflow: hidden; &[variant="primary"] { --padding: 0.8rem; .icon { fill: rgba(var(--background-color), 1); } } &[disabled] { .icon { fill: rgba(var(--text-color), 0.6); } } &.uppercase { letter-spacing: 0.05em; } &.danger { --background: var(--danger-color); color: rgba(var(--background-color), 1); } } ul { list-style: none; } .hidden { display: none !important; } .overflow-ellipsis { width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .breakable { overflow-wrap: break-word; word-wrap: break-word; -ms-word-break: break-all; word-break: break-word; -ms-hyphens: auto; -moz-hyphens: auto; -webkit-hyphens: auto; hyphens: auto; } .full-bleed { grid-column: 1/-1; } .h1 { font-size: 1.5rem; } .h2 { font-size: 1.2rem; } .h3 { font-size: 1rem; } .h4 { font-size: 0.9rem; } .h5 { font-size: 0.8rem; } .uppercase { text-transform: uppercase; } .capitalize { text-transform: capitalize; } .flex { display: flex; } .grid { display: grid; } .flow-column { grid-auto-flow: column; } .gap-0-3 { gap: 0.3rem; } .gap-0-5 { gap: 0.5rem; } .gap-1 { gap: 1rem; } .gap-1-5 { gap: 1.5rem; } .gap-2 { gap: 2rem; } .gap-3 { gap: 3rem; } .text-align-right { text-align: right; } .align-start { align-items: flex-start; } .align-center { align-items: center; } .text-center { text-align: center; } .justify-start { justify-content: start; } .justify-center { justify-content: center; } .justify-right { margin-left: auto; } .align-self-center { align-self: center; } .justify-self-center { justify-self: center; } .justify-self-start { justify-self: start; } .justify-self-end { justify-self: end; } .flex-direction-column { flex-direction: column; } .space-between { justify-content: space-between; } .w-100 { width: 100%; } .ripple { height: 8rem; width: 8rem; position: absolute; border-radius: 50%; transform: scale(0); background: radial-gradient(circle, rgba(var(--text-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%); pointer-events: none; } .interact { position: relative; overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: transparent; } .empty-state { display: grid; width: 100%; padding: 1.5rem 1rem; } .observe-empty-state:empty { display: none !important; } .observe-empty-state:not(:empty)+.empty-state { display: none !important; } .icon { width: 1.2rem; height: 1.2rem; fill: rgba(var(--text-color), 0.8); flex-shrink: 0; } .margin-right-0-5 { margin-right: 0.5rem; } .margin-left-0-5 { margin-left: 0.5rem; } .margin-left-auto { margin-left: auto; } .margin-bottom-0-5 { margin-bottom: 0.5rem; } .margin-block-1 { margin-block: 1rem; } .margin-block-1-5 { margin-block: 1.5rem; } .margin-inline-1 { margin-inline: 1rem; } .margin-inline-1-5 { margin-inline: 1.5rem; } .icon-button { padding: 0.6rem; border-radius: 0.8rem; background-color: rgba(var(--text-color), 0.1); height: max-content; .icon { fill: var(--accent-color); } } .multi-state-button { display: grid; text-align: center; align-items: center; justify-items: center; &>* { grid-area: 1/1/2/2; } button { z-index: 1; width: 100%; } sm-spinner { --height: 1em; --width: 1em; } } #confirmation_popup, #prompt_popup { flex-direction: column; h4 { font-weight: 500; margin-bottom: 0.5rem; } sm-button { margin: 0; } .flex { padding: 0; margin-top: 1rem; sm-button:first-of-type { margin-right: 0.6rem; margin-left: auto; } } } #prompt_message { margin-bottom: 1.5rem; } .popup__header { display: grid; gap: 0.5rem; width: 100%; padding: 0 1.5rem 0 0.5rem; align-items: center; grid-template-columns: auto 1fr auto; } .popup__header__close { padding: 0.5rem; cursor: pointer; } .logo { display: grid; align-items: center; width: 100%; grid-template-columns: auto 1fr; gap: 0 0.3rem; h4 { text-transform: capitalize; font-size: 0.9rem; } .main-logo { height: 1.4rem; width: 1.4rem; fill: rgba(var(--text-color), 1); stroke: none; } } details summary { display: flex; user-select: none; cursor: pointer; align-items: center; justify-content: space-between; color: var(--accent-color); } details[open] { & summary { margin-bottom: 1rem; } &>summary .down-arrow { transform: rotate(180deg); } } sm-select, sm-option, sm-chip { font-size: 0.9rem; } sm-chips { --gap: 0.3rem; } sm-chip { font-weight: 500; --border-radius: 0.5rem; --background: rgba(var(--text-color), 0.06); &[selected] { color: rgba(var(--background-color), 1); --background: var(--accent-color); } } sm-checkbox { --height: 1rem; --width: 1rem; -webkit-tap-highlight-color: transparent; } sm-menu { --background: rgba(var(--foreground-color), 1); } menu-option { font-size: 0.9rem; } sm-copy { font-size: 0.9rem; --button-border-radius: 0.2rem; } .warning { background-color: khaki; color: rgba(0, 0, 0, 0.7); padding: 1rem; border-radius: 0.5rem; line-height: 1.5; } .page { height: 100%; } .page-layout, #preview_page { display: grid; grid-template-columns: 1rem minmax(0, 1fr) 1rem; &>* { grid-column: 2/3; } } #landing { grid-template-rows: auto 1fr; header { padding: 1.5rem 0; } &>section { align-items: center; text-align: center; } h1 { margin-top: -2ch; font-size: clamp(2rem, 5vw, 5rem); } p { max-width: 100%; } } #sign_in { grid-template-rows: auto 1fr; align-items: center; section { margin-top: -6rem; justify-self: center; width: min(24rem, 100%); } sm-form { margin: 2rem 0; } header { padding: 1.5rem 0; } } #sign_up { grid-template-rows: auto 1fr; align-items: center; header { padding: 1.5rem 0; } keys-generator { justify-self: center; width: min(26rem, 100%); margin-top: -4rem; } .h2 { margin-bottom: 0.5rem; } } #loading { place-content: center; text-align: center; sm-spinner { margin-bottom: 1.5rem; justify-self: center; } } #main_header { position: relative; display: grid; gap: 1rem; padding: 1rem; align-items: center; grid-template-columns: 1fr auto; grid-column: 1/-1; background-color: rgba(var(--foreground-color), 1); z-index: 2; } #current_article_title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-right: auto; } #options_panel { position: sticky; top: 6.5rem; z-index: 1; padding: 0.5rem 1.5rem; grid-column: 1/-1; background-color: rgba(var(--foreground-color), 1); overflow-x: auto; min-height: 3.2rem; } #plot_popup { --width: min(28rem, 100%); } .outline-button { position: relative; padding: 0.5rem 0; text-align: left; line-height: 1.7; width: 100%; &::before { position: absolute; content: ""; width: 0.3rem; border-radius: 0.5rem; height: 2rem; transition: opacity 0.1s; left: 0; margin-right: 0.5rem; background-color: rgba(var(--text-color), 0.5); opacity: 0; } &--active { padding-left: 1rem; &::before { opacity: 1; background-color: var(--accent-color); } } } .enable-focus-button { flex-shrink: 0; } .label { font-size: 0.8rem; color: rgba(var(--text-color), 0.8); margin-bottom: 0.2rem; } .icon--success { fill: var(--green); } .icon--failure, .icon--error { fill: var(--danger-color); } #main_page { overscroll-behavior: contain; height: 100%; overflow-y: hidden; grid-template-columns: minmax(0, 1fr); align-content: flex-start; } #article_list_popup { --width: min(64rem, 100%); --min-height: 70vh; .popup__header { padding: 1rem; gap: 1rem; padding-bottom: 0; grid-template-columns: minmax(0, 1fr); } } #article_list { gap: 0 1.5rem; grid-template-columns: repeat(auto-fill, minmax(30ch, 1fr)); } .article-link { position: relative; padding: 1rem 0; color: rgba(var(--text-color), 0.8); font-weight: 500; border-radius: 0.3rem; &::first-letter { text-transform: uppercase; } } .default-article { &::before { content: ""; font-size: 0.7rem; background-color: var(--accent-color); height: 2em; width: 0.3em; border-radius: 0.5rem; font-weight: 500; margin-right: 0.5rem; align-self: center; color: rgba(var(--foreground-color), 1); } } #edit_sections_popup { --body-padding: 1.2rem; } #section_list_container { gap: 0.5rem; } .section-card { font-weight: 500; font-size: 0.9rem; .handle { cursor: grab; } input { background-color: rgba(var(--text-color), 0.06); padding: 0.8rem; border-radius: 0.3rem; border: none; font-size: inherit; color: inherit; font-weight: inherit; width: 100%; &:focus { outline: var(--accent-color) solid; } } .remove { padding: 0.3rem; } } #insert_section_button { align-self: flex-start; } #article_wrapper { display: flex; flex-direction: column; padding: 1rem; gap: 1.5rem 0; height: 100%; overflow-y: auto; scroll-padding-top: 1.5rem; } .heading { font-weight: 700; &::before { content: ""; width: 0.3rem; height: 100%; margin-right: 0.7rem; border-radius: 0.5rem; background-color: var(--accent-color); } button { margin-left: auto; } .section-title { line-height: 1.4; } } .article-section { gap: 1rem; &:not(:last-of-type) { margin-bottom: 1.5rem; } &::-webkit-scrollbar { display: none; } } .content-card { border-radius: 0.5rem; background-color: rgba(var(--foreground-color), 1); box-shadow: 0 0 0 1px rgba(var(--text-color), 0.16) inset; &.selected { box-shadow: 0 0 0 0.1rem var(--accent-color) inset; } &--empty { display: flex; flex-direction: column; .content__area { min-height: calc(60vh + 3rem); height: 100%; max-height: calc(60vh + 3rem); } } .submit-entry { border-radius: 0.2rem; padding: 0.4rem 0.8rem; color: var(--accent-color); sm-spinner { --height: 0.8rem; --width: 0.8rem; } } } .content__header { padding: 0.5rem; } .content__area { border-radius: inherit; padding: 1rem; white-space: pre-line; font-size: 1rem; line-height: 1.7; color: rgba(var(--text-color), 0.8); background-color: rgba(var(--text-color), 0.02); border-radius: 0.5rem; transition: box-shadow 0.1s; height: 60vh; overflow-y: auto; &:empty::before { content: attr(placeholder); opacity: 0.6; pointer-events: none; } &:focus-within { outline: none; box-shadow: 0 0 0 0.1rem var(--accent-color) inset; } &>* { font-family: inherit; font-size: 1rem; } } .content__options { gap: 0.5rem; padding: 0.5rem 1rem; grid-template-columns: auto auto 1fr auto; } .content__contributors { font-size: 0.7rem; background-color: rgba(var(--text-color), 0.06); border-radius: 0.3rem; padding: 0.2rem 0.3rem; color: rgba(var(--text-color), 0.8); margin-right: 0.5rem; } .content__author { display: grid; gap: 0.3rem; grid-template-columns: auto max-content; div:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } div:last-of-type { flex: 1; } } .content__score { font-size: 0.8rem; margin-left: 0.2rem; line-height: 100%; } .score-button--filled { .icon { fill: var(--yellow); } } .actionable-button { padding: 0.5rem 0.8rem; background-color: rgba(var(--text-color), 0.1); border-radius: 2rem; border: solid thin rgba(var(--text-color), 0.3); &__title { font-size: 0.8rem; margin-left: 0.3rem; } } #text_toolbar { user-select: none; position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; transition: transform 0.1s; background-color: rgba(var(--foreground-color), 1); border: solid thin rgba(var(--text-color), 0.2); padding: 0.2rem; border-radius: 0.3rem; box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.06), 0 1rem 1.5rem -0.5rem rgba(0, 0, 0, 0.2); } .formatting-button { padding: 0.3rem; border-radius: 0.3rem; transition: background-color 0.1s; &.active:hover { background-color: var(--accent-color); } } .active { background-color: var(--accent-color); .icon { fill: rgba(var(--foreground-color), 1); } } #focus_mode_panel { flex-wrap: wrap; gap: 1rem; background-color: rgba(var(--foreground-color), 1); padding: 1.5rem; border-radius: 0.5rem; box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1); .button { color: var(--accent-color); flex-shrink: 0; } } #version_history_panel { border-radius: 0.5rem; width: min(24rem, 100%); background-color: rgba(var(--foreground-color), 1); overflow-y: auto; &> :first-child { padding: 1rem; } } #version_timeline { padding: 1rem; height: 100%; overflow-y: auto; } .history-entry { grid-template-columns: minmax(0, 1fr); &:not(:last-of-type) { padding-bottom: 1rem; border-bottom: thin solid rgba(var(--text-color), 0.3); } &:last-of-type::before { content: "CREATED"; letter-spacing: 0.03em; display: inline-flex; justify-self: flex-start; font-weight: 500; padding: 0.2rem 0.3rem; font-size: 0.7rem; border-radius: 0.2rem; border: solid thin rgba(var(--text-color), 0.5); } } .entry__time, .entry__author { font-size: 0.8rem; font-weight: 500; } .entry__changes { font-size: 0.9rem; line-height: 1.7; color: rgba(var(--text-color), 0.8); overflow-wrap: break-word; white-space: pre-line; .added>*, .removed>* { background-color: transparent; } .added, .added>* { overflow-wrap: break-word; background-color: #00e67650; } .removed, .removed>* { overflow-wrap: break-word; color: var(--danger-color); text-decoration-color: var(--danger-color); } } .contributor { gap: 0.5rem; grid-template-columns: auto 1fr; .icon { grid-row: span 2; } &__id { font-size: 0.8rem; font-weight: 700; } &__time { font-size: 0.8rem; } } #preview_page { padding-bottom: 3rem; grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem; overflow-y: auto; height: 100%; align-content: flex-start; header { position: sticky; top: 0; z-index: 1; padding: 1.5rem 0 1rem 0; background-color: rgba(var(--background-color), 1); } h1, h2, h3, h4, h5, h6 { font-weight: 400; font-family: "Calistoga", cursive; } h3 { margin-bottom: 1rem; &:not(:first-of-type) { margin-top: 3rem; } } p { font-size: 1rem; white-space: pre-line; & * { font-size: inherit; font-family: inherit; } } } #preview__body { padding: 1.5rem 0; } .preview-group { &:not(:last-of-type) { margin-bottom: 1.5rem; } } .preview-group__buttons { display: inline-flex; background-color: rgba(var(--foreground-color), 1); border: solid thin rgba(var(--text-color), 0.2); padding: 0.2rem; border-radius: 0.3rem; box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.06), 0 1rem 1.5rem -0.5rem rgba(0, 0, 0, 0.2); button { padding: 0.5rem; .icon { height: 1rem; width: 1rem; } } } #publish_article_popup { --min-height: 50vh; } @media screen and (max-width: 40rem) { #article_name_wrapper, #selected_content_options { grid-row: 2/3; grid-column: 1/-1; #article_outline_button { margin-left: auto; } } #article_name_wrapper { justify-content: flex-start; .icon-only { flex-shrink: 0; } } .article-section { display: flex; scroll-snap-type: x mandatory; overflow-x: auto; flex-shrink: 0; } .content-card { scroll-snap-align: start; flex-shrink: 0; width: min(45ch, calc(100% - 2rem)); } .formatting-button { padding: 0.5rem; } .hide-on-mobile { display: none; } } @media screen and (min-width: 40rem) { sm-popup { --width: 24rem; } .h1 { font-size: 2rem; } .h2 { font-size: 1.8rem; } .h3 { font-size: 1.3rem; } .h4 { font-size: 1rem; } .popup__header { grid-column: 1/-1; padding: 1rem 1.5rem 0 0.5rem; } #confirmation_popup { --width: 24rem; } .page-layout { grid-template-columns: 1fr 90vw 1fr; } .hide-on-desktop { display: none; } #main_header { padding: 1rem 1.5rem; grid-template-columns: 1fr auto auto; } #options_panel { top: 4.2rem; } #main_page { &.active-sidebar { grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr) 24rem; } &.active-outline { grid-template-rows: auto 1fr; grid-template-columns: 20rem minmax(0, 1fr); } &.active-sidebar.active-outline { grid-template-rows: auto 1fr; grid-template-columns: 20rem minmax(0, 1fr) 24rem; } } #version_history_panel, #article_outline_panel, #article_wrapper { overscroll-behavior: contain; } #article_wrapper { padding: 1.5rem; } .article-section { display: grid; grid-template-columns: repeat(auto-fill, minmax(40ch, 1fr)); } #article_list_popup { .popup__header { grid-template-columns: auto 1fr auto; padding-bottom: 1rem; } } #article_list_search { width: 16rem; } #preview_page { grid-template-columns: 1fr 60ch 1fr; } .preview-group { position: relative; } .preview-group__buttons { position: absolute; right: 0; bottom: 100%; } #text_toolbar { position: absolute; z-index: 1; left: 0; top: 0; right: auto; bottom: auto; } #create_article_popup { --width: 28rem; } #user_popup { --width: 25rem; } } @media (any-hover: hover) { ::-webkit-scrollbar { width: 0.5rem; height: 0.5rem; } ::-webkit-scrollbar-thumb { background: rgba(var(--text-color), 0.3); border-radius: 1rem; &:hover { background: rgba(var(--text-color), 0.5); } } .interact:not([disabled]), .button:not([disabled]), .button:not(.button--primary), button:not(.button--primary):not([disabled]) { transition: background-color 0.3s; &:hover { background-color: rgba(var(--text-color), 0.06); } } .button--primary { transition: filter 0.3s; background-color: var(--accent-color) !important; &:hover { filter: brightness(120%); } } .content-card { &:not(.selected) sm-checkbox { opacity: 0; transition: opacity 0.2s; } &:hover sm-checkbox, &:focus-within sm-checkbox { opacity: 1; } } .preview-group__buttons { transition: opacity 0.1s; opacity: 0; } .preview-group { border-radius: 0.3rem; &:hover { background-color: rgba(var(--text-color), 0.06); .preview-group__buttons { opacity: 1; } } .preview-group__buttons:focus-within { opacity: 1; } } } // dragula styles .gu-mirror { position: fixed; z-index: 9999 !important; box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.16); } .gu-hide { display: none !important; } .gu-unselectable { user-select: none !important; } .gu-transit { opacity: 0.2; }