mastodon/app/javascript/styles/components.scss

4153 lines
68 KiB
SCSS
Raw Normal View History

2017-03-02 18:55:15 +01:00
@import 'variables';
.app-body {
-webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar;
}
2016-08-31 22:58:10 +02:00
.button {
background-color: darken($ui-highlight-color, 3%);
2016-09-27 23:12:33 +02:00
border: 10px none;
border-radius: 4px;
box-sizing: border-box;
color: $primary-text-color;
cursor: pointer;
display: inline-block;
font-family: inherit;
2016-09-27 23:12:33 +02:00
font-size: 14px;
font-weight: 500;
height: 36px;
letter-spacing: 0;
2016-09-27 23:12:33 +02:00
line-height: 36px;
overflow: hidden;
padding: 0 16px;
position: relative;
text-align: center;
text-transform: uppercase;
2016-09-27 23:12:33 +02:00
text-decoration: none;
text-overflow: ellipsis;
2017-03-25 00:01:43 +01:00
transition: all 100ms ease-in;
white-space: nowrap;
width: auto;
2016-08-31 22:58:10 +02:00
&:active,
&:focus,
&:hover {
background-color: lighten($ui-highlight-color, 7%);
2017-03-25 00:01:43 +01:00
transition: all 200ms ease-out;
2016-08-31 22:58:10 +02:00
}
&:disabled {
background-color: $ui-primary-color;
2016-10-02 15:28:47 +02:00
cursor: default;
2016-08-31 22:58:10 +02:00
}
&.button-alternative {
font-size: 16px;
line-height: 36px;
height: auto;
color: $ui-base-color;
background: $ui-primary-color;
text-transform: none;
padding: 4px 16px;
&:active,
&:focus,
&:hover {
background-color: lighten($ui-primary-color, 4%);
}
}
&.button-secondary {
font-size: 16px;
line-height: 36px;
height: auto;
color: $ui-primary-color;
text-transform: none;
background: transparent;
padding: 3px 15px;
border: 1px solid $ui-primary-color;
&:active,
&:focus,
&:hover {
border-color: lighten($ui-primary-color, 4%);
color: lighten($ui-primary-color, 4%);
}
}
&.button--block {
display: block;
width: 100%;
}
}
.column__wrapper {
display: flex;
flex: 1 1 auto;
position: relative;
2016-08-31 22:58:10 +02:00
}
.column-icon {
background: lighten($ui-base-color, 4%);
color: $ui-primary-color;
cursor: pointer;
font-size: 16px;
padding: 15px;
position: absolute;
right: 0;
top: -48px;
z-index: 3;
&:hover {
color: lighten($ui-primary-color, 7%);
}
}
2016-08-31 22:58:10 +02:00
.icon-button {
2017-03-25 00:01:43 +01:00
display: inline-block;
padding: 0;
color: $ui-base-lighter-color;
border: none;
background: transparent;
cursor: pointer;
transition: color 100ms ease-in;
2016-08-31 22:58:10 +02:00
&:hover,
&:active,
&:focus {
color: lighten($ui-base-color, 33%);
transition: color 200ms ease-out;
2016-08-31 22:58:10 +02:00
}
&.disabled {
color: lighten($ui-base-color, 13%);
2016-08-31 22:58:10 +02:00
cursor: default;
}
&.active {
color: $ui-highlight-color;
}
2017-03-01 00:53:11 +01:00
2017-03-25 00:01:43 +01:00
&::-moz-focus-inner {
border: 0;
}
&::-moz-focus-inner,
&:focus,
&:active {
2017-03-25 00:01:43 +01:00
outline: 0 !important;
}
&.inverted {
color: lighten($ui-base-color, 33%);
2017-03-25 00:01:43 +01:00
&:hover,
&:active,
&:focus {
color: $ui-base-lighter-color;
2017-03-25 00:01:43 +01:00
}
&.disabled {
color: $ui-primary-color;
}
2017-03-25 00:01:43 +01:00
&.active {
color: $ui-highlight-color;
2017-03-25 00:01:43 +01:00
&.disabled {
color: lighten($ui-highlight-color, 13%);
}
2017-03-25 00:01:43 +01:00
}
}
&.overlayed {
box-sizing: content-box;
background: rgba($base-overlay-background, 0.6);
color: rgba($primary-text-color, 0.7);
border-radius: 4px;
padding: 2px;
&:hover {
background: rgba($base-overlay-background, 0.9);
}
}
2017-03-25 00:01:43 +01:00
}
.text-icon-button {
color: lighten($ui-base-color, 33%);
2017-03-25 00:01:43 +01:00
border: none;
background: transparent;
cursor: pointer;
font-weight: 600;
2017-03-26 13:08:15 +02:00
font-size: 11px;
2017-03-25 00:01:43 +01:00
padding: 0 3px;
line-height: 27px;
outline: 0;
transition: color 100ms ease-in;
2017-03-25 00:01:43 +01:00
&:hover,
&:active,
&:focus {
color: $ui-base-lighter-color;
transition: color 200ms ease-out;
2017-03-25 00:01:43 +01:00
}
&.disabled {
color: lighten($ui-base-color, 13%);
2017-03-25 00:01:43 +01:00
cursor: default;
}
&.active {
color: $ui-highlight-color;
2017-03-25 00:01:43 +01:00
}
&::-moz-focus-inner {
border: 0;
}
&::-moz-focus-inner,
&:focus,
&:active {
2017-03-25 00:01:43 +01:00
outline: 0 !important;
2017-03-01 00:53:11 +01:00
}
2016-08-31 22:58:10 +02:00
}
.dropdown-menu {
position: absolute;
}
2017-03-02 00:57:55 +01:00
.dropdown--active .icon-button {
color: $ui-highlight-color;
2017-03-02 00:57:55 +01:00
}
.dropdown--active::after {
@media screen and (min-width: 1025px) {
content: "";
display: block;
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-width: 0 4.5px 7.8px;
border-color: transparent transparent $ui-secondary-color;
bottom: 8px;
right: 104px;
}
}
.invisible {
font-size: 0;
line-height: 0;
2017-01-24 20:07:46 +01:00
display: inline-block;
width: 0;
height: 0;
position: absolute;
}
.ellipsis {
&::after {
content: "…";
}
}
.lightbox .icon-button {
color: $ui-base-color;
}
.compose-form {
padding: 10px;
}
.compose-form__warning {
color: darken($ui-secondary-color, 65%);
margin-bottom: 15px;
background: $ui-primary-color;
box-shadow: 0 2px 6px rgba($base-shadow-color, 0.3);
padding: 8px 10px;
border-radius: 4px;
font-size: 13px;
font-weight: 400;
strong {
color: darken($ui-secondary-color, 65%);
font-weight: 500;
}
a {
color: darken($ui-primary-color, 33%);
font-weight: 500;
text-decoration: underline;
&:hover,
&:active,
&:focus {
text-decoration: none;
}
}
}
2017-03-25 00:01:43 +01:00
.compose-form__modifiers {
color: $ui-base-color;
2017-03-25 00:01:43 +01:00
font-family: inherit;
font-size: 14px;
background: $simple-background-color;
border-radius: 0 0 4px;
2017-03-25 00:01:43 +01:00
}
.compose-form__buttons-wrapper {
display: flex;
justify-content: space-between;
}
2017-03-25 00:01:43 +01:00
.compose-form__buttons {
padding: 10px;
background: darken($simple-background-color, 8%);
box-shadow: inset 0 5px 5px rgba($base-shadow-color, 0.05);
2017-03-25 00:01:43 +01:00
border-radius: 0 0 4px 4px;
display: flex;
.icon-button {
box-sizing: content-box;
padding: 0 3px;
}
}
.compose-form__upload-button-icon {
line-height: 27px;
}
.compose-form__sensitive-button {
display: none;
&.compose-form__sensitive-button--visible {
display: block;
}
.compose-form__sensitive-button__icon {
line-height: 27px;
}
}
.compose-form__upload-wrapper {
overflow: hidden;
}
.compose-form__uploads-wrapper {
display: flex;
padding: 5px;
}
.compose-form__upload {
flex: 1 1 0;
margin: 5px;
}
.compose-form__upload-thumbnail {
border-radius: 4px;
2017-04-29 14:29:13 +02:00
background-position: center;
background-size: cover;
background-repeat: no-repeat;
height: 100px;
width: 100%;
}
.compose-form__upload-cancel {
background-size: cover;
border-radius: 4px;
height: 100px;
width: 100px;
}
.compose-form__label {
display: block;
line-height: 24px;
vertical-align: middle;
&.with-border {
border-top: 1px solid $ui-base-color;
padding-top: 10px;
}
.compose-form__label__text {
display: inline-block;
vertical-align: middle;
margin-bottom: 14px;
margin-left: 8px;
color: $ui-primary-color;
}
}
.compose-form__textarea,
.follow-form__input {
background: $simple-background-color;
2016-08-31 22:58:10 +02:00
&:disabled {
background: $ui-secondary-color;
2016-08-31 22:58:10 +02:00
}
}
.compose-form__autosuggest-wrapper {
position: relative;
.emoji-picker-dropdown {
position: absolute;
right: 5px;
top: 5px;
::-webkit-scrollbar-track:hover,
::-webkit-scrollbar-track:active {
background-color: rgba($base-overlay-background, 0.3);
}
}
}
.compose-form__publish {
display: flex;
min-width: 0;
}
.compose-form__publish-button-wrapper {
overflow: hidden;
padding-top: 10px;
}
2016-11-08 21:45:51 +01:00
.emojione {
display: inline-block;
font-size: inherit;
vertical-align: middle;
object-fit: contain;
2016-11-08 21:45:51 +01:00
margin: -.2ex .15em .2ex;
2016-11-15 18:38:57 +01:00
width: 16px;
height: 16px;
2016-11-08 21:45:51 +01:00
img {
width: auto;
}
}
.reply-indicator {
2017-03-25 00:01:43 +01:00
border-radius: 4px 4px 0 0;
position: relative;
bottom: -2px;
background: $ui-primary-color;
padding: 10px;
}
.reply-indicator__header {
margin-bottom: 5px;
overflow: hidden;
}
.reply-indicator__cancel {
float: right;
line-height: 24px;
}
.reply-indicator__display-name {
color: $ui-base-color;
display: block;
max-width: 100%;
line-height: 24px;
overflow: hidden;
padding-right: 25px;
text-decoration: none;
}
.reply-indicator__display-avatar {
float: left;
margin-right: 5px;
}
.status__content--with-action {
cursor: pointer;
}
.status__content,
.reply-indicator__content {
2016-08-31 16:48:21 +02:00
font-size: 15px;
line-height: 20px;
word-wrap: break-word;
2017-01-26 23:34:40 +01:00
font-weight: 400;
overflow: hidden;
white-space: pre-wrap;
2016-08-31 16:48:21 +02:00
2016-11-08 21:45:51 +01:00
.emojione {
width: 18px;
height: 18px;
}
2016-09-10 10:14:36 +02:00
p {
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
}
2016-08-24 21:08:00 +02:00
a {
color: $ui-secondary-color;
2016-08-24 21:08:00 +02:00
text-decoration: none;
&:hover {
text-decoration: underline;
.fa {
color: lighten($ui-base-color, 40%);
}
2016-08-24 21:08:00 +02:00
}
&.mention {
&:hover {
text-decoration: none;
span {
text-decoration: underline;
}
}
}
.fa {
color: lighten($ui-base-color, 30%);
}
2016-08-24 21:08:00 +02:00
}
.status__content__spoiler-link {
background: lighten($ui-base-color, 30%);
&:hover {
background: lighten($ui-base-color, 33%);
text-decoration: none;
}
}
.status__content__text {
display: none;
&.status__content__text--visible {
display: block;
}
}
2016-08-24 21:08:00 +02:00
}
2016-08-31 22:58:10 +02:00
.status__content__spoiler-link {
display: inline-block;
border-radius: 2px;
background: transparent;
border: 0;
color: lighten($ui-base-color, 8%);
font-weight: 500;
font-size: 11px;
padding: 0 6px;
text-transform: uppercase;
line-height: inherit;
cursor: pointer;
}
.status__prepend-icon-wrapper {
left: -26px;
position: absolute;
}
.status {
padding: 8px 10px;
padding-left: 68px;
position: relative;
min-height: 48px;
border-bottom: 1px solid lighten($ui-base-color, 8%);
cursor: default;
@keyframes fade {
0% { opacity: 0; }
100% { opacity: 1; }
}
opacity: 1;
animation: fade 150ms linear;
.video-player {
margin-top: 8px;
}
&.status-direct {
background: lighten($ui-base-color, 8%);
.icon-button.disabled {
color: lighten($ui-base-color, 16%);
}
}
2017-04-11 21:24:17 +02:00
&.light {
.status__relative-time {
color: $ui-primary-color;
2017-04-11 21:24:17 +02:00
}
.status__display-name {
color: $ui-base-color;
2017-04-11 21:24:17 +02:00
}
.display-name {
strong {
color: $ui-base-color;
2017-04-11 21:24:17 +02:00
}
span {
color: $ui-primary-color;
2017-04-11 21:24:17 +02:00
}
}
.status__content {
color: $ui-base-color;
2017-04-11 21:24:17 +02:00
a {
color: $ui-highlight-color;
2017-04-11 21:24:17 +02:00
}
a.status__content__spoiler-link {
color: $primary-text-color;
background: $ui-primary-color;
2017-04-11 21:24:17 +02:00
&:hover {
background: lighten($ui-primary-color, 8%);
2017-04-11 21:24:17 +02:00
}
}
}
}
}
.notification-favourite {
.status.status-direct {
background: transparent;
.icon-button.disabled {
color: lighten($ui-base-color, 13%);
}
}
}