mastodon/app/javascript/flavours/glitch/styles/components/columns.scss

563 lines
9.3 KiB
SCSS
Raw Normal View History

2018-01-14 00:12:10 +00:00
.column__wrapper {
display: flex;
flex: 1 1 auto;
position: relative;
}
.columns-area {
display: flex;
flex: 1 1 auto;
flex-direction: row;
justify-content: flex-start;
overflow-x: auto;
position: relative;
&__panels {
display: flex;
justify-content: center;
width: 100%;
height: 100%;
min-height: 100vh;
&__pane {
height: 100%;
overflow: hidden;
pointer-events: none;
display: flex;
justify-content: flex-end;
min-width: 285px;
&--start {
justify-content: flex-start;
}
&__inner {
position: fixed;
width: 285px;
pointer-events: auto;
height: 100%;
}
}
&__main {
box-sizing: border-box;
width: 100%;
max-width: 600px;
flex: 0 0 auto;
display: flex;
flex-direction: column;
@media screen and (min-width: $no-gap-breakpoint) {
padding: 0 10px;
}
}
}
2018-01-14 00:12:10 +00:00
}
.tabs-bar__wrapper {
background: darken($ui-base-color, 8%);
position: sticky;
top: 0;
z-index: 2;
padding-top: 0;
@media screen and (min-width: $no-gap-breakpoint) {
padding-top: 10px;
}
.tabs-bar {
margin-bottom: 0;
@media screen and (min-width: $no-gap-breakpoint) {
margin-bottom: 10px;
}
}
}
2018-01-14 00:12:10 +00:00
.react-swipeable-view-container {
&,
.columns-area,
.column {
height: 100%;
}
}
.react-swipeable-view-container > * {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.column {
width: 330px;
position: relative;
box-sizing: border-box;
display: flex;
flex-direction: column;
> .scrollable {
background: $ui-base-color;
}
}
.ui {
flex: 0 0 auto;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.column {
overflow: hidden;
}
.column-back-button {
box-sizing: border-box;
width: 100%;
2018-01-14 00:12:10 +00:00
background: lighten($ui-base-color, 4%);
color: $highlight-text-color;
2018-01-14 00:12:10 +00:00
cursor: pointer;
flex: 0 0 auto;
font-size: 16px;
border: 0;
text-align: unset;
padding: 15px;
margin: 0;
z-index: 3;
&:hover {
text-decoration: underline;
}
}
.column-header__back-button {
background: lighten($ui-base-color, 4%);
border: 0;
font-family: inherit;
color: $highlight-text-color;
2018-01-14 00:12:10 +00:00
cursor: pointer;
flex: 0 0 auto;
font-size: 16px;
padding: 0 5px 0 0;
z-index: 3;
&:hover {
text-decoration: underline;
}
&:last-child {
padding: 0 15px 0 0;
}
}
.column-back-button__icon {
display: inline-block;
margin-right: 5px;
}
.column-back-button--slim {
position: relative;
}
.column-back-button--slim-button {
cursor: pointer;
flex: 0 0 auto;
font-size: 16px;
padding: 15px;
position: absolute;
right: 0;
top: -48px;
}
.column-link {
background: lighten($ui-base-color, 8%);
color: $primary-text-color;
display: block;
font-size: 16px;
padding: 15px;
text-decoration: none;
&:hover,
&:focus,
&:active {
2018-01-14 00:12:10 +00:00
background: lighten($ui-base-color, 11%);
}
&:focus {
outline: 0;
}
&--transparent {
background: transparent;
color: $ui-secondary-color;
&:hover,
&:focus,
&:active {
background: transparent;
color: $primary-text-color;
}
&.active {
color: $ui-highlight-color;
}
}
2018-01-14 00:12:10 +00:00
}
.column-link__icon {
display: inline-block;
margin-right: 5px;
}
.column-subheading {
background: $ui-base-color;
color: $dark-text-color;
2018-01-14 00:12:10 +00:00
padding: 8px 20px;
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
cursor: default;
}
.column-header__wrapper {
position: relative;
flex: 0 0 auto;
z-index: 1;
2018-01-14 00:12:10 +00:00
&.active {
box-shadow: 0 1px 0 rgba($highlight-text-color, 0.3);
2018-01-14 00:12:10 +00:00
&::before {
display: block;
content: "";
position: absolute;
bottom: -13px;
2018-01-14 00:12:10 +00:00
left: 0;
right: 0;
margin: 0 auto;
width: 60%;
pointer-events: none;
height: 28px;
z-index: 1;
background: radial-gradient(ellipse, rgba($ui-highlight-color, 0.23) 0%, rgba($ui-highlight-color, 0) 60%);
}
}
.announcements {
z-index: 1;
position: relative;
}
2018-01-14 00:12:10 +00:00
}
.column-header {
display: flex;
font-size: 16px;
background: lighten($ui-base-color, 4%);
flex: 0 0 auto;
cursor: pointer;
position: relative;
z-index: 2;
outline: 0;
2018-02-23 16:45:15 +00:00
overflow: hidden;
& > button {
margin: 0;
border: none;
padding: 15px;
2018-02-23 16:45:15 +00:00
color: inherit;
background: transparent;
font: inherit;
text-align: left;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
flex: 1;
}
2018-01-14 00:12:10 +00:00
& > .column-header__back-button {
color: $highlight-text-color;
}
2018-01-14 00:12:10 +00:00
&.active {
.column-header__icon {
color: $highlight-text-color;
2018-01-14 00:12:10 +00:00
text-shadow: 0 0 10px rgba($ui-highlight-color, 0.4);
}
}
&:focus,
&:active {
outline: 0;
}
}
.column {
width: 330px;
position: relative;
box-sizing: border-box;
display: flex;
flex-direction: column;
overflow: hidden;
2019-06-12 14:03:10 +00:00
.wide .columns-area:not(.columns-area--mobile) & {
2018-01-14 00:12:10 +00:00
flex: auto;
min-width: 330px;
max-width: 400px;
}
> .scrollable {
background: $ui-base-color;
}
}
.column-header__buttons {
height: 48px;
display: flex;
margin-left: 0;
}
.column-header__links {
margin-bottom: 14px;
}
2018-01-14 00:12:10 +00:00
.column-header__links .text-btn {
margin-right: 10px;
}
.column-header__button {
background: lighten($ui-base-color, 4%);
border: 0;
color: $darker-text-color;
2018-01-14 00:12:10 +00:00
cursor: pointer;
font-size: 16px;
padding: 0 15px;
&:hover {
color: lighten($darker-text-color, 7%);
2018-01-14 00:12:10 +00:00
}
&.active {
color: $primary-text-color;
background: lighten($ui-base-color, 8%);
&:hover {
color: $primary-text-color;
background: lighten($ui-base-color, 8%);
}
}
// glitch - added focus ring for keyboard navigation
&:focus {
text-shadow: 0 0 4px darken($ui-highlight-color, 5%);
}
}
.column-header__notif-cleaning-buttons {
display: flex;
align-items: stretch;
justify-content: space-around;
button {
@extend .column-header__button;
background: transparent;
text-align: center;
padding: 10px 5px;
font-size: 14px;
2018-01-14 00:12:10 +00:00
}
b {
font-weight: bold;
}
}
.layout-single-column .column-header__notif-cleaning-buttons {
@media screen and (min-width: $no-gap-breakpoint) {
b, i {
margin-right: 5px;
}
br {
display: none;
}
button {
padding: 15px 5px;
}
}
}
2018-01-14 00:12:10 +00:00
// The notifs drawer with no padding to have more space for the buttons
.column-header__collapsible-inner.nopad-drawer {
padding: 0;
}
.column-header__collapsible {
max-height: 70vh;
overflow: hidden;
overflow-y: auto;
color: $darker-text-color;
2018-01-14 00:12:10 +00:00
transition: max-height 150ms ease-in-out, opacity 300ms linear;
opacity: 1;
z-index: 1;
position: relative;
2018-01-14 00:12:10 +00:00
&.collapsed {
max-height: 0;
opacity: 0.5;
}
&.animating {
overflow-y: hidden;
}
hr {
height: 0;
background: transparent;
border: 0;
border-top: 1px solid lighten($ui-base-color, 12%);
margin: 10px 0;
}
// notif cleaning drawer
&.ncd {
transition: none;
&.collapsed {
max-height: 0;
opacity: 0.7;
}
}
}
.column-header__collapsible-inner {
background: lighten($ui-base-color, 8%);
padding: 15px;
}
.column-header__setting-btn {
&:hover {
color: $darker-text-color;
2018-01-14 00:12:10 +00:00
text-decoration: underline;
}
}
.column-header__setting-arrows {
float: right;
.column-header__setting-btn {
padding: 0 10px;
&:last-child {
padding-right: 0;
}
}
}
.column-header__title {
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
flex: 1;
}
.column-header__icon {
display: inline-block;
margin-right: 5px;
}
.empty-column-indicator,
.error-column,
.follow_requests-unlocked_explanation {
color: $dark-text-color;
2018-01-14 00:12:10 +00:00
background: $ui-base-color;
text-align: center;
padding: 20px;
font-size: 15px;
font-weight: 400;
cursor: default;
display: flex;
flex: 1 1 auto;
align-items: center;
justify-content: center;
@supports(display: grid) { // hack to fix Chrome <57
contain: strict;
}
& > span {
max-width: 400px;
}
2018-01-14 00:12:10 +00:00
a {
color: $highlight-text-color;
2018-01-14 00:12:10 +00:00
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
.follow_requests-unlocked_explanation {
background: darken($ui-base-color, 4%);
contain: initial;
}
2018-01-14 00:12:10 +00:00
.error-column {
flex-direction: column;
}
// more fixes for the navbar-under mode
@mixin fix-margins-for-navbar-under {
.tabs-bar {
margin-top: 0 !important;
margin-bottom: -6px !important;
}
}
.single-column.navbar-under {
@include fix-margins-for-navbar-under;
}
.auto-columns.navbar-under {
@media screen and (max-width: $no-gap-breakpoint) {
2018-01-14 00:12:10 +00:00
@include fix-margins-for-navbar-under;
}
}
.auto-columns.navbar-under .react-swipeable-view-container .columns-area,
.single-column.navbar-under .react-swipeable-view-container .columns-area {
@media screen and (max-width: $no-gap-breakpoint) {
2018-01-14 00:12:10 +00:00
height: 100% !important;
}
}
.column-inline-form {
padding: 7px 15px;
padding-right: 5px;
display: flex;
justify-content: flex-start;
align-items: center;
background: lighten($ui-base-color, 4%);
label {
flex: 1 1 auto;
input {
width: 100%;
margin-bottom: 6px;
&:focus {
outline: 0;
}
}
}
.icon-button {
flex: 0 0 auto;
2019-01-05 20:15:00 +00:00
margin: 0 5px;
2018-01-14 00:12:10 +00:00
}
}