pleroma-fe/src/components/settings_modal/settings_modal.scss

171 lines
3.2 KiB
SCSS
Raw Normal View History

2020-05-03 17:36:12 +03:00
.settings-modal {
overflow: hidden;
2025-11-24 20:05:38 +02:00
h2 {
font-size: 1.3rem;
font-weight: 500;
2025-11-24 17:06:55 +02:00
margin-top: 1em;
margin-bottom: 1em;
}
2025-11-24 20:05:38 +02:00
h3 {
2025-11-24 17:06:55 +02:00
font-size: 1.2rem;
2025-11-24 20:05:38 +02:00
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;
2025-11-24 17:06:55 +02:00
margin-top: 1em;
margin-bottom: 0.5em;
}
h5 {
font-size: 1rem;
margin-bottom: 0.5em;
2025-11-24 20:05:38 +02:00
margin-top: 0;
}
.setting-list,
.option-list {
list-style-type: none;
padding-left: 2em;
2025-11-24 20:05:38 +02:00
margin: 0;
2023-01-09 13:02:16 -05:00
2024-09-24 03:07:27 +03:00
.btn:not(.dropdown-button) {
padding: 0 2em;
}
2025-12-03 20:16:33 +02:00
.btn-group {
.button-default {
flex: 0 1 auto;
}
}
li {
2025-12-03 12:19:20 +02:00
display: block;
margin: 0.75em 0;
> label {
display: block;
margin: 0.75em 0;
padding: 0.5em 0;
}
}
2023-01-09 13:02:16 -05:00
.suboptions {
margin-top: 0.3em;
}
&.two-column {
2025-11-25 20:29:37 +02:00
display: grid;
grid-template-columns: 1fr 1fr;
> li {
2025-11-25 20:29:37 +02:00
margin: 0;
break-inside: avoid;
}
}
}
2023-03-19 21:27:07 +02:00
.setting-description {
margin-top: 0.2em;
2025-12-03 12:19:20 +02:00
margin-bottom: 0;
font-size: 80%;
2023-03-19 21:27:07 +02:00
}
.settings-modal-panel {
overflow: hidden;
transition: transform;
transition-timing-function: ease-in-out;
transition-duration: 300ms;
2025-11-24 20:05:38 +02:00
width: 70em;
max-width: 90vw;
height: 90vh;
2025-03-31 12:51:17 +03:00
@media all and (width <= 800px) {
max-width: 100vw;
height: 100%;
}
>.panel-body {
height: 100%;
overflow-y: hidden;
.btn {
2022-04-20 23:22:51 +03:00
min-height: 2em;
}
}
}
.settings-footer {
display: flex;
flex-wrap: wrap;
line-height: 2;
2023-01-09 13:02:16 -05:00
>* {
margin-right: 0.5em;
}
.extra-content {
display: flex;
flex-grow: 1;
}
}
2023-01-09 13:02:16 -05:00
2024-12-01 22:20:13 +02:00
&.-mobile {
2025-11-24 20:05:38 +02:00
.tabs {
.menu-item {
2025-11-25 20:11:08 +02:00
font-size: 1.2em;
padding-top: 0.75em;
padding-bottom: 0.75em;
2025-11-24 20:05:38 +02:00
}
}
2025-11-25 20:09:47 +02:00
.setting-list:not(.suboptions),
2024-12-01 22:20:13 +02:00
.option-list {
padding-left: 0.25em;
2025-11-26 00:25:30 +02:00
/* stylelint-disable no-descending-specificity */
// it makes no sense
2024-12-01 22:20:13 +02:00
> li {
margin: 1em 0;
line-height: 1.5em;
2025-03-31 13:05:28 +03:00
vertical-align: middle;
2024-12-01 22:20:13 +02:00
}
2025-11-26 00:25:30 +02:00
/* stylelint-enable no-descending-specificity */
2024-12-01 22:20:13 +02:00
&.two-column {
2025-11-25 20:29:37 +02:00
grid-template-columns: 1fr;
2024-12-01 22:20:13 +02:00
}
}
}
2023-01-09 13:02:16 -05:00
&.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));
2025-03-31 12:51:17 +03:00
@media all and (width <= 800px) {
2023-01-09 13:02:16 -05:00
/* 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));
}
}
}
2020-05-03 17:36:12 +03:00
}