.settings-modal { overflow: hidden; h2 { font-size: 1.3rem; font-weight: 500; margin-top: 1em; margin-bottom: 1em; } h3 { font-size: 1.2rem; font-weight: 500; margin-top: 1em; margin-bottom: 0.5em; border-bottom: 1px solid var(--border); padding-bottom: 0.25em; box-sizing: border-box; padding-left: 0.5em; } h4 { font-size: 1.1rem; margin-top: 1em; margin-bottom: 0.5em; } h5 { font-size: 1rem; margin-bottom: 0.5em; margin-top: 0; } .setting-list, .option-list { list-style-type: none; padding-left: 2em; margin: 0; .btn:not(.dropdown-button) { padding: 0 2em; } li { display: block; margin: 0.75em 0; > label { display: block; margin: 0.75em 0; padding: 0.5em 0; } } .suboptions { margin-top: 0.3em; } &.two-column { display: grid; grid-template-columns: 1fr 1fr; > li { margin: 0; break-inside: avoid; } } } .setting-description { margin-top: 0.2em; margin-bottom: 0; font-size: 70%; } .settings-modal-panel { overflow: hidden; transition: transform; transition-timing-function: ease-in-out; transition-duration: 300ms; width: 70em; max-width: 90vw; height: 90vh; @media all and (width <= 800px) { max-width: 100vw; height: 100%; } >.panel-body { height: 100%; overflow-y: hidden; .btn { min-height: 2em; } } } .settings-footer { display: flex; flex-wrap: wrap; line-height: 2; >* { margin-right: 0.5em; } .extra-content { display: flex; flex-grow: 1; } } &.-mobile { .tabs { .menu-item { font-size: 1.2em; padding-top: 0.75em; padding-bottom: 0.75em; } } .setting-list:not(.suboptions), .option-list { padding-left: 0.25em; /* stylelint-disable no-descending-specificity */ // it makes no sense > li { margin: 1em 0; line-height: 1.5em; vertical-align: middle; } /* stylelint-enable no-descending-specificity */ &.two-column { grid-template-columns: 1fr; } } } &.peek { .settings-modal-panel { /* Explanation: * Modal is positioned vertically centered. * 100vh - 100% = Distance between modal's top+bottom boundaries and screen * (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen * + 100% - we move modal completely off-screen, it's top boundary touches * bottom of the screen * - 50px - leaving tiny amount of space so that titlebar + tiny amount of modal is visible */ transform: translateY(calc(((100vh - 100%) / 2 + 100%) - 50px)); @media all and (width <= 800px) { /* For mobile, the modal takes 100% of the available screen. This ensures the minimized modal is always 50px above the browser bottom bar regardless of whether or not it is visible. */ transform: translateY(calc(100% - 50px)); } } } }