Skip to content
Snippets Groups Projects
components.scss 77.3 KiB
Newer Older
.app-body {
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar;
tom's avatar
tom committed
}

.button {
  background-color: darken($ui-highlight-color, 3%);
Eugen Rochko's avatar
Eugen Rochko committed
  border: 10px none;
  border-radius: 4px;
  box-sizing: border-box;
  color: $primary-text-color;
  cursor: pointer;
  display: inline-block;
  font-family: inherit;
Eugen Rochko's avatar
Eugen Rochko committed
  font-size: 14px;
  font-weight: 500;
  height: 36px;
Eugen Rochko's avatar
Eugen Rochko committed
  line-height: 36px;
  overflow: hidden;
  padding: 0 16px;
  position: relative;
  text-align: center;
  text-transform: uppercase;
Eugen Rochko's avatar
Eugen Rochko committed
  text-decoration: none;
  text-overflow: ellipsis;
Eugen Rochko's avatar
Eugen Rochko committed
  transition: all 100ms ease-in;
    background-color: lighten($ui-highlight-color, 7%);
Eugen Rochko's avatar
Eugen Rochko committed
    transition: all 200ms ease-out;
  }

  &:disabled {
    background-color: $ui-primary-color;
    cursor: default;
  &.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%);
    }
  }

    font-size: 16px;
    line-height: 36px;
    height: auto;
    color: $ui-primary-color;
    text-transform: none;
    background: transparent;
    padding: 3px 15px;
    border-radius: 4px;
    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;
  background: lighten($ui-base-color, 4%);
  color: $ui-primary-color;
  cursor: pointer;
  font-size: 16px;
  padding: 15px;
  position: absolute;
  right: 0;
    color: lighten($ui-primary-color, 7%);
