diff --git a/components.js b/components.js index 8d184c5..4cb66b0 100644 --- a/components.js +++ b/components.js @@ -730,155 +730,174 @@ customElements.define('sm-input', this.clearBtn.removeEventListener('click', this.reset); } }) +//notifications + const smNotifications = document.createElement('template') smNotifications.innerHTML = ` - -
-` - + .hide{ + opacity: 0 !important; + pointer-events: none !important; + } + .notification-panel{ + display: grid; + width: 100%; + gap: 0.5rem; + position: fixed; + left: 0; + top: 0; + z-index: 100; + max-height: 100%; + padding: 1rem; + overflow: hidden auto; + -ms-scroll-chaining: none; + overscroll-behavior: contain; + touch-action: none; + } + .notification-panel:empty{ + display:none; + } + .notification{ + display: -webkit-box; + display: -ms-flexbox; + display: flex; + position: relative; + border-radius: 0.3rem; + background: rgba(var(--foreground-color, (255,255,255)), 1); + overflow: hidden; + overflow-wrap: break-word; + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; + max-width: 100%; + padding: 1rem; + align-items: center; + box-shadow: 0 0.5rem 1rem 0 rgba(0,0,0,0.14); + touch-action: none; + } + .icon-container:not(:empty){ + margin-right: 0.5rem; + height: var(--icon-height); + width: var(--icon-width); + } + h4:first-letter, + p:first-letter{ + text-transform: uppercase; + } + h4{ + font-weight: 400; + } + p{ + line-height: 1.6; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + color: rgba(var(--text-color, (17,17,17)), 0.9); + overflow-wrap: break-word; + overflow-wrap: break-word; + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; + max-width: 100%; + } + .notification:last-of-type{ + margin-bottom: 0; + } + .icon { + height: 100%; + width: 100%; + fill: rgba(var(--text-color, (17,17,17)), 0.7); + } + .icon--success { + fill: var(--green); + } + .icon--failure, + .icon--error { + fill: var(--danger-color); + } + .close{ + height: 2rem; + width: 2rem; + border: none; + cursor: pointer; + margin-left: 1rem; + border-radius: 50%; + padding: 0.3rem; + transition: background-color 0.3s, transform 0.3s; + background-color: transparent; + } + .close:active{ + transform: scale(0.9); + } + .action{ + display: flex; + align-items: center; + justify-content: center; + padding: 0.5rem 0.8rem; + border-radius: 0.2rem; + border: none; + background-color: rgba(var(--text-color, (17,17,17)), 0.03); + font-family: inherit; + font-size: inherit; + color: var(--accent-color, teal); + font-weight: 500; + cursor: pointer; + } + @media screen and (max-width: 640px){ + .notification-panel:not(:empty){ + padding-bottom: 3rem; + } + } + @media screen and (min-width: 640px){ + .notification-panel{ + max-width: 28rem; + width: max-content; + top: auto; + bottom: 0; + } + .notification{ + width: auto; + border: solid 1px rgba(var(--text-color, (17,17,17)), 0.2); + } + } + @media (any-hover: hover){ + ::-webkit-scrollbar{ + width: 0.5rem; + } + + ::-webkit-scrollbar-thumb{ + background: rgba(var(--text-color, (17,17,17)), 0.3); + border-radius: 1rem; + &:hover{ + background: rgba(var(--text-color, (17,17,17)), 0.5); + } + } + .close:hover{ + background-color: rgba(var(--text-color, (17,17,17)), 0.1); + } + } + + + `; customElements.define('sm-notifications', class extends HTMLElement { constructor() { super(); @@ -897,7 +916,23 @@ customElements.define('sm-notifications', class extends HTMLElement { this.createNotification = this.createNotification.bind(this) this.removeNotification = this.removeNotification.bind(this) this.clearAll = this.clearAll.bind(this) + this.handlePointerMove = this.handlePointerMove.bind(this) + + this.startX = 0; + this.currentX = 0; + this.endX = 0; + this.swipeDistance = 0; + this.swipeDirection = ''; + this.swipeThreshold = 0; + this.startTime = 0; + this.swipeTime = 0; + this.swipeTimeThreshold = 200; + this.currentTarget = null; + + this.mediaQuery = window.matchMedia('(min-width: 640px)') + this.handleOrientationChange = this.handleOrientationChange.bind(this) + this.isLandscape = false } randString(length) { @@ -909,22 +944,27 @@ customElements.define('sm-notifications', class extends HTMLElement { } createNotification(message, options = {}) { - const { pinned = false, icon = '' } = options; - const notification = document.createElement('div') + const { pinned = false, icon = '', action } = options; + const notification = document.createElement('output') notification.id = this.randString(8) notification.classList.add('notification'); let composition = ``; composition += ` -${message}
- `; +${message}
+ `; + if (action) { + composition += ` + + ` + } if (pinned) { notification.classList.add('pinned'); composition += ` - - `; + + `; } notification.innerHTML = composition; return notification; @@ -932,28 +972,47 @@ customElements.define('sm-notifications', class extends HTMLElement { push(message, options = {}) { const notification = this.createNotification(message, options); - this.notificationPanel.append(notification); + if (this.isLandscape) + this.notificationPanel.append(notification); + else + this.notificationPanel.prepend(notification); + this.notificationPanel.animate( + [ + { + transform: `translateY(${this.isLandscape ? '' : '-'}${notification.clientHeight}px)`, + }, + { + transform: `none`, + }, + ], this.animationOptions + ) notification.animate([ { - transform: `translateY(1rem)`, + transform: `translateY(-1rem)`, opacity: '0' }, { transform: `none`, opacity: '1' }, - ], this.animationOptions); + ], this.animationOptions).onfinish = (e) => { + e.target.commitStyles() + e.target.cancel() + } + if (notification.querySelector('.action')) + notification.querySelector('.action').addEventListener('click', options.action.callback) return notification.id; } - removeNotification(notification) { + removeNotification(notification, direction = 'left') { + const sign = direction === 'left' ? '-' : '+'; notification.animate([ { - transform: `none`, + transform: this.currentX ? `translateX(${this.currentX}px)` : `none`, opacity: '1' }, { - transform: `translateY(0.5rem)`, + transform: `translateX(calc(${sign}${Math.abs(this.currentX)}px ${sign} 1rem))`, opacity: '0' } ], this.animationOptions).onfinish = () => { @@ -967,7 +1026,70 @@ customElements.define('sm-notifications', class extends HTMLElement { }); } + handlePointerMove(e) { + this.currentX = e.clientX - this.startX; + this.currentTarget.style.transform = `translateX(${this.currentX}px)`; + } + + handleOrientationChange(e) { + this.isLandscape = e.matches + if (e.matches) { + // landscape + + } else { + // portrait + } + } connectedCallback() { + + this.handleOrientationChange(this.mediaQuery); + + this.mediaQuery.addEventListener('change', this.handleOrientationChange); + this.notificationPanel.addEventListener('pointerdown', e => { + if (e.target.closest('.notification')) { + this.swipeThreshold = this.clientWidth / 2; + this.currentTarget = e.target.closest('.notification'); + this.currentTarget.setPointerCapture(e.pointerId); + this.startTime = Date.now(); + this.startX = e.clientX; + this.startY = e.clientY; + this.notificationPanel.addEventListener('pointermove', this.handlePointerMove); + } + }); + this.notificationPanel.addEventListener('pointerup', e => { + this.endX = e.clientX; + this.endY = e.clientY; + this.swipeDistance = Math.abs(this.endX - this.startX); + this.swipeTime = Date.now() - this.startTime; + if (this.endX > this.startX) { + this.swipeDirection = 'right'; + } else { + this.swipeDirection = 'left'; + } + if (this.swipeTime < this.swipeTimeThreshold) { + if (this.swipeDistance > 50) + this.removeNotification(this.currentTarget, this.swipeDirection); + } else { + if (this.swipeDistance > this.swipeThreshold) { + this.removeNotification(this.currentTarget, this.swipeDirection); + } else { + this.currentTarget.animate([ + { + transform: `translateX(${this.currentX}px)`, + }, + { + transform: `none`, + }, + ], this.animationOptions).onfinish = (e) => { + e.target.commitStyles() + e.target.cancel() + } + } + } + this.notificationPanel.removeEventListener('pointermove', this.handlePointerMove) + this.notificationPanel.releasePointerCapture(e.pointerId); + this.currentX = 0; + }); this.notificationPanel.addEventListener('click', e => { if (e.target.closest('.close')) { this.removeNotification(e.target.closest('.notification')); @@ -989,9 +1111,12 @@ customElements.define('sm-notifications', class extends HTMLElement { childList: true, }); } + disconnectedCallback() { + mediaQueryList.removeEventListener('change', handleOrientationChange); + } }); - +//popup class Stack { constructor() { this.items = []; @@ -1024,9 +1149,6 @@ smPopup.innerHTML = ` display: -ms-grid; display: grid; z-index: 10; - --accent-color: #4d2588; - --text-color: 17, 17, 17; - --background-color: 255, 255, 255; --width: 100%; --height: auto; --min-width: auto; @@ -1081,7 +1203,7 @@ smPopup.innerHTML = ` min-height: var(--min-height); max-height: 90vh; border-radius: var(--border-radius); - background: rgba(var(--background-color), 1); + background: rgba(var(--background-color, (255,255,255)), 1); -webkit-box-shadow: 0 -1rem 2rem #00000020; box-shadow: 0 -1rem 2rem #00000020; } @@ -1141,7 +1263,7 @@ smPopup.innerHTML = ` .handle{ height: 0.3rem; width: 2rem; - background: rgba(var(--text-color), .4); + background: rgba(var(--text-color, (17,17,17)), .4); border-radius: 1rem; margin: 0.5rem 0; } @@ -1152,10 +1274,10 @@ smPopup.innerHTML = ` } ::-webkit-scrollbar-thumb{ - background: rgba(var(--text-color), 0.3); + background: rgba(var(--text-color, (17,17,17)), 0.3); border-radius: 1rem; &:hover{ - background: rgba(var(--text-color), 0.5); + background: rgba(var(--text-color, (17,17,17))), 0.5); } } } @@ -1195,7 +1317,7 @@ customElements.define('sm-popup', class extends HTMLElement { this.popupContainer = this.shadowRoot.querySelector('.popup-container'); this.backdrop = this.shadowRoot.querySelector('.background'); - this.popup = this.shadowRoot.querySelector('.popup'); + this.dialogBox = this.shadowRoot.querySelector('.popup'); this.popupBodySlot = this.shadowRoot.querySelector('.popup-body slot'); this.popupHeader = this.shadowRoot.querySelector('.popup-top'); @@ -1229,7 +1351,7 @@ customElements.define('sm-popup', class extends HTMLElement { resumeScrolling() { const scrollY = document.body.style.top; window.scrollTo(0, parseInt(scrollY || '0') * -1); - document.body.style.overflow = 'auto'; + document.body.style.overflow = ''; document.body.style.top = 'initial'; } @@ -1240,7 +1362,7 @@ customElements.define('sm-popup', class extends HTMLElement { easing: 'ease' } const initialAnimation = (window.innerWidth > 640) ? 'scale(1.1)' : `translateY(${this.offset ? `${this.offset}px` : '100%'})` - this.animateTo(this.popup, [ + this.animateTo(this.dialogBox, [ { opacity: this.offset ? 1 : 0, transform: initialAnimation @@ -1305,7 +1427,7 @@ customElements.define('sm-popup', class extends HTMLElement { { opacity: 1 }, { opacity: 0 } ], animOptions) - this.animateTo(this.popup, [ + this.animateTo(this.dialogBox, [ { opacity: 1, transform: (window.innerWidth > 640) ? 'none' : `translateY(${this.offset ? `${this.offset}px` : '0'})` @@ -1317,7 +1439,7 @@ customElements.define('sm-popup', class extends HTMLElement { ], animOptions).finished .finally(() => { this.popupContainer.classList.add('hide'); - this.popup.style = '' + this.dialogBox.style = '' this.removeAttribute('open'); if (this.forms.length) { @@ -1357,7 +1479,7 @@ customElements.define('sm-popup', class extends HTMLElement { if (this.touchStartY < e.changedTouches[0].clientY) { this.offset = e.changedTouches[0].clientY - this.touchStartY; this.touchEndAnimation = window.requestAnimationFrame(() => { - this.popup.style.transform = `translateY(${this.offset}px)`; + this.dialogBox.style.transform = `translateY(${this.offset}px)`; }); } } @@ -1366,7 +1488,7 @@ customElements.define('sm-popup', class extends HTMLElement { this.touchEndTime = e.timeStamp; cancelAnimationFrame(this.touchEndAnimation); this.touchEndY = e.changedTouches[0].clientY; - this.threshold = this.popup.getBoundingClientRect().height * 0.3; + this.threshold = this.dialogBox.getBoundingClientRect().height * 0.3; if (this.touchEndTime - this.touchStartTime > 200) { if (this.touchEndY - this.touchStartY > this.threshold) { if (this.pinned) { @@ -1392,7 +1514,7 @@ customElements.define('sm-popup', class extends HTMLElement { detectFocus(e) { - if (e.code === 'Tab') { + if (e.key === 'Tab') { const lastElement = this.focusable[this.focusable.length - 1]; const firstElement = this.focusable[0]; if (e.shiftKey && document.activeElement === firstElement) { @@ -1406,7 +1528,7 @@ customElements.define('sm-popup', class extends HTMLElement { } updateFocusableList() { - this.focusable = this.querySelectorAll('sm-button:not([disabled]), button:not([disabled]), [href], sm-input, input, sm-select, select, sm-checkbox, sm-textarea, textarea, [tabindex]:not([tabindex="-1"])') + this.focusable = this.querySelectorAll('sm-button:not([disabled]), button:not([disabled]), [href], sm-input, input:not([readonly]), sm-select, select, sm-checkbox, sm-textarea, textarea, [tabindex]:not([tabindex="-1"])') this.autoFocus = this.querySelector('[autofocus]') } diff --git a/css/main.css b/css/main.css index eac73d4..0c9ecde 100644 --- a/css/main.css +++ b/css/main.css @@ -1,1249 +1,1270 @@ -* { - 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 { - color: rgba(var(--text-color), 1); - background: rgba(var(--background-color), 1); -} -body, -body * { - --accent-color: rgb(0, 156, 78); - --text-color: 36, 36, 36; - --background-color: 248, 248, 248; - --foreground-color: rgb(255, 255, 255); - --danger-color: rgb(255, 75, 75); - --green: #1cad59; - --yellow: #f3a600; - scrollbar-width: thin; -} - -body[data-theme=dark], -body[data-theme=dark] * { - --accent-color: rgb(14, 230, 122); - --text-color: 230, 230, 230; - --text-color-light: 170, 170, 170; - --background-color: 10, 10, 10; - --foreground-color: rgb(24, 24, 24); - --danger-color: rgb(255, 106, 106); - --green: #00e676; - --yellow: #ffd13a; -} -body[data-theme=dark] sm-popup::part(popup) { - background-color: var(--foreground-color); -} - -p, -strong { - font-size: 0.9rem; - max-width: 70ch; - line-height: 1.7; - color: rgba(var(--text-color), 0.8); -} -p:not(:last-of-type), -strong:not(:last-of-type) { - margin-bottom: 1.5rem; -} - -a { - color: var(--accent-color); - text-decoration: none; - overflow: hidden; -} -a:focus-visible { - box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset; -} - -button, -.button { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - 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; -} -.button--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; -} - -a:-webkit-any-link:focus-visible { - outline: rgba(var(--text-color), 1) 0.1rem solid; -} - -a:-moz-any-link:focus-visible { - outline: rgba(var(--text-color), 1) 0.1rem solid; -} - -a:any-link:focus-visible { - outline: rgba(var(--text-color), 1) 0.1rem solid; -} - -sm-input, -sm-textarea, -tags-input { - font-size: 0.9rem; - --border-radius: 0.3rem; -} - -sm-button { - --padding: 0.5rem 0.8rem; - transition: transform 0.3s; - overflow: hidden; -} -sm-button[variant=primary] { - --padding: 0.8rem; -} -sm-button[variant=primary] .icon { - fill: rgba(var(--background-color), 1); -} -sm-button[disabled] .icon { - fill: rgba(var(--text-color), 0.6); -} -sm-button.uppercase { - letter-spacing: 0.05em; -} -sm-button.danger { - --background: var(--danger-color); - color: rgba(var(--background-color), 1); -} - -ul { - list-style: none; -} - -.hide-completely { - 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; - -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-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; -} - -.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; -} - -.button__icon { - height: 1.2rem; - width: 1.2rem; -} -.button__icon--left { - margin-right: 0.5rem; -} -.button__icon--right { - margin-left: 0.5rem; -} - -.icon-button { - padding: 0.6rem; - border-radius: 0.8rem; - background-color: rgba(var(--text-color), 0.1); - height: -webkit-max-content; - height: -moz-max-content; - height: max-content; -} -.icon-button .icon { - fill: var(--accent-color); -} - -#confirmation_popup, -#prompt_popup { - flex-direction: column; -} -#confirmation_popup h4, -#prompt_popup h4 { - font-weight: 500; - margin-bottom: 0.5rem; -} -#confirmation_popup sm-button, -#prompt_popup sm-button { - margin: 0; -} -#confirmation_popup .flex, -#prompt_popup .flex { - padding: 0; - margin-top: 1rem; -} -#confirmation_popup .flex sm-button:first-of-type, -#prompt_popup .flex 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; -} -.logo h4 { - text-transform: capitalize; - font-size: 0.9rem; -} -.logo .main-logo { - height: 1.4rem; - width: 1.4rem; - fill: rgba(var(--text-color), 1); - stroke: none; -} - -details summary { - display: flex; - justify-content: space-between; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; -} -details[open] > summary { - margin-bottom: 1rem; -} -details[open] > summary .icon { - transform: rotate(180deg); -} - -sm-select, -sm-option, -strip-option { - font-size: 0.9rem; -} - -strip-select { - --gap: 0; -} - -strip-option { - font-weight: 500; - --border-radius: 0.3rem; - --active-option-color: var(--accent-color); -} - -sm-checkbox { - --height: 1rem; - --width: 1rem; - -webkit-tap-highlight-color: transparent; -} - -sm-menu { - --background: var(--foreground-color); -} - -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; -} -.page-layout > *, -#preview_page > * { - grid-column: 2/3; -} - -#landing { - grid-template-rows: auto 1fr; -} -#landing header { - padding: 1.5rem 0; -} -#landing > section { - align-items: center; - text-align: center; -} -#landing h1 { - margin-top: -2ch; - font-size: clamp(2rem, 5vw, 5rem); -} -#landing p { - max-width: 100%; -} - -#sign_in, -#sign_up { - grid-template-rows: auto 1fr; - align-items: center; -} -#sign_in section, -#sign_up section { - margin-top: -6rem; - justify-self: center; - width: min(24rem, 100%); -} -#sign_in sm-form, -#sign_up sm-form { - margin: 2rem 0; -} -#sign_in header, -#sign_up header { - padding: 1.5rem 0; -} - -#sign_up .h2 { - margin-bottom: 0.5rem; -} -#sign_up .card { - margin: 1.5rem 0; -} -#sign_up h5 { - font-weight: 500; - color: rgba(var(--text-color), 0.8); -} -#sign_up .warning { - margin-top: 2rem; -} - -#loading { - place-content: center; - text-align: center; -} -#loading sm-spinner { - margin-bottom: 1.5rem; -} - -#main_header { - position: -webkit-sticky; - position: sticky; - top: 0; - display: grid; - gap: 1rem; - padding: 1rem; - align-items: center; - grid-template-columns: 1fr auto auto; - grid-column: 1/-1; - background-color: var(--foreground-color); - z-index: 2; -} - -#options_panel { - position: -webkit-sticky; - position: sticky; - top: 6.5rem; - z-index: 1; - padding: 0.5rem 1.5rem; - grid-column: 1/-1; - background-color: var(--foreground-color); - overflow-x: auto; - min-height: 3.2rem; -} - -.outline-button { - position: relative; - white-space: nowrap; - justify-content: center; - padding: 0.5rem 0; -} -.outline-button::after { - position: absolute; - content: ""; - width: 1rem; - border-radius: 0.5rem; - height: 0.2rem; - transition: transform 0.3s, opacity 0.1s; - bottom: 0; - background-color: rgba(var(--text-color), 0.5); - opacity: 0; -} -.outline-button:hover:not(.outline-button--active)::after { - opacity: 1; - background-color: rgba(var(--text-color), 0.5); -} -.outline-button:active::after { - opacity: 1; - transform: scaleX(2); -} -.outline-button--active::after { - opacity: 1; - background-color: var(--accent-color); -} - -.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 { - -ms-scroll-chaining: none; - 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; -} -#article_list_popup .popup__header { - padding: 1rem; - gap: 1rem; - padding-bottom: 0; - grid-template-columns: minmax(0, 1fr); -} - -#article_list { - grid-template-columns: repeat(auto-fill, minmax(30ch, 1fr)); -} - -.article-link { - position: relative; - padding: 1rem; - color: rgba(var(--text-color), 0.8); - font-weight: 500; - border-radius: 0.3rem; -} -.article-link::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: var(--foreground-color); -} - -#edit_sections_popup { - --body-padding: 1.2rem; -} - -#section_list_container { - gap: 0.5rem; -} - -.section-card { - font-weight: 500; - font-size: 0.9rem; -} -.section-card 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%; -} -.section-card input:focus { - outline: var(--accent-color) solid; -} -.section-card .remove { - padding: 0.3rem; -} - -#insert_section_button { - align-self: flex-start; -} - -#article_wrapper { - display: flex; - flex-direction: column; - padding: 1rem; - gap: 1rem 0; - height: 100%; - overflow-y: auto; - scroll-padding-top: 1.5rem; -} - -.heading { - font-weight: 700; -} -.heading::before { - content: ""; - width: 0.3rem; - height: 100%; - margin-right: 0.7rem; - border-radius: 0.5rem; - background-color: var(--accent-color); -} -.heading button { - margin-left: auto; -} - -.article-section { - gap: 1rem; -} -.article-section:not(:last-of-type) { - margin-bottom: 1.5rem; -} -.article-section::-webkit-scrollbar { - display: none; -} - -.content-card { - border-radius: 0.5rem; - background-color: var(--foreground-color); - box-shadow: 0 0 0 1px rgba(var(--text-color), 0.16) inset; -} -.content-card.selected { - box-shadow: 0 0 0 0.1rem var(--accent-color) inset; -} -.content-card--empty { - display: flex; - flex-direction: column; -} -.content-card--empty .content__area { - min-height: calc(60vh + 3rem); - height: 100%; - max-height: calc(60vh + 3rem); -} -.content-card .submit-entry { - border-radius: 0.2rem; - padding: 0.4rem 0.8rem; - color: var(--accent-color); -} -.content-card .submit-entry 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: 0.9rem; - 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; -} -.content__area:empty::before { - content: attr(placeholder); - opacity: 0.6; - pointer-events: none; -} -.content__area:focus-within { - outline: none; - box-shadow: 0 0 0 0.1rem var(--accent-color) inset; -} - -.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 -webkit-max-content; - grid-template-columns: auto max-content; -} -.content__author div:first-of-type { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.content__author 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); -} -.actionable-button__title { - font-size: 0.8rem; - margin-left: 0.3rem; -} - -#text_toolbar { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - position: fixed; - z-index: 10; - left: 0; - right: 0; - bottom: 0; - transition: transform 0.1s; - background-color: var(--foreground-color); - 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; -} -.formatting-button.active:hover { - background-color: var(--accent-color); -} - -.active { - background-color: var(--accent-color); -} -.active .icon { - fill: var(--foreground-color); -} - -.quote-template { - position: relative; - padding: 1rem; - margin: 1rem 0; - border-radius: 0.2rem; - border: solid thin rgba(var(--text-color), 0.3); - box-shadow: 0.1rem 0.2rem 0 0.1rem rgba(var(--text-color), 0.8); - overflow: hidden; - justify-self: center; - padding-left: 1.3rem figcaption; - padding-left-margin-top: 0.5rem; - padding-left-color: rgba(var(--text-color), 0.8); - padding-left-font-size: 0.8rem; - padding-left-margin-left: auto; -} - -#version_history_panel { - border-radius: 0.5rem; - width: min(24rem, 100%); - background-color: var(--foreground-color); - overflow-y: auto; -} -#version_history_panel > :first-child { - padding: 1rem; -} - -#version_timeline { - padding: 1rem; - height: 100%; - overflow-y: auto; -} - -.history-entry { - grid-template-columns: minmax(0, 1fr); -} -.history-entry:not(:last-of-type) { - padding-bottom: 1rem; - border-bottom: thin solid rgba(var(--text-color), 0.3); -} -.history-entry: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; -} -.entry__changes .added > *, -.entry__changes .removed > * { - background-color: transparent; -} -.entry__changes .added, -.entry__changes .added > * { - overflow-wrap: break-word; - background-color: #00e67650; -} -.entry__changes .removed, -.entry__changes .removed > * { - overflow-wrap: break-word; - color: var(--danger-color); - -webkit-text-decoration-color: var(--danger-color); - text-decoration-color: var(--danger-color); -} - -.contributor { - gap: 0.5rem; - grid-template-columns: auto 1fr; -} -.contributor .icon { - grid-row: span 2; -} -.contributor__id { - font-size: 0.8rem; - font-weight: 700; -} -.contributor__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; -} -#preview_page header { - position: -webkit-sticky; - position: sticky; - top: 0; - z-index: 1; - padding: 1.5rem 0 1rem 0; - background-color: rgba(var(--background-color), 1); -} -#preview_page h1, -#preview_page h2, -#preview_page h3, -#preview_page h4, -#preview_page h5, -#preview_page h6 { - font-weight: 400; - font-family: "Calistoga", cursive; -} -#preview_page h3 { - margin-bottom: 1rem; -} -#preview_page h3:not(:first-of-type) { - margin-top: 3rem; -} -#preview_page p { - font-size: 1rem; -} -#preview_page p * { - 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: var(--foreground-color); - 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); -} -.preview-group__buttons button { - padding: 0.5rem; -} -.preview-group__buttons button .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_name_wrapper #article_outline_button, -#selected_content_options #article_outline_button { - margin-left: auto; - } - - #article_name_wrapper { - justify-content: flex-start; - } - - .article-section { - display: flex; - -ms-scroll-snap-type: x mandatory; - scroll-snap-type: x mandatory; - overflow-x: auto; - flex-shrink: 0; - } - - .content-card { - scroll-snap-align: start; - flex-shrink: 0; - width: min(45ch, 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: auto 1fr auto auto; - } - - #options_panel { - top: 4.2rem; - } - - #main_page.active-sidebar { - grid-template-rows: auto 1fr; - grid-template-columns: minmax(0, 1fr) 24rem; - } - #main_page.active-outline { - grid-template-rows: auto 1fr; - grid-template-columns: 20rem minmax(0, 1fr); - } - #main_page.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 { - -ms-scroll-chaining: none; - 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; - } - ::-webkit-scrollbar-thumb:hover { - background: rgba(var(--text-color), 0.5); - } - - .interact, -button:not(.button--primary) { - transition: background-color 0.3s; - } - .interact:hover, -button:not(.button--primary):hover { - background-color: rgba(var(--text-color), 0.06); - } - - .button--primary { - transition: filter 0.3s; - } - .button--primary:hover { - filter: brightness(120%); - } - - .content-card:not(.selected) sm-checkbox { - opacity: 0; - transition: opacity 0.2s; - } - .content-card:hover sm-checkbox, .content-card:focus-within sm-checkbox { - opacity: 1; - } - - .preview-group__buttons { - transition: opacity 0.1s; - opacity: 0; - } - - .preview-group { - border-radius: 0.3rem; - } - .preview-group:hover { - background-color: rgba(var(--text-color), 0.06); - } - .preview-group:hover .preview-group__buttons { - opacity: 1; - } - .preview-group .preview-group__buttons:focus-within { - opacity: 1; - } +* { + 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 { + color: rgba(var(--text-color), 1); + background: rgba(var(--background-color), 1); +} +body, +body * { + --accent-color: rgb(0, 156, 78); + --text-color: 36, 36, 36; + --background-color: 248, 248, 248; + --foreground-color: rgb(255, 255, 255); + --danger-color: rgb(255, 75, 75); + --green: #1cad59; + --yellow: #f3a600; + scrollbar-width: thin; +} + +body[data-theme=dark], +body[data-theme=dark] * { + --accent-color: rgb(14, 230, 122); + --text-color: 230, 230, 230; + --text-color-light: 170, 170, 170; + --background-color: 10, 10, 10; + --foreground-color: rgb(24, 24, 24); + --danger-color: rgb(255, 106, 106); + --green: #00e676; + --yellow: #ffd13a; +} +body[data-theme=dark] sm-popup::part(popup) { + background-color: var(--foreground-color); +} + +p, +strong { + font-size: 0.9rem; + max-width: 70ch; + line-height: 1.7; + color: rgba(var(--text-color), 0.8); +} +p:not(:last-of-type), +strong:not(:last-of-type) { + margin-bottom: 1.5rem; +} + +a { + color: var(--accent-color); + text-decoration: none; + overflow: hidden; +} +a:focus-visible { + box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset; +} + +button, +.button { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + 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; +} +.button--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; +} + +a:-webkit-any-link:focus-visible { + outline: rgba(var(--text-color), 1) 0.1rem solid; +} + +a:-moz-any-link:focus-visible { + outline: rgba(var(--text-color), 1) 0.1rem solid; +} + +a:any-link:focus-visible { + outline: rgba(var(--text-color), 1) 0.1rem solid; +} + +sm-input, +sm-textarea, +tags-input { + font-size: 0.9rem; + --border-radius: 0.3rem; +} + +sm-button { + --padding: 0.5rem 0.8rem; + transition: transform 0.3s; + overflow: hidden; +} +sm-button[variant=primary] { + --padding: 0.8rem; +} +sm-button[variant=primary] .icon { + fill: rgba(var(--background-color), 1); +} +sm-button[disabled] .icon { + fill: rgba(var(--text-color), 0.6); +} +sm-button.uppercase { + letter-spacing: 0.05em; +} +sm-button.danger { + --background: var(--danger-color); + color: rgba(var(--background-color), 1); +} + +ul { + list-style: none; +} + +.hide-completely { + 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; + -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-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; +} + +.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: -webkit-max-content; + height: -moz-max-content; + height: max-content; +} +.icon-button .icon { + fill: var(--accent-color); +} + +#confirmation_popup, +#prompt_popup { + flex-direction: column; +} +#confirmation_popup h4, +#prompt_popup h4 { + font-weight: 500; + margin-bottom: 0.5rem; +} +#confirmation_popup sm-button, +#prompt_popup sm-button { + margin: 0; +} +#confirmation_popup .flex, +#prompt_popup .flex { + padding: 0; + margin-top: 1rem; +} +#confirmation_popup .flex sm-button:first-of-type, +#prompt_popup .flex 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; +} +.logo h4 { + text-transform: capitalize; + font-size: 0.9rem; +} +.logo .main-logo { + height: 1.4rem; + width: 1.4rem; + fill: rgba(var(--text-color), 1); + stroke: none; +} + +details summary { + display: flex; + justify-content: space-between; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; +} +details[open] > summary { + margin-bottom: 1rem; +} +details[open] > summary .icon { + transform: rotate(180deg); +} + +sm-select, +sm-option, +strip-option { + font-size: 0.9rem; +} + +strip-select { + --gap: 0; +} + +strip-option { + font-weight: 500; + --border-radius: 0.3rem; + --active-option-color: var(--accent-color); +} + +sm-checkbox { + --height: 1rem; + --width: 1rem; + -webkit-tap-highlight-color: transparent; +} + +sm-menu { + --background: var(--foreground-color); +} + +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; +} +.page-layout > *, +#preview_page > * { + grid-column: 2/3; +} + +#landing { + grid-template-rows: auto 1fr; +} +#landing header { + padding: 1.5rem 0; +} +#landing > section { + align-items: center; + text-align: center; +} +#landing h1 { + margin-top: -2ch; + font-size: clamp(2rem, 5vw, 5rem); +} +#landing p { + max-width: 100%; +} + +#sign_in, +#sign_up { + grid-template-rows: auto 1fr; + align-items: center; +} +#sign_in section, +#sign_up section { + margin-top: -6rem; + justify-self: center; + width: min(24rem, 100%); +} +#sign_in sm-form, +#sign_up sm-form { + margin: 2rem 0; +} +#sign_in header, +#sign_up header { + padding: 1.5rem 0; +} + +#sign_up .h2 { + margin-bottom: 0.5rem; +} +#sign_up .card { + margin: 1.5rem 0; +} +#sign_up h5 { + font-weight: 500; + color: rgba(var(--text-color), 0.8); +} +#sign_up .warning { + margin-top: 2rem; +} + +#loading { + place-content: center; + text-align: center; +} +#loading sm-spinner { + margin-bottom: 1.5rem; +} + +#main_header { + position: -webkit-sticky; + position: sticky; + top: 0; + display: grid; + gap: 1rem; + padding: 1rem; + align-items: center; + grid-template-columns: 1fr auto; + grid-column: 1/-1; + background-color: var(--foreground-color); + z-index: 2; +} + +#options_panel { + position: -webkit-sticky; + position: sticky; + top: 6.5rem; + z-index: 1; + padding: 0.5rem 1.5rem; + grid-column: 1/-1; + background-color: var(--foreground-color); + overflow-x: auto; + min-height: 3.2rem; +} + +.outline-button { + position: relative; + white-space: nowrap; + justify-content: center; + padding: 0.5rem 0; +} +.outline-button::after { + position: absolute; + content: ""; + width: 1rem; + border-radius: 0.5rem; + height: 0.2rem; + transition: transform 0.3s, opacity 0.1s; + bottom: 0; + background-color: rgba(var(--text-color), 0.5); + opacity: 0; +} +.outline-button:hover:not(.outline-button--active)::after { + opacity: 1; + background-color: rgba(var(--text-color), 0.5); +} +.outline-button:active::after { + opacity: 1; + transform: scaleX(2); +} +.outline-button--active::after { + opacity: 1; + background-color: var(--accent-color); +} + +.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 { + -ms-scroll-chaining: none; + 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; +} +#article_list_popup .popup__header { + padding: 1rem; + gap: 1rem; + padding-bottom: 0; + grid-template-columns: minmax(0, 1fr); +} + +#article_list { + grid-template-columns: repeat(auto-fill, minmax(30ch, 1fr)); +} + +.article-link { + position: relative; + padding: 1rem; + color: rgba(var(--text-color), 0.8); + font-weight: 500; + border-radius: 0.3rem; +} +.article-link::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: var(--foreground-color); +} + +#edit_sections_popup { + --body-padding: 1.2rem; +} + +#section_list_container { + gap: 0.5rem; +} + +.section-card { + font-weight: 500; + font-size: 0.9rem; +} +.section-card 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%; +} +.section-card input:focus { + outline: var(--accent-color) solid; +} +.section-card .remove { + padding: 0.3rem; +} + +#insert_section_button { + align-self: flex-start; +} + +#article_wrapper { + display: flex; + flex-direction: column; + padding: 1rem; + gap: 1rem 0; + height: 100%; + overflow-y: auto; + scroll-padding-top: 1.5rem; +} + +.heading { + font-weight: 700; +} +.heading::before { + content: ""; + width: 0.3rem; + height: 100%; + margin-right: 0.7rem; + border-radius: 0.5rem; + background-color: var(--accent-color); +} +.heading button { + margin-left: auto; +} + +.article-section { + gap: 1rem; +} +.article-section:not(:last-of-type) { + margin-bottom: 1.5rem; +} +.article-section::-webkit-scrollbar { + display: none; +} + +.content-card { + border-radius: 0.5rem; + background-color: var(--foreground-color); + box-shadow: 0 0 0 1px rgba(var(--text-color), 0.16) inset; +} +.content-card.selected { + box-shadow: 0 0 0 0.1rem var(--accent-color) inset; +} +.content-card--empty { + display: flex; + flex-direction: column; +} +.content-card--empty .content__area { + min-height: calc(60vh + 3rem); + height: 100%; + max-height: calc(60vh + 3rem); +} +.content-card .submit-entry { + border-radius: 0.2rem; + padding: 0.4rem 0.8rem; + color: var(--accent-color); +} +.content-card .submit-entry 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: 0.9rem; + 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; +} +.content__area:empty::before { + content: attr(placeholder); + opacity: 0.6; + pointer-events: none; +} +.content__area:focus-within { + outline: none; + box-shadow: 0 0 0 0.1rem var(--accent-color) inset; +} + +.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 -webkit-max-content; + grid-template-columns: auto max-content; +} +.content__author div:first-of-type { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.content__author 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); +} +.actionable-button__title { + font-size: 0.8rem; + margin-left: 0.3rem; +} + +#text_toolbar { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + position: fixed; + z-index: 10; + left: 0; + right: 0; + bottom: 0; + transition: transform 0.1s; + background-color: var(--foreground-color); + 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; +} +.formatting-button.active:hover { + background-color: var(--accent-color); +} + +.active { + background-color: var(--accent-color); +} +.active .icon { + fill: var(--foreground-color); +} + +.quote-template { + position: relative; + padding: 1rem; + margin: 1rem 0; + border-radius: 0.2rem; + border: solid thin rgba(var(--text-color), 0.3); + box-shadow: 0.1rem 0.2rem 0 0.1rem rgba(var(--text-color), 0.8); + overflow: hidden; + justify-self: center; + padding-left: 1.3rem figcaption; + padding-left-margin-top: 0.5rem; + padding-left-color: rgba(var(--text-color), 0.8); + padding-left-font-size: 0.8rem; + padding-left-margin-left: auto; +} + +#version_history_panel { + border-radius: 0.5rem; + width: min(24rem, 100%); + background-color: var(--foreground-color); + overflow-y: auto; +} +#version_history_panel > :first-child { + padding: 1rem; +} + +#version_timeline { + padding: 1rem; + height: 100%; + overflow-y: auto; +} + +.history-entry { + grid-template-columns: minmax(0, 1fr); +} +.history-entry:not(:last-of-type) { + padding-bottom: 1rem; + border-bottom: thin solid rgba(var(--text-color), 0.3); +} +.history-entry: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; +} +.entry__changes .added > *, +.entry__changes .removed > * { + background-color: transparent; +} +.entry__changes .added, +.entry__changes .added > * { + overflow-wrap: break-word; + background-color: #00e67650; +} +.entry__changes .removed, +.entry__changes .removed > * { + overflow-wrap: break-word; + color: var(--danger-color); + -webkit-text-decoration-color: var(--danger-color); + text-decoration-color: var(--danger-color); +} + +.contributor { + gap: 0.5rem; + grid-template-columns: auto 1fr; +} +.contributor .icon { + grid-row: span 2; +} +.contributor__id { + font-size: 0.8rem; + font-weight: 700; +} +.contributor__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; +} +#preview_page header { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1; + padding: 1.5rem 0 1rem 0; + background-color: rgba(var(--background-color), 1); +} +#preview_page h1, +#preview_page h2, +#preview_page h3, +#preview_page h4, +#preview_page h5, +#preview_page h6 { + font-weight: 400; + font-family: "Calistoga", cursive; +} +#preview_page h3 { + margin-bottom: 1rem; +} +#preview_page h3:not(:first-of-type) { + margin-top: 3rem; +} +#preview_page p { + font-size: 1rem; +} +#preview_page p * { + 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: var(--foreground-color); + 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); +} +.preview-group__buttons button { + padding: 0.5rem; +} +.preview-group__buttons button .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_name_wrapper #article_outline_button, +#selected_content_options #article_outline_button { + margin-left: auto; + } + + #article_name_wrapper { + justify-content: flex-start; + } + + .article-section { + display: flex; + -ms-scroll-snap-type: x mandatory; + scroll-snap-type: x mandatory; + overflow-x: auto; + flex-shrink: 0; + } + + .content-card { + scroll-snap-align: start; + flex-shrink: 0; + width: min(45ch, 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; + } + #main_page.active-outline { + grid-template-rows: auto 1fr; + grid-template-columns: 20rem minmax(0, 1fr); + } + #main_page.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 { + -ms-scroll-chaining: none; + 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; + } + ::-webkit-scrollbar-thumb:hover { + background: rgba(var(--text-color), 0.5); + } + + .interact, +button:not(.button--primary) { + transition: background-color 0.3s; + } + .interact:hover, +button:not(.button--primary):hover { + background-color: rgba(var(--text-color), 0.06); + } + + .button--primary { + transition: filter 0.3s; + } + .button--primary:hover { + filter: brightness(120%); + } + + .content-card:not(.selected) sm-checkbox { + opacity: 0; + transition: opacity 0.2s; + } + .content-card:hover sm-checkbox, .content-card:focus-within sm-checkbox { + opacity: 1; + } + + .preview-group__buttons { + transition: opacity 0.1s; + opacity: 0; + } + + .preview-group { + border-radius: 0.3rem; + } + .preview-group:hover { + background-color: rgba(var(--text-color), 0.06); + } + .preview-group:hover .preview-group__buttons { + opacity: 1; + } + .preview-group .preview-group__buttons:focus-within { + opacity: 1; + } } \ No newline at end of file diff --git a/css/main.min.css b/css/main.min.css index 68a6b0a..3fb14d9 100644 --- a/css/main.min.css +++ b/css/main.min.css @@ -1 +1 @@ -*{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{color:rgba(var(--text-color), 1);background:rgba(var(--background-color), 1)}body,body *{--accent-color: rgb(0, 156, 78);--text-color: 36, 36, 36;--background-color: 248, 248, 248;--foreground-color: rgb(255, 255, 255);--danger-color: rgb(255, 75, 75);--green: #1cad59;--yellow: #f3a600;scrollbar-width:thin}body[data-theme=dark],body[data-theme=dark] *{--accent-color: rgb(14, 230, 122);--text-color: 230, 230, 230;--text-color-light: 170, 170, 170;--background-color: 10, 10, 10;--foreground-color: rgb(24, 24, 24);--danger-color: rgb(255, 106, 106);--green: #00e676;--yellow: #ffd13a}body[data-theme=dark] sm-popup::part(popup){background-color:var(--foreground-color)}p,strong{font-size:.9rem;max-width:70ch;line-height:1.7;color:rgba(var(--text-color), 0.8)}p:not(:last-of-type),strong:not(:last-of-type){margin-bottom:1.5rem}a{color:var(--accent-color);text-decoration:none;overflow:hidden}a:focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}button,.button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:transparent;overflow:hidden;color:inherit;cursor:pointer;transition:transform .3s;-webkit-tap-highlight-color:transparent;align-items:center;font-size:.9rem;font-weight:500;overflow:hidden}.button{white-space:nowrap;padding:.5rem .8rem;border-radius:.3rem;background-color:rgba(var(--text-color), 0.06);color:rgba(var(--text-color), 0.8);justify-content:center}.button--primary{background-color:var(--accent-color);color:rgba(var(--background-color), 1)}.icon-only{padding:.5rem;border-radius:.3rem}button:disabled{opacity:.5}a:-webkit-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:-moz-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}sm-input,sm-textarea,tags-input{font-size:.9rem;--border-radius: 0.3rem}sm-button{--padding: 0.5rem 0.8rem;transition:transform .3s;overflow:hidden}sm-button[variant=primary]{--padding: 0.8rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}sm-button.uppercase{letter-spacing:.05em}sm-button.danger{--background: var(--danger-color);color:rgba(var(--background-color), 1)}ul{list-style:none}.hide-completely{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;-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:.9rem}.h5{font-size:.8rem}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.flex{display:flex}.grid{display:grid}.flow-column{grid-auto-flow:column}.gap-0-5{gap:.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}.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}.button__icon{height:1.2rem;width:1.2rem}.button__icon--left{margin-right:.5rem}.button__icon--right{margin-left:.5rem}.icon-button{padding:.6rem;border-radius:.8rem;background-color:rgba(var(--text-color), 0.1);height:-webkit-max-content;height:-moz-max-content;height:max-content}.icon-button .icon{fill:var(--accent-color)}#confirmation_popup,#prompt_popup{flex-direction:column}#confirmation_popup h4,#prompt_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button,#prompt_popup sm-button{margin:0}#confirmation_popup .flex,#prompt_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type,#prompt_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}#prompt_message{margin-bottom:1.5rem}.popup__header{display:grid;gap:.5rem;width:100%;padding:0 1.5rem 0 .5rem;align-items:center;grid-template-columns:auto 1fr auto}.popup__header__close{padding:.5rem;cursor:pointer}.logo{display:grid;align-items:center;width:100%;grid-template-columns:auto 1fr;gap:0 .3rem}.logo h4{text-transform:capitalize;font-size:.9rem}.logo .main-logo{height:1.4rem;width:1.4rem;fill:rgba(var(--text-color), 1);stroke:none}details summary{display:flex;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}details[open]>summary{margin-bottom:1rem}details[open]>summary .icon{transform:rotate(180deg)}sm-select,sm-option,strip-option{font-size:.9rem}strip-select{--gap: 0}strip-option{font-weight:500;--border-radius: 0.3rem;--active-option-color: var(--accent-color)}sm-checkbox{--height: 1rem;--width: 1rem;-webkit-tap-highlight-color:transparent}sm-menu{--background: var(--foreground-color)}menu-option{font-size:.9rem}sm-copy{font-size:.9rem;--button-border-radius: 0.2rem}.warning{background-color:khaki;color:rgba(0,0,0,.7);padding:1rem;border-radius:.5rem;line-height:1.5}.page{height:100%}.page-layout,#preview_page{display:grid;grid-template-columns:1rem minmax(0, 1fr) 1rem}.page-layout>*,#preview_page>*{grid-column:2/3}#landing{grid-template-rows:auto 1fr}#landing header{padding:1.5rem 0}#landing>section{align-items:center;text-align:center}#landing h1{margin-top:-2ch;font-size:clamp(2rem,5vw,5rem)}#landing p{max-width:100%}#sign_in,#sign_up{grid-template-rows:auto 1fr;align-items:center}#sign_in section,#sign_up section{margin-top:-6rem;justify-self:center;width:min(24rem,100%)}#sign_in sm-form,#sign_up sm-form{margin:2rem 0}#sign_in header,#sign_up header{padding:1.5rem 0}#sign_up .h2{margin-bottom:.5rem}#sign_up .card{margin:1.5rem 0}#sign_up h5{font-weight:500;color:rgba(var(--text-color), 0.8)}#sign_up .warning{margin-top:2rem}#loading{place-content:center;text-align:center}#loading sm-spinner{margin-bottom:1.5rem}#main_header{position:-webkit-sticky;position:sticky;top:0;display:grid;gap:1rem;padding:1rem;align-items:center;grid-template-columns:1fr auto auto;grid-column:1/-1;background-color:var(--foreground-color);z-index:2}#options_panel{position:-webkit-sticky;position:sticky;top:6.5rem;z-index:1;padding:.5rem 1.5rem;grid-column:1/-1;background-color:var(--foreground-color);overflow-x:auto;min-height:3.2rem}.outline-button{position:relative;white-space:nowrap;justify-content:center;padding:.5rem 0}.outline-button::after{position:absolute;content:"";width:1rem;border-radius:.5rem;height:.2rem;transition:transform .3s,opacity .1s;bottom:0;background-color:rgba(var(--text-color), 0.5);opacity:0}.outline-button:hover:not(.outline-button--active)::after{opacity:1;background-color:rgba(var(--text-color), 0.5)}.outline-button:active::after{opacity:1;transform:scaleX(2)}.outline-button--active::after{opacity:1;background-color:var(--accent-color)}.label{font-size:.8rem;color:rgba(var(--text-color), 0.8);margin-bottom:.2rem}.icon--success{fill:var(--green)}.icon--failure,.icon--error{fill:var(--danger-color)}#main_page{-ms-scroll-chaining:none;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}#article_list_popup .popup__header{padding:1rem;gap:1rem;padding-bottom:0;grid-template-columns:minmax(0, 1fr)}#article_list{grid-template-columns:repeat(auto-fill, minmax(30ch, 1fr))}.article-link{position:relative;padding:1rem;color:rgba(var(--text-color), 0.8);font-weight:500;border-radius:.3rem}.article-link::first-letter{text-transform:uppercase}.default-article::before{content:"";font-size:.7rem;background-color:var(--accent-color);height:2em;width:.3em;border-radius:.5rem;font-weight:500;margin-right:.5rem;align-self:center;color:var(--foreground-color)}#edit_sections_popup{--body-padding: 1.2rem}#section_list_container{gap:.5rem}.section-card{font-weight:500;font-size:.9rem}.section-card input{background-color:rgba(var(--text-color), 0.06);padding:.8rem;border-radius:.3rem;border:none;font-size:inherit;color:inherit;font-weight:inherit;width:100%}.section-card input:focus{outline:var(--accent-color) solid}.section-card .remove{padding:.3rem}#insert_section_button{align-self:flex-start}#article_wrapper{display:flex;flex-direction:column;padding:1rem;gap:1rem 0;height:100%;overflow-y:auto;scroll-padding-top:1.5rem}.heading{font-weight:700}.heading::before{content:"";width:.3rem;height:100%;margin-right:.7rem;border-radius:.5rem;background-color:var(--accent-color)}.heading button{margin-left:auto}.article-section{gap:1rem}.article-section:not(:last-of-type){margin-bottom:1.5rem}.article-section::-webkit-scrollbar{display:none}.content-card{border-radius:.5rem;background-color:var(--foreground-color);box-shadow:0 0 0 1px rgba(var(--text-color), 0.16) inset}.content-card.selected{box-shadow:0 0 0 .1rem var(--accent-color) inset}.content-card--empty{display:flex;flex-direction:column}.content-card--empty .content__area{min-height:calc(60vh + 3rem);height:100%;max-height:calc(60vh + 3rem)}.content-card .submit-entry{border-radius:.2rem;padding:.4rem .8rem;color:var(--accent-color)}.content-card .submit-entry sm-spinner{--height: 0.8rem;--width: 0.8rem}.content__header{padding:.5rem}.content__area{border-radius:inherit;padding:1rem;white-space:pre-line;font-size:.9rem;line-height:1.7;color:rgba(var(--text-color), 0.8);background-color:rgba(var(--text-color), 0.02);border-radius:.5rem;transition:box-shadow .1s;height:60vh;overflow-y:auto}.content__area:empty::before{content:attr(placeholder);opacity:.6;pointer-events:none}.content__area:focus-within{outline:none;box-shadow:0 0 0 .1rem var(--accent-color) inset}.content__options{gap:.5rem;padding:.5rem 1rem;grid-template-columns:auto auto 1fr auto}.content__contributors{font-size:.7rem;background-color:rgba(var(--text-color), 0.06);border-radius:.3rem;padding:.2rem .3rem;color:rgba(var(--text-color), 0.8);margin-right:.5rem}.content__author{display:grid;gap:.3rem;grid-template-columns:auto -webkit-max-content;grid-template-columns:auto max-content}.content__author div:first-of-type{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.content__author div:last-of-type{flex:1}.content__score{font-size:.8rem;margin-left:.2rem;line-height:100%}.score-button--filled .icon{fill:var(--yellow)}.actionable-button{padding:.5rem .8rem;background-color:rgba(var(--text-color), 0.1);border-radius:2rem;border:solid thin rgba(var(--text-color), 0.3)}.actionable-button__title{font-size:.8rem;margin-left:.3rem}#text_toolbar{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;z-index:10;left:0;right:0;bottom:0;transition:transform .1s;background-color:var(--foreground-color);border:solid thin rgba(var(--text-color), 0.2);padding:.2rem;border-radius:.3rem;box-shadow:0 .1rem .2rem rgba(0,0,0,.06),0 1rem 1.5rem -0.5rem rgba(0,0,0,.2)}.formatting-button{padding:.3rem;border-radius:.3rem;transition:background-color .1s}.formatting-button.active:hover{background-color:var(--accent-color)}.active{background-color:var(--accent-color)}.active .icon{fill:var(--foreground-color)}.quote-template{position:relative;padding:1rem;margin:1rem 0;border-radius:.2rem;border:solid thin rgba(var(--text-color), 0.3);box-shadow:.1rem .2rem 0 .1rem rgba(var(--text-color), 0.8);overflow:hidden;justify-self:center;padding-left:1.3rem figcaption;padding-left-margin-top:.5rem;padding-left-color:rgba(var(--text-color), 0.8);padding-left-font-size:.8rem;padding-left-margin-left:auto}#version_history_panel{border-radius:.5rem;width:min(24rem,100%);background-color:var(--foreground-color);overflow-y:auto}#version_history_panel>:first-child{padding:1rem}#version_timeline{padding:1rem;height:100%;overflow-y:auto}.history-entry{grid-template-columns:minmax(0, 1fr)}.history-entry:not(:last-of-type){padding-bottom:1rem;border-bottom:thin solid rgba(var(--text-color), 0.3)}.history-entry:last-of-type::before{content:"CREATED";letter-spacing:.03em;display:inline-flex;justify-self:flex-start;font-weight:500;padding:.2rem .3rem;font-size:.7rem;border-radius:.2rem;border:solid thin rgba(var(--text-color), 0.5)}.entry__time,.entry__author{font-size:.8rem;font-weight:500}.entry__changes{font-size:.9rem;line-height:1.7;color:rgba(var(--text-color), 0.8);overflow-wrap:break-word;white-space:pre-line;}.entry__changes .added>*,.entry__changes .removed>*{background-color:transparent}.entry__changes .added,.entry__changes .added>*{overflow-wrap:break-word;background-color:#00e67650}.entry__changes .removed,.entry__changes .removed>*{overflow-wrap:break-word;color:var(--danger-color);-webkit-text-decoration-color:var(--danger-color);text-decoration-color:var(--danger-color)}.contributor{gap:.5rem;grid-template-columns:auto 1fr}.contributor .icon{grid-row:span 2}.contributor__id{font-size:.8rem;font-weight:700}.contributor__time{font-size:.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}#preview_page header{position:-webkit-sticky;position:sticky;top:0;z-index:1;padding:1.5rem 0 1rem 0;background-color:rgba(var(--background-color), 1)}#preview_page h1,#preview_page h2,#preview_page h3,#preview_page h4,#preview_page h5,#preview_page h6{font-weight:400;font-family:"Calistoga",cursive}#preview_page h3{margin-bottom:1rem}#preview_page h3:not(:first-of-type){margin-top:3rem}#preview_page p{font-size:1rem}#preview_page p *{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:var(--foreground-color);border:solid thin rgba(var(--text-color), 0.2);padding:.2rem;border-radius:.3rem;box-shadow:0 .1rem .2rem rgba(0,0,0,.06),0 1rem 1.5rem -0.5rem rgba(0,0,0,.2)}.preview-group__buttons button{padding:.5rem}.preview-group__buttons button .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_name_wrapper #article_outline_button,#selected_content_options #article_outline_button{margin-left:auto}#article_name_wrapper{justify-content:flex-start}.article-section{display:flex;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:auto;flex-shrink:0}.content-card{scroll-snap-align:start;flex-shrink:0;width:min(45ch,100% - 2rem)}.formatting-button{padding:.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 .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:auto 1fr auto auto}#options_panel{top:4.2rem}#main_page.active-sidebar{grid-template-rows:auto 1fr;grid-template-columns:minmax(0, 1fr) 24rem}#main_page.active-outline{grid-template-rows:auto 1fr;grid-template-columns:20rem minmax(0, 1fr)}#main_page.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{-ms-scroll-chaining:none;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:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background:rgba(var(--text-color), 0.3);border-radius:1rem}::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-color), 0.5)}.interact,button:not(.button--primary){transition:background-color .3s}.interact:hover,button:not(.button--primary):hover{background-color:rgba(var(--text-color), 0.06)}.button--primary{transition:filter .3s}.button--primary:hover{filter:brightness(120%)}.content-card:not(.selected) sm-checkbox{opacity:0;transition:opacity .2s}.content-card:hover sm-checkbox,.content-card:focus-within sm-checkbox{opacity:1}.preview-group__buttons{transition:opacity .1s;opacity:0}.preview-group{border-radius:.3rem}.preview-group:hover{background-color:rgba(var(--text-color), 0.06)}.preview-group:hover .preview-group__buttons{opacity:1}.preview-group .preview-group__buttons:focus-within{opacity:1}} \ No newline at end of file +*{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{color:rgba(var(--text-color), 1);background:rgba(var(--background-color), 1)}body,body *{--accent-color: rgb(0, 156, 78);--text-color: 36, 36, 36;--background-color: 248, 248, 248;--foreground-color: rgb(255, 255, 255);--danger-color: rgb(255, 75, 75);--green: #1cad59;--yellow: #f3a600;scrollbar-width:thin}body[data-theme=dark],body[data-theme=dark] *{--accent-color: rgb(14, 230, 122);--text-color: 230, 230, 230;--text-color-light: 170, 170, 170;--background-color: 10, 10, 10;--foreground-color: rgb(24, 24, 24);--danger-color: rgb(255, 106, 106);--green: #00e676;--yellow: #ffd13a}body[data-theme=dark] sm-popup::part(popup){background-color:var(--foreground-color)}p,strong{font-size:.9rem;max-width:70ch;line-height:1.7;color:rgba(var(--text-color), 0.8)}p:not(:last-of-type),strong:not(:last-of-type){margin-bottom:1.5rem}a{color:var(--accent-color);text-decoration:none;overflow:hidden}a:focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}button,.button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:transparent;overflow:hidden;color:inherit;cursor:pointer;transition:transform .3s;-webkit-tap-highlight-color:transparent;align-items:center;font-size:.9rem;font-weight:500;overflow:hidden}.button{white-space:nowrap;padding:.5rem .8rem;border-radius:.3rem;background-color:rgba(var(--text-color), 0.06);color:rgba(var(--text-color), 0.8);justify-content:center}.button--primary{background-color:var(--accent-color);color:rgba(var(--background-color), 1)}.icon-only{padding:.5rem;border-radius:.3rem}button:disabled{opacity:.5}a:-webkit-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:-moz-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}sm-input,sm-textarea,tags-input{font-size:.9rem;--border-radius: 0.3rem}sm-button{--padding: 0.5rem 0.8rem;transition:transform .3s;overflow:hidden}sm-button[variant=primary]{--padding: 0.8rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}sm-button.uppercase{letter-spacing:.05em}sm-button.danger{--background: var(--danger-color);color:rgba(var(--background-color), 1)}ul{list-style:none}.hide-completely{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;-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:.9rem}.h5{font-size:.8rem}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.flex{display:flex}.grid{display:grid}.flow-column{grid-auto-flow:column}.gap-0-5{gap:.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}.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:.5rem}.margin-left-0-5{margin-left:.5rem}.margin-left-auto{margin-left:auto}.margin-bottom-0-5{margin-bottom:.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:.6rem;border-radius:.8rem;background-color:rgba(var(--text-color), 0.1);height:-webkit-max-content;height:-moz-max-content;height:max-content}.icon-button .icon{fill:var(--accent-color)}#confirmation_popup,#prompt_popup{flex-direction:column}#confirmation_popup h4,#prompt_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button,#prompt_popup sm-button{margin:0}#confirmation_popup .flex,#prompt_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type,#prompt_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}#prompt_message{margin-bottom:1.5rem}.popup__header{display:grid;gap:.5rem;width:100%;padding:0 1.5rem 0 .5rem;align-items:center;grid-template-columns:auto 1fr auto}.popup__header__close{padding:.5rem;cursor:pointer}.logo{display:grid;align-items:center;width:100%;grid-template-columns:auto 1fr;gap:0 .3rem}.logo h4{text-transform:capitalize;font-size:.9rem}.logo .main-logo{height:1.4rem;width:1.4rem;fill:rgba(var(--text-color), 1);stroke:none}details summary{display:flex;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}details[open]>summary{margin-bottom:1rem}details[open]>summary .icon{transform:rotate(180deg)}sm-select,sm-option,strip-option{font-size:.9rem}strip-select{--gap: 0}strip-option{font-weight:500;--border-radius: 0.3rem;--active-option-color: var(--accent-color)}sm-checkbox{--height: 1rem;--width: 1rem;-webkit-tap-highlight-color:transparent}sm-menu{--background: var(--foreground-color)}menu-option{font-size:.9rem}sm-copy{font-size:.9rem;--button-border-radius: 0.2rem}.warning{background-color:khaki;color:rgba(0,0,0,.7);padding:1rem;border-radius:.5rem;line-height:1.5}.page{height:100%}.page-layout,#preview_page{display:grid;grid-template-columns:1rem minmax(0, 1fr) 1rem}.page-layout>*,#preview_page>*{grid-column:2/3}#landing{grid-template-rows:auto 1fr}#landing header{padding:1.5rem 0}#landing>section{align-items:center;text-align:center}#landing h1{margin-top:-2ch;font-size:clamp(2rem,5vw,5rem)}#landing p{max-width:100%}#sign_in,#sign_up{grid-template-rows:auto 1fr;align-items:center}#sign_in section,#sign_up section{margin-top:-6rem;justify-self:center;width:min(24rem,100%)}#sign_in sm-form,#sign_up sm-form{margin:2rem 0}#sign_in header,#sign_up header{padding:1.5rem 0}#sign_up .h2{margin-bottom:.5rem}#sign_up .card{margin:1.5rem 0}#sign_up h5{font-weight:500;color:rgba(var(--text-color), 0.8)}#sign_up .warning{margin-top:2rem}#loading{place-content:center;text-align:center}#loading sm-spinner{margin-bottom:1.5rem}#main_header{position:-webkit-sticky;position:sticky;top:0;display:grid;gap:1rem;padding:1rem;align-items:center;grid-template-columns:1fr auto;grid-column:1/-1;background-color:var(--foreground-color);z-index:2}#options_panel{position:-webkit-sticky;position:sticky;top:6.5rem;z-index:1;padding:.5rem 1.5rem;grid-column:1/-1;background-color:var(--foreground-color);overflow-x:auto;min-height:3.2rem}.outline-button{position:relative;white-space:nowrap;justify-content:center;padding:.5rem 0}.outline-button::after{position:absolute;content:"";width:1rem;border-radius:.5rem;height:.2rem;transition:transform .3s,opacity .1s;bottom:0;background-color:rgba(var(--text-color), 0.5);opacity:0}.outline-button:hover:not(.outline-button--active)::after{opacity:1;background-color:rgba(var(--text-color), 0.5)}.outline-button:active::after{opacity:1;transform:scaleX(2)}.outline-button--active::after{opacity:1;background-color:var(--accent-color)}.label{font-size:.8rem;color:rgba(var(--text-color), 0.8);margin-bottom:.2rem}.icon--success{fill:var(--green)}.icon--failure,.icon--error{fill:var(--danger-color)}#main_page{-ms-scroll-chaining:none;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}#article_list_popup .popup__header{padding:1rem;gap:1rem;padding-bottom:0;grid-template-columns:minmax(0, 1fr)}#article_list{grid-template-columns:repeat(auto-fill, minmax(30ch, 1fr))}.article-link{position:relative;padding:1rem;color:rgba(var(--text-color), 0.8);font-weight:500;border-radius:.3rem}.article-link::first-letter{text-transform:uppercase}.default-article::before{content:"";font-size:.7rem;background-color:var(--accent-color);height:2em;width:.3em;border-radius:.5rem;font-weight:500;margin-right:.5rem;align-self:center;color:var(--foreground-color)}#edit_sections_popup{--body-padding: 1.2rem}#section_list_container{gap:.5rem}.section-card{font-weight:500;font-size:.9rem}.section-card input{background-color:rgba(var(--text-color), 0.06);padding:.8rem;border-radius:.3rem;border:none;font-size:inherit;color:inherit;font-weight:inherit;width:100%}.section-card input:focus{outline:var(--accent-color) solid}.section-card .remove{padding:.3rem}#insert_section_button{align-self:flex-start}#article_wrapper{display:flex;flex-direction:column;padding:1rem;gap:1rem 0;height:100%;overflow-y:auto;scroll-padding-top:1.5rem}.heading{font-weight:700}.heading::before{content:"";width:.3rem;height:100%;margin-right:.7rem;border-radius:.5rem;background-color:var(--accent-color)}.heading button{margin-left:auto}.article-section{gap:1rem}.article-section:not(:last-of-type){margin-bottom:1.5rem}.article-section::-webkit-scrollbar{display:none}.content-card{border-radius:.5rem;background-color:var(--foreground-color);box-shadow:0 0 0 1px rgba(var(--text-color), 0.16) inset}.content-card.selected{box-shadow:0 0 0 .1rem var(--accent-color) inset}.content-card--empty{display:flex;flex-direction:column}.content-card--empty .content__area{min-height:calc(60vh + 3rem);height:100%;max-height:calc(60vh + 3rem)}.content-card .submit-entry{border-radius:.2rem;padding:.4rem .8rem;color:var(--accent-color)}.content-card .submit-entry sm-spinner{--height: 0.8rem;--width: 0.8rem}.content__header{padding:.5rem}.content__area{border-radius:inherit;padding:1rem;white-space:pre-line;font-size:.9rem;line-height:1.7;color:rgba(var(--text-color), 0.8);background-color:rgba(var(--text-color), 0.02);border-radius:.5rem;transition:box-shadow .1s;height:60vh;overflow-y:auto}.content__area:empty::before{content:attr(placeholder);opacity:.6;pointer-events:none}.content__area:focus-within{outline:none;box-shadow:0 0 0 .1rem var(--accent-color) inset}.content__options{gap:.5rem;padding:.5rem 1rem;grid-template-columns:auto auto 1fr auto}.content__contributors{font-size:.7rem;background-color:rgba(var(--text-color), 0.06);border-radius:.3rem;padding:.2rem .3rem;color:rgba(var(--text-color), 0.8);margin-right:.5rem}.content__author{display:grid;gap:.3rem;grid-template-columns:auto -webkit-max-content;grid-template-columns:auto max-content}.content__author div:first-of-type{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.content__author div:last-of-type{flex:1}.content__score{font-size:.8rem;margin-left:.2rem;line-height:100%}.score-button--filled .icon{fill:var(--yellow)}.actionable-button{padding:.5rem .8rem;background-color:rgba(var(--text-color), 0.1);border-radius:2rem;border:solid thin rgba(var(--text-color), 0.3)}.actionable-button__title{font-size:.8rem;margin-left:.3rem}#text_toolbar{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;z-index:10;left:0;right:0;bottom:0;transition:transform .1s;background-color:var(--foreground-color);border:solid thin rgba(var(--text-color), 0.2);padding:.2rem;border-radius:.3rem;box-shadow:0 .1rem .2rem rgba(0,0,0,.06),0 1rem 1.5rem -0.5rem rgba(0,0,0,.2)}.formatting-button{padding:.3rem;border-radius:.3rem;transition:background-color .1s}.formatting-button.active:hover{background-color:var(--accent-color)}.active{background-color:var(--accent-color)}.active .icon{fill:var(--foreground-color)}.quote-template{position:relative;padding:1rem;margin:1rem 0;border-radius:.2rem;border:solid thin rgba(var(--text-color), 0.3);box-shadow:.1rem .2rem 0 .1rem rgba(var(--text-color), 0.8);overflow:hidden;justify-self:center;padding-left:1.3rem figcaption;padding-left-margin-top:.5rem;padding-left-color:rgba(var(--text-color), 0.8);padding-left-font-size:.8rem;padding-left-margin-left:auto}#version_history_panel{border-radius:.5rem;width:min(24rem,100%);background-color:var(--foreground-color);overflow-y:auto}#version_history_panel>:first-child{padding:1rem}#version_timeline{padding:1rem;height:100%;overflow-y:auto}.history-entry{grid-template-columns:minmax(0, 1fr)}.history-entry:not(:last-of-type){padding-bottom:1rem;border-bottom:thin solid rgba(var(--text-color), 0.3)}.history-entry:last-of-type::before{content:"CREATED";letter-spacing:.03em;display:inline-flex;justify-self:flex-start;font-weight:500;padding:.2rem .3rem;font-size:.7rem;border-radius:.2rem;border:solid thin rgba(var(--text-color), 0.5)}.entry__time,.entry__author{font-size:.8rem;font-weight:500}.entry__changes{font-size:.9rem;line-height:1.7;color:rgba(var(--text-color), 0.8);overflow-wrap:break-word;white-space:pre-line}.entry__changes .added>*,.entry__changes .removed>*{background-color:transparent}.entry__changes .added,.entry__changes .added>*{overflow-wrap:break-word;background-color:#00e67650}.entry__changes .removed,.entry__changes .removed>*{overflow-wrap:break-word;color:var(--danger-color);-webkit-text-decoration-color:var(--danger-color);text-decoration-color:var(--danger-color)}.contributor{gap:.5rem;grid-template-columns:auto 1fr}.contributor .icon{grid-row:span 2}.contributor__id{font-size:.8rem;font-weight:700}.contributor__time{font-size:.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}#preview_page header{position:-webkit-sticky;position:sticky;top:0;z-index:1;padding:1.5rem 0 1rem 0;background-color:rgba(var(--background-color), 1)}#preview_page h1,#preview_page h2,#preview_page h3,#preview_page h4,#preview_page h5,#preview_page h6{font-weight:400;font-family:"Calistoga",cursive}#preview_page h3{margin-bottom:1rem}#preview_page h3:not(:first-of-type){margin-top:3rem}#preview_page p{font-size:1rem}#preview_page p *{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:var(--foreground-color);border:solid thin rgba(var(--text-color), 0.2);padding:.2rem;border-radius:.3rem;box-shadow:0 .1rem .2rem rgba(0,0,0,.06),0 1rem 1.5rem -0.5rem rgba(0,0,0,.2)}.preview-group__buttons button{padding:.5rem}.preview-group__buttons button .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_name_wrapper #article_outline_button,#selected_content_options #article_outline_button{margin-left:auto}#article_name_wrapper{justify-content:flex-start}.article-section{display:flex;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:auto;flex-shrink:0}.content-card{scroll-snap-align:start;flex-shrink:0;width:min(45ch,100% - 2rem)}.formatting-button{padding:.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 .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}#main_page.active-outline{grid-template-rows:auto 1fr;grid-template-columns:20rem minmax(0, 1fr)}#main_page.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{-ms-scroll-chaining:none;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:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background:rgba(var(--text-color), 0.3);border-radius:1rem}::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-color), 0.5)}.interact,button:not(.button--primary){transition:background-color .3s}.interact:hover,button:not(.button--primary):hover{background-color:rgba(var(--text-color), 0.06)}.button--primary{transition:filter .3s}.button--primary:hover{filter:brightness(120%)}.content-card:not(.selected) sm-checkbox{opacity:0;transition:opacity .2s}.content-card:hover sm-checkbox,.content-card:focus-within sm-checkbox{opacity:1}.preview-group__buttons{transition:opacity .1s;opacity:0}.preview-group{border-radius:.3rem}.preview-group:hover{background-color:rgba(var(--text-color), 0.06)}.preview-group:hover .preview-group__buttons{opacity:1}.preview-group .preview-group__buttons:focus-within{opacity:1}} \ No newline at end of file diff --git a/css/main.scss b/css/main.scss index 3cfa03e..772cd81 100644 --- a/css/main.scss +++ b/css/main.scss @@ -327,17 +327,30 @@ ul { flex-shrink: 0; } -.button__icon { - height: 1.2rem; - width: 1.2rem; +.margin-right-0-5 { + margin-right: 0.5rem; +} - &--left { - margin-right: 0.5rem; - } - - &--right { - margin-left: 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 { @@ -527,7 +540,7 @@ sm-copy { gap: 1rem; padding: 1rem; align-items: center; - grid-template-columns: 1fr auto auto; + grid-template-columns: 1fr auto; grid-column: 1/-1; background-color: var(--foreground-color); z-index: 2; @@ -1050,7 +1063,7 @@ sm-copy { } #main_header { padding: 1rem 1.5rem; - grid-template-columns: auto 1fr auto auto; + grid-template-columns: 1fr auto auto; } #options_panel { top: 4.2rem; diff --git a/index.html b/index.html index dbfdca6..72a06ee 100644 --- a/index.html +++ b/index.html @@ -14,9 +14,10 @@ href="https://fonts.googleapis.com/css2?family=Calistoga&family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap" rel="stylesheet"> +