pleroma-fe/src/panel.scss

206 lines
4.5 KiB
SCSS
Raw Normal View History

2022-04-05 14:15:30 +00:00
.panel {
position: relative;
display: flex;
flex-direction: column;
background-color: $fallback--bg;
background-color: var(--bg, $fallback--bg);
&::after,
& {
border-radius: $fallback--panelRadius;
border-radius: var(--panelRadius, $fallback--panelRadius);
}
&::after {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
2022-04-11 20:18:46 +00:00
z-index: 3;
2022-04-05 14:15:30 +00:00
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
box-shadow: var(--panelShadow);
pointer-events: none;
}
}
.panel-body:empty::before {
content: "¯\\_(ツ)_/¯"; // Could use words but it'd require translations
2022-04-10 19:09:46 +00:00
display: block;
margin: 1em;
2022-04-05 14:15:30 +00:00
text-align: center;
}
.panel-heading {
2022-04-10 19:37:08 +00:00
--panel-heading-height-padding: 0.6em;
--__panel-heading-height: 3.2em;
--__panel-heading-height-inner: calc(var(--__panel-heading-height) - 2 * var(--panel-heading-height-padding));
2022-04-10 19:37:08 +00:00
2022-04-05 14:15:30 +00:00
position: relative;
box-sizing: border-box;
display: grid;
grid-auto-flow: column;
2022-04-20 21:39:54 +00:00
grid-template-columns: minmax(50%, 1fr);
grid-auto-columns: auto;
grid-column-gap: 0.5em;
2022-04-05 14:15:30 +00:00
flex: none;
border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;
border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;
background-size: cover;
padding: 0.6em 0.6em;
text-align: left;
2022-04-10 19:37:08 +00:00
line-height: var(--__panel-heading-height-inner);
2022-04-05 14:15:30 +00:00
color: var(--panelText);
background-color: $fallback--bg;
background-color: var(--bg, $fallback--bg);
align-items: center;
height: var(--__panel-heading-height);
2022-04-11 20:34:56 +00:00
z-index: 2;
2022-04-05 14:15:30 +00:00
&.-flexible-height {
2022-04-25 21:12:24 +00:00
--__panel-heading-height: auto;
2022-04-05 14:15:30 +00:00
&::after,
&::before {
display: none;
}
}
&.-sticky {
position: sticky;
2022-04-10 15:44:22 +00:00
top: var(--navbar-height);
2022-04-05 14:15:30 +00:00
}
&::after,
&::before {
content: '';
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
pointer-events: none;
}
&::after {
background-color: $fallback--fg;
background-color: var(--panel, $fallback--fg);
z-index: -2;
border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;
border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;
box-shadow: var(--panelHeaderShadow);
}
.title {
font-size: 1.3em;
}
.faint {
background-color: transparent;
color: $fallback--faint;
color: var(--panelFaint, $fallback--faint);
}
.faint-link {
color: $fallback--faint;
color: var(--faintLink, $fallback--faint);
}
.alert {
white-space: nowrap;
text-overflow: ellipsis;
overflow-x: hidden;
}
&:not(.-flexible-height) {
> .button-default,
> .alert {
height: var(--__panel-heading-height-inner);
min-height: 0;
box-sizing: border-box;
margin: 0;
min-width: 1px;
padding-top: 0;
padding-bottom: 0;
align-self: stretch;
2022-04-05 14:15:30 +00:00
}
> .button-default {
flex-shrink: 0;
&,
i[class*=icon-] {
color: $fallback--text;
color: var(--btnPanelText, $fallback--text);
}
&:active {
background-color: $fallback--fg;
background-color: var(--btnPressedPanel, $fallback--fg);
color: $fallback--text;
color: var(--btnPressedPanelText, $fallback--text);
}
&:disabled {
color: $fallback--text;
color: var(--btnDisabledPanelText, $fallback--text);
}
&.toggled {
color: $fallback--text;
color: var(--btnToggledPanelText, $fallback--text);
}
2022-04-05 14:15:30 +00:00
}
}
a,
.-link {
color: $fallback--link;
color: var(--panelLink, $fallback--link);
}
}
.panel-heading.stub {
border-radius: $fallback--panelRadius;
border-radius: var(--panelRadius, $fallback--panelRadius);
}
/* TODO Should remove timeline-footer from here when we refactor panels into
* separate component and utilize slots
*/
.panel-footer {
display: flex;
border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius;
border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius);
flex: none;
padding: 0.6em 0.6em;
text-align: left;
2022-04-20 20:22:51 +00:00
line-height: 2;
align-items: center;
2022-04-05 14:15:30 +00:00
border-width: 1px 0 0 0;
border-style: solid;
border-color: var(--border, $fallback--border);
.faint {
color: $fallback--faint;
color: var(--panelFaint, $fallback--faint);
}
a,
.-link {
color: $fallback--link;
color: var(--panelLink, $fallback--link);
}
}
.panel-body > p {
line-height: 1.3;
2022-04-05 14:15:30 +00:00
padding: 1em;
margin: 0;
}
2022-04-11 20:18:46 +00:00
.panel-body {
padding: var(--panel-body-padding, 0);
}