.icon-button {
Eugen Rochko's avatar
Eugen Rochko committed
  display: inline-block;
  padding: 0;
  color: $ui-base-lighter-color;
  border: none;
  background: transparent;
  transition: color 100ms ease-in;
  &:hover,
  &:active,
  &:focus {
    color: lighten($ui-base-color, 33%);
    transition: color 200ms ease-out;
  }

  &.disabled {
    color: lighten($ui-base-color, 13%);
    cursor: default;
  }
    color: $ui-highlight-color;
Eugen Rochko's avatar
Eugen Rochko committed

Eugen Rochko's avatar
Eugen Rochko committed
  &::-moz-focus-inner {
    border: 0;
  }

  &::-moz-focus-inner,
  &:focus,
  &:active {
Eugen Rochko's avatar
Eugen Rochko committed
    outline: 0 !important;
  }

  &.inverted {
    color: lighten($ui-base-color, 33%);
    &:hover,
    &:active,
    &:focus {
      color: $ui-base-lighter-color;
Eugen Rochko's avatar
Eugen Rochko committed
    &.active {
      color: $ui-highlight-color;
      &.disabled {
        color: lighten($ui-highlight-color, 13%);
      }

  &.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);
Eugen Rochko's avatar
Eugen Rochko committed
}

.text-icon-button {
  color: lighten($ui-base-color, 33%);
Eugen Rochko's avatar
Eugen Rochko committed
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
Eugen Rochko's avatar
Eugen Rochko committed
  font-size: 11px;
Eugen Rochko's avatar
Eugen Rochko committed
  padding: 0 3px;
  line-height: 27px;
  outline: 0;
  transition: color 100ms ease-in;
  &:hover,
  &:active,
  &:focus {
    color: $ui-base-lighter-color;
    transition: color 200ms ease-out;
Eugen Rochko's avatar
Eugen Rochko committed
  }

  &.disabled {
    color: lighten($ui-base-color, 13%);
Eugen Rochko's avatar
Eugen Rochko committed
    cursor: default;
  }

  &.active {
    color: $ui-highlight-color;
Eugen Rochko's avatar
Eugen Rochko committed
  }

  &::-moz-focus-inner {
    border: 0;
  }

  &::-moz-focus-inner,
  &:focus,
  &:active {
Eugen Rochko's avatar
Eugen Rochko committed
    outline: 0 !important;
Eugen Rochko's avatar
Eugen Rochko committed
  }
.dropdown-menu {
  position: absolute;
  transform-origin: 50% 0;
Eugen Rochko's avatar
Eugen Rochko committed
.dropdown--active .icon-button {
  color: $ui-highlight-color;
.dropdown--active::after {
  @media screen and (min-width: 631px) {
    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;
  }
Misty De Meo's avatar
Misty De Meo committed
  display: inline-block;
  width: 0;

  img,
  svg {
    margin: 0 !important;
    border: 0 !important;
    padding: 0 !important;
    width: 0 !important;
    height: 0 !important;
  }
  color: $ui-base-color;
.compose-form {
  padding: 10px;
Lynx Kotoura's avatar
Lynx Kotoura committed
  .compose-form__warning {
    color: darken($ui-secondary-color, 65%);
Lynx Kotoura's avatar
Lynx Kotoura committed
    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;
Lynx Kotoura's avatar
Lynx Kotoura committed
    strong {
      color: darken($ui-secondary-color, 65%);
      font-weight: 500;

      @each $lang in $cjk-langs {
        &:lang(#{$lang}) {
          font-weight: 700;
        }
      }
    }

    a {
      color: darken($ui-primary-color, 33%);
      font-weight: 500;
      text-decoration: underline;

      &:hover,
      &:active,
      &:focus {
        text-decoration: none;
Lynx Kotoura's avatar
Lynx Kotoura committed
  .compose-form__autosuggest-wrapper {
    position: relative;

    .emoji-picker-dropdown {
      position: absolute;
      right: 5px;
      top: 5px;
    }
  }

  .autosuggest-textarea,
  .spoiler-input {
    position: relative;
  }

  .autosuggest-textarea__textarea,
  .spoiler-input__input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    color: $ui-base-color;
    background: $simple-background-color;
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    border: 0;
    outline: 0;
Lynx Kotoura's avatar
Lynx Kotoura committed
      outline: 0;
    }

    @media screen and (max-width: 600px) {
      font-size: 16px;
Lynx Kotoura's avatar
Lynx Kotoura committed
  .spoiler-input__input {
    border-radius: 4px;
  }
Lynx Kotoura's avatar
Lynx Kotoura committed
  .autosuggest-textarea__textarea {
    min-height: 100px;
    border-radius: 4px 4px 0 0;
    padding-bottom: 0;
    padding-right: 10px + 22px;
    resize: none;

    @media screen and (max-width: 600px) {
      height: 100px !important; // prevent auto-resize textarea
      resize: vertical;
    }
  }
Lynx Kotoura's avatar
Lynx Kotoura committed
  .autosuggest-textarea__suggestions {
    box-sizing: border-box;
    display: none;
    position: absolute;
    top: 100%;
    width: 100%;
    z-index: 99;
    box-shadow: 4px 4px 6px rgba($base-shadow-color, 0.4);
    background: $ui-secondary-color;
    border-radius: 0 0 4px 4px;
    color: $ui-base-color;
    font-size: 14px;
    padding: 6px;
Lynx Kotoura's avatar
Lynx Kotoura committed
    &.autosuggest-textarea__suggestions--visible {
      display: block;
    }
Lynx Kotoura's avatar
Lynx Kotoura committed
  .autosuggest-textarea__suggestions__item {
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
Lynx Kotoura's avatar
Lynx Kotoura committed
    &:hover,
    &:focus,
    &:active,
    &.selected {
      background: darken($ui-secondary-color, 10%);
    }
  }
Lynx Kotoura's avatar
Lynx Kotoura committed
  .autosuggest-account,
  .autosuggest-emoji {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    line-height: 18px;
    font-size: 14px;
Lynx Kotoura's avatar
Lynx Kotoura committed
  .autosuggest-account-icon,
  .autosuggest-emoji img {
    display: block;
    margin-right: 8px;
    width: 16px;
    height: 16px;
Lynx Kotoura's avatar
Lynx Kotoura committed
  .autosuggest-account .display-name__account {
    color: lighten($ui-base-color, 36%);
  }
Lynx Kotoura's avatar
Lynx Kotoura committed
  .compose-form__modifiers {
    color: $ui-base-color;
    font-family: inherit;
    font-size: 14px;
    background: $simple-background-color;
Lynx Kotoura's avatar
Lynx Kotoura committed
    .compose-form__upload-wrapper {
      overflow: hidden;
    }
Lynx Kotoura's avatar
Lynx Kotoura committed
    .compose-form__uploads-wrapper {
      display: flex;
      flex-direction: row;
      padding: 5px;
      flex-wrap: wrap;
    }
Lynx Kotoura's avatar
Lynx Kotoura committed
    .compose-form__upload {
      flex: 1 1 0;
      min-width: 40%;
      margin: 5px;

      &-description {
        position: absolute;
        z-index: 2;
        bottom: 0;
        left: 0;
        right: 0;
        box-sizing: border-box;
        background: linear-gradient(0deg, rgba($base-shadow-color, 0.8) 0, rgba($base-shadow-color, 0.35) 80%, transparent);
        padding: 10px;
        opacity: 0;
        transition: opacity .1s ease;

        input {
          background: transparent;
          color: $ui-secondary-color;
          border: 0;
          padding: 0;
          margin: 0;
          width: 100%;
          font-family: inherit;
          font-size: 14px;
          font-weight: 500;

          &:focus {
            color: $white;
          }

          &::placeholder {
            opacity: 0.54;
            color: $ui-secondary-color;
          }
        }
Lynx Kotoura's avatar
Lynx Kotoura committed
        &.active {
          opacity: 1;
        }
Lynx Kotoura's avatar
Lynx Kotoura committed
      .icon-button {
        mix-blend-mode: difference;
Lynx Kotoura's avatar
Lynx Kotoura committed
    .compose-form__upload-thumbnail {
      border-radius: 4px;
      background-position: center;
      background-size: cover;
      background-repeat: no-repeat;
      height: 100px;
      width: 100%;
Lynx Kotoura's avatar
Lynx Kotoura committed
  .compose-form__buttons-wrapper {
    padding: 10px;
    background: darken($simple-background-color, 8%);
    border-radius: 0 0 4px 4px;
    display: flex;
    justify-content: space-between;
Lynx Kotoura's avatar
Lynx Kotoura committed
    .compose-form__buttons {
      display: flex;
Lynx Kotoura's avatar
Lynx Kotoura committed
      .compose-form__upload-button-icon {
        line-height: 27px;
      }
Lynx Kotoura's avatar
Lynx Kotoura committed
      .compose-form__sensitive-button {
        display: none;
Lynx Kotoura's avatar
Lynx Kotoura committed
        &.compose-form__sensitive-button--visible {
          display: block;
        }
Lynx Kotoura's avatar
Lynx Kotoura committed
        .compose-form__sensitive-button__icon {
          line-height: 27px;
        }
      }
    }
Lynx Kotoura's avatar
Lynx Kotoura committed
    .icon-button {
      box-sizing: content-box;
      padding: 0 3px;
    }
Lynx Kotoura's avatar
Lynx Kotoura committed
    .character-counter__wrapper {
      align-self: center;
      margin-right: 4px;
Lynx Kotoura's avatar
Lynx Kotoura committed
      .character-counter {
        cursor: default;
        font-family: 'mastodon-font-sans-serif', sans-serif;
        font-size: 14px;
        font-weight: 600;
        color: lighten($ui-base-color, 12%);

        &.character-counter--over {
          color: $warning-red;
        }
      }
    }
Lynx Kotoura's avatar
Lynx Kotoura committed
  .compose-form__publish {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
Lynx Kotoura's avatar
Lynx Kotoura committed
    .compose-form__publish-button-wrapper {
      overflow: hidden;
      padding-top: 10px;
    }
  }
Eugen Rochko's avatar
Eugen Rochko committed
.emojione {
  display: inline-block;
  font-size: inherit;
  vertical-align: middle;
Eugen Rochko's avatar
Eugen Rochko committed
  margin: -.2ex .15em .2ex;
  width: 16px;
  height: 16px;
Eugen Rochko's avatar
Eugen Rochko committed

  img {
    width: auto;
  }
}

.reply-indicator {
Eugen Rochko's avatar
Eugen Rochko committed
  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 {
  font-size: 15px;
  line-height: 20px;
  word-wrap: break-word;
Eugen Rochko's avatar
Eugen Rochko committed
  font-weight: 400;
  white-space: pre-wrap;
  &.status__content--with-spoiler {
    white-space: normal;

    .status__content__text {
      white-space: pre-wrap;
    }
  }

Eugen Rochko's avatar
Eugen Rochko committed
  .emojione {
    width: 20px;
    height: 20px;
  p {
    margin-bottom: 20px;

    &:last-child {
      margin-bottom: 0;
    }
  }

Eugen Rochko's avatar
Eugen Rochko committed
  a {
    color: $ui-secondary-color;
Eugen Rochko's avatar
Eugen Rochko committed
    text-decoration: none;

    &:hover {
      text-decoration: underline;
        color: lighten($ui-base-color, 40%);
Eugen Rochko's avatar
Eugen Rochko committed
    }

    &.mention {
      &:hover {
        text-decoration: none;

        span {
          text-decoration: underline;
        }
      }
    }
      color: lighten($ui-base-color, 30%);
    background: lighten($ui-base-color, 30%);
      background: lighten($ui-base-color, 33%);

  .status__content__text {
    display: none;

    &.status__content__text--visible {
      display: block;
    }
  }
.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;
}

.focusable {
  &:focus {
    outline: 0;
    background: lighten($ui-base-color, 4%);

    .status.status-direct {
      background: lighten($ui-base-color, 12%);
    }

    .detailed-status,
    .detailed-status__action-bar {
      background: lighten($ui-base-color, 8%);
    }
  }
}

.status {
  padding: 8px 10px;
  padding-left: 68px;
  position: relative;
  min-height: 48px;
  border-bottom: 1px solid lighten($ui-base-color, 8%);
  @supports (-ms-overflow-style: -ms-autohiding-scrollbar) {
    // Add margin to avoid Edge auto-hiding scrollbar appearing over content.
    // On Edge 16 this is 16px and Edge <=15 it's 12px, so aim for 16px.
    padding-right: 26px; // 10px + 16px
  }

  @keyframes fade {
    0% { opacity: 0; }
    100% { opacity: 1; }
  }

  opacity: 1;
  .video-player {
    margin-top: 8px;
  }

  &.status-direct {
    background: lighten($ui-base-color, 8%);

    .icon-button.disabled {
      color: lighten($ui-base-color, 16%);
    }
  }

Eugen Rochko's avatar
Eugen Rochko committed
  &.light {
    .status__relative-time {
      color: $ui-primary-color;
Eugen Rochko's avatar
Eugen Rochko committed
    }

    .status__display-name {
      color: $ui-base-color;
Eugen Rochko's avatar
Eugen Rochko committed
    }

    .display-name {
      strong {
        color: $ui-base-color;
        color: $ui-primary-color;
Eugen Rochko's avatar
Eugen Rochko committed
      }
    }

    .status__content {
      color: $ui-base-color;
        color: $ui-highlight-color;
Eugen Rochko's avatar
Eugen Rochko committed
      }

      a.status__content__spoiler-link {
        color: $primary-text-color;
        background: $ui-primary-color;
Eugen Rochko's avatar
Eugen Rochko committed

        &:hover {
          background: lighten($ui-primary-color, 8%);
.notification-favourite {
  .status.status-direct {
    background: transparent;

    .icon-button.disabled {
      color: lighten($ui-base-color, 13%);
    }
  }
}

.status__relative-time {
  color: $ui-base-lighter-color;
  float: right;
  font-size: 14px;
  color: $ui-base-lighter-color;
}

.status__info .status__display-name {
  display: block;
  max-width: 100%;
  padding-right: 25px;
}

.status__info {
  font-size: 15px;
}

  border-bottom: 1px solid $ui-secondary-color;
    flex: 1 1 auto;
    padding: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
.status-check-box-toggle {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  padding: 10px;
}

.status__prepend {
  margin-left: 68px;
  color: $ui-base-lighter-color;
  padding: 8px 0;
  padding-bottom: 2px;
  font-size: 14px;
  position: relative;

  .status__display-name strong {
    color: $ui-base-lighter-color;

  > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  align-items: center;
  display: flex;
.status__action-bar-button {
  float: left;
  margin-right: 18px;
}

.status__action-bar-dropdown {
  float: left;
  height: 23.15px;
  width: 23.15px;
.detailed-status__action-bar-dropdown {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

  background: lighten($ui-base-color, 4%);
  .status__content {
    font-size: 19px;
    line-height: 24px;
Eugen Rochko's avatar
Eugen Rochko committed

    .emojione {
      width: 24px;
      height: 24px;
      margin: -1px 0 0;
Eugen Rochko's avatar
Eugen Rochko committed
    }

  .video-player {
    margin-top: 8px;
  }
.detailed-status__meta {
  margin-top: 15px;
  color: $ui-base-lighter-color;
  font-size: 14px;
  line-height: 18px;
}

.detailed-status__action-bar {
  background: lighten($ui-base-color, 4%);
  border-top: 1px solid lighten($ui-base-color, 8%);
  border-bottom: 1px solid lighten($ui-base-color, 8%);
  display: flex;
  flex-direction: row;
.detailed-status__link {
  color: inherit;
  text-decoration: none;
}

.detailed-status__favorites,
.detailed-status__reblogs {
  display: inline-block;
  font-weight: 500;
  font-size: 12px;
  margin-left: 6px;
}

.reply-indicator__content {
  color: $ui-base-color;
  font-size: 14px;

  a {
    color: lighten($ui-base-color, 20%);
.account {
  padding: 10px;
  border-bottom: 1px solid lighten($ui-base-color, 8%);

  .account__display-name {
    flex: 1 1 auto;
    display: block;
    color: $ui-primary-color;
    overflow: hidden;
    text-decoration: none;
    font-size: 14px;
  }
}

.account__wrapper {
  display: flex;
}

.account__avatar-wrapper {
  float: left;
  margin-left: 12px;
  margin-right: 12px;
}

.account__avatar {
  @include avatar-radius();

  &-inline {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
  }
}

.account__avatar-overlay {
  @include avatar-size(48px);

  &-base {
    @include avatar-radius();
    @include avatar-size(36px);
  }

  &-overlay {
    @include avatar-radius();
    @include avatar-size(24px);

    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 1;
  }