Skip to content
Snippets Groups Projects
App.scss 17.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • Jiayi Zheng's avatar
    Jiayi Zheng committed
    @import './_variables.scss';
    
    lain's avatar
    lain committed
    #app {
    
    lain's avatar
    .
    lain committed
    }
    
    
    Tae Hoon's avatar
    Tae Hoon committed
    .app-bg-wrapper {
      position: fixed;
      z-index: -1;
      height: 100%;
    
      left: 0;
      right: -20px;
    
    Tae Hoon's avatar
    Tae Hoon committed
      background-size: cover;
      background-repeat: no-repeat;
    
    HJ's avatar
    HJ committed
      background-color: var(--wallpaper);
      background-image: var(--body-background-image);
      background-position: 50% 50px;
    
    i[class^='icon-'] {
    
      user-select: none;
    }
    
    
    lain's avatar
    .
    lain committed
    h4 {
    
    lain's avatar
    .
    lain committed
    }
    
    #content {
    
      box-sizing: border-box;
      padding-top: 60px;
      margin: auto;
      min-height: 100vh;
      max-width: 980px;
    
      align-content: flex-start;
    }
    
    .underlay {
    
      background-color: var(--underlay, rgba(0,0,0,0.15));
    
    lain's avatar
    .
    lain committed
    }
    
    .text-center {
    
    lain's avatar
    .
    lain committed
    }
    
    
    html {
      font-size: 14px;
    }
    
    
    lain's avatar
    .
    lain committed
    body {
    
    Eugenij's avatar
    Eugenij committed
      overscroll-behavior-y: none;
    
    HJ's avatar
    HJ committed
      font-family: var(--interfaceFont, sans-serif);
    
    HJ's avatar
    HJ committed
      color: $fallback--text;
      color: var(--text, $fallback--text);
    
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    
    
      &.hidden {
        display: none;
      }
    
    lain's avatar
    .
    lain committed
    }
    
    a {
    
      text-decoration: none;
      color: $fallback--link;
      color: var(--link, $fallback--link);
    
    lain's avatar
    .
    lain committed
    }
    
    
    HJ's avatar
    HJ committed
      color: $fallback--text;
      color: var(--btnText, $fallback--text);
      background-color: $fallback--fg;
      background-color: var(--btn, $fallback--fg);
    
      border-radius: $fallback--btnRadius;
      border-radius: var(--btnRadius, $fallback--btnRadius);
    
      box-shadow: $fallback--buttonShadow;
    
      font-size: 14px;
      font-family: sans-serif;
    
    HJ's avatar
    HJ committed
      font-family: var(--interfaceFont, sans-serif);
    
      &.-sublime {
        background: transparent;
      }
    
    
      i[class*=icon-],
      .svg-inline--fa {
    
    HJ's avatar
    HJ committed
        color: $fallback--text;
        color: var(--btnText, $fallback--text);
      }
    
    HJ's avatar
    HJ committed
      &::-moz-focus-inner {
        border: none;
      }
    
    
      &:hover {
        box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3);
    
        box-shadow: var(--buttonHoverShadow);
    
    HJ's avatar
    HJ committed
      &:active {
    
    HJ's avatar
    HJ committed
        box-shadow: 0px 0px 4px 0px rgba(255, 255, 255, 0.3), 0px 1px 0px 0px rgba(0, 0, 0, 0.2) inset, 0px -1px 0px 0px rgba(255, 255, 255, 0.2) inset;
    
        box-shadow: var(--buttonPressedShadow);
    
    HJ's avatar
    HJ committed
        color: $fallback--text;
        color: var(--btnPressedText, $fallback--text);
        background-color: $fallback--fg;
    
        background-color: var(--btnPressed, $fallback--fg);
    
          color: $fallback--text;
          color: var(--btnPressedText, $fallback--text);
        }
    
    HJ's avatar
    HJ committed
      }
    
    
      &:disabled {
        cursor: not-allowed;
    
        color: $fallback--text;
        color: var(--btnDisabledText, $fallback--text);
        background-color: $fallback--fg;
    
        background-color: var(--btnDisabled, $fallback--fg);
    
          color: $fallback--text;
          color: var(--btnDisabledText, $fallback--text);
        }
    
    HJ's avatar
    HJ committed
      &.toggled {
        color: $fallback--text;
        color: var(--btnToggledText, $fallback--text);
        background-color: $fallback--fg;
    
        background-color: var(--btnToggled, $fallback--fg);
        box-shadow: 0px 0px 4px 0px rgba(255, 255, 255, 0.3), 0px 1px 0px 0px rgba(0, 0, 0, 0.2) inset, 0px -1px 0px 0px rgba(255, 255, 255, 0.2) inset;
        box-shadow: var(--buttonPressedShadow);
    
          color: $fallback--text;
          color: var(--btnToggledText, $fallback--text);
        }
    
    Eugenij's avatar
    Eugenij committed
    
      &.danger {
        // TODO: add better color variable
        color: $fallback--text;
        color: var(--alertErrorPanelText, $fallback--text);
        background-color: $fallback--alertError;
        background-color: var(--alertError, $fallback--alertError);
      }
    
    hakui's avatar
    hakui committed
    }
    
    
    .button-unstyled {
      background: none;
      border: none;
      outline: none;
      display: inline;
      text-align: initial;
      font-size: 100%;
      font-family: inherit;
      padding: 0;
      line-height: unset;
      cursor: pointer;
    
      box-sizing: content-box;
      color: inherit;
    
    
      &.-link {
        color: $fallback--link;
        color: var(--link, $fallback--link);
      }
    
    
      &.-fullwidth {
        width: 100%;
    
    
      &.-hover-highlight {
        &:hover svg {
          color: $fallback--lightText;
          color: var(--lightText, $fallback--lightText);
        }
      }
    
    input, textarea, .input {
    
      &.unstyled {
        border-radius: 0;
        background: none;
        box-shadow: none;
        height: unset;
      }
    
    HJ's avatar
    HJ committed
      border-radius: $fallback--inputRadius;
      border-radius: var(--inputRadius, $fallback--inputRadius);
    
    HJ's avatar
    HJ committed
      box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.2) inset, 0px -1px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 0px 2px 0px rgba(0, 0, 0, 1) inset;
    
    HJ's avatar
    HJ committed
      background-color: $fallback--fg;
      background-color: var(--input, $fallback--fg);
      color: $fallback--lightText;
      color: var(--inputText, $fallback--lightText);
    
      font-family: sans-serif;
    
    HJ's avatar
    HJ committed
      font-family: var(--inputFont, sans-serif);
    
      margin: 0;
    
      display: inline-block;
      position: relative;
    
    HJ's avatar
    HJ committed
      height: 28px;
    
    HJ's avatar
    HJ committed
      hyphens: none;
    
      &:disabled, &[disabled=disabled], &.disabled {
    
        cursor: not-allowed;
        opacity: 0.5;
      }
    
    
    HJ's avatar
    HJ committed
      &[type=range] {
        background: none;
        border: none;
        margin: 0;
        box-shadow: none;
        flex: 1;
      }
    
    
    lain's avatar
    lain committed
      &[type=radio] {
        display: none;
        &:checked + label::before {
          box-shadow: 0px 0px 2px black inset, 0px 0px 0px 4px $fallback--fg inset;
          box-shadow: var(--inputShadow), 0px 0px 0px 4px var(--fg, $fallback--fg) inset;
    
    HJ's avatar
    HJ committed
          background-color: var(--accent, $fallback--link);
    
    lain's avatar
    lain committed
        }
        &:disabled {
          &,
          & + label,
          & + label::before {
            opacity: .5;
          }
        }
        + label::before {
    
          flex-shrink: 0;
    
    lain's avatar
    lain committed
          display: inline-block;
          content: '';
          transition: box-shadow 200ms;
          width: 1.1em;
          height: 1.1em;
          border-radius: 100%; // Radio buttons should always be circle
          box-shadow: 0px 0px 2px black inset;
          box-shadow: var(--inputShadow);
          margin-right: .5em;
          background-color: $fallback--fg;
          background-color: var(--input, $fallback--fg);
          vertical-align: top;
          text-align: center;
          line-height: 1.1em;
          font-size: 1.1em;
          box-sizing: border-box;
          color: transparent;
          overflow: hidden;
          box-sizing: border-box;
        }
      }
    
    
      &[type=checkbox] {
        display: none;
        &:checked + label::before {
    
    HJ's avatar
    HJ committed
          color: $fallback--text;
    
          color: var(--inputText, $fallback--text);
    
          flex-shrink: 0;
    
          display: inline-block;
    
          content: '✓';
    
          transition: color 200ms;
          width: 1.1em;
          height: 1.1em;
    
    HJ's avatar
    HJ committed
          border-radius: $fallback--checkboxRadius;
          border-radius: var(--checkboxRadius, $fallback--checkboxRadius);
    
          box-shadow: 0px 0px 2px black inset;
    
    HJ's avatar
    HJ committed
          background-color: $fallback--fg;
          background-color: var(--input, $fallback--fg);
    
          text-align: center;
          line-height: 1.1em;
          font-size: 1.1em;
          box-sizing: border-box;
          color: transparent;
          overflow: hidden;
    
    
      &.resize-height {
        resize: vertical;
      }
    
    HJ's avatar
    HJ committed
      color: $fallback--text;
      color: var(--text, $fallback--text);
    
      background-color: $fallback--bg;
      background-color: var(--bg, $fallback--bg);
    }
    
    
    lain's avatar
    lain committed
    .hide-number-spinner {
      -moz-appearance: textfield;
      &[type=number]::-webkit-inner-spin-button,
      &[type=number]::-webkit-outer-spin-button {
        opacity: 0;
        display: none;
      }
    }
    
    
    i[class*=icon-], .svg-inline--fa  {
    
    Eugenij's avatar
    Eugenij committed
      color: var(--icon, $fallback--icon);
    
    .btn-block {
      display: block;
      width: 100%;
    }
    
    .btn-group {
      position: relative;
      display: inline-flex;
      vertical-align: middle;
    
      button {
        position: relative;
        flex: 1 1 auto;
    
        &:not(:last-child) {
          border-top-right-radius: 0;
          border-bottom-right-radius: 0;
        }
    
        &:not(:first-child) {
          border-top-left-radius: 0;
          border-bottom-left-radius: 0;
        }
      }
    }
    
    lain's avatar
    .
    lain committed
    .container {
    
      display: flex;
      flex-wrap: wrap;
      margin: 0;
      padding: 0 10px 0 10px;
    
    lain's avatar
    .
    lain committed
    }
    
    .auto-size {
    
    lain's avatar
    .
    lain committed
    }
    
    main-router {
    
    lain's avatar
    .
    lain committed
    }
    
    .status.compact {
    
      color: rgba(0, 0, 0, 0.42);
      font-weight: 300;
    
    lain's avatar
    .
    lain committed
    
    
    lain's avatar
    .
    lain committed
    }
    
    /* Panel */
    
    .panel {
    
      flex-direction: column;
      margin: 0.5em;
    
    lain's avatar
    .
    lain committed
    
    
      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;
    
        pointer-events: none;
    
        box-shadow: 1px 1px 4px rgba(0,0,0,.6);
        box-shadow: var(--panelShadow);
      }
    
    }
    
    .panel-body:empty::before {
    
      content: "¯\\_(ツ)_/¯"; // Could use words but it'd require translations
      display: block;
      margin: 1em;
      text-align: center;
    
    lain's avatar
    .
    lain committed
    }
    
    .panel-heading {
    
    HJ's avatar
    HJ committed
      display: flex;
    
    Tae Hoon's avatar
    Tae Hoon committed
      flex: none;
    
      border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;
      border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;
    
    HJ's avatar
    HJ committed
      padding: .6em .6em;
    
      color: var(--panelText);
    
    HJ's avatar
    HJ committed
      background-color: $fallback--fg;
      background-color: var(--panel, $fallback--fg);
    
    HJ's avatar
    HJ committed
      align-items: baseline;
    
      box-shadow: var(--panelHeaderShadow);
    
    HJ's avatar
    HJ committed
    
      .title {
        flex: 1 0 auto;
    
    HJ's avatar
    HJ committed
      .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;
    
    HJ's avatar
    HJ committed
      }
    
    
      .button-default,
      .alert {
    
        // height: 100%;
        line-height: 21px;
        min-height: 0;
        box-sizing: border-box;
        margin: 0;
    
        margin-left: .5em;
    
        min-width: 1px;
        align-self: stretch;
    
    HJ's avatar
    HJ committed
      }
    
      .button-default {
        flex-shrink: 0;
    
        &,
        i[class*=icon-] {
    
          color: $fallback--text;
          color: var(--btnPanelText, $fallback--text);
        }
    
        &:active {
          background-color: $fallback--fg;
    
    HJ's avatar
    HJ committed
          background-color: var(--btnPressedPanel, $fallback--fg);
    
          color: $fallback--text;
    
    HJ's avatar
    HJ committed
          color: var(--btnPressedPanelText, $fallback--text);
    
        }
    
        &:disabled {
          color: $fallback--text;
    
    HJ's avatar
    HJ committed
          color: var(--btnDisabledPanelText, $fallback--text);
    
    HJ's avatar
    HJ committed
    
        &.toggled {
          color: $fallback--text;
    
    HJ's avatar
    HJ committed
          color: var(--btnToggledPanelText, $fallback--text);
    
      a,
      .-link {
    
        color: $fallback--link;
        color: var(--panelLink, $fallback--link)
      }
    
    lain's avatar
    .
    lain committed
    }
    
    
    .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, .timeline-footer {
    
      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;
      line-height: 28px;
      align-items: baseline;
      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);
    
    lain's avatar
    .
    lain committed
    }
    
    .panel-body > p {
    
      line-height: 18px;
      padding: 1em;
      margin: 0;
    
    lain's avatar
    .
    lain committed
    }
    
    
    lain's avatar
    lain committed
    .container > * {
    
    lain's avatar
    .
    lain committed
    }
    
    .fa {
    
    lain's avatar
    .
    lain committed
    }
    
    
    lain's avatar
    lain committed
    nav {
    
      color: var(--topBarText);
    
    HJ's avatar
    HJ committed
      background-color: $fallback--fg;
      background-color: var(--topBar, $fallback--fg);
    
      color: $fallback--faint;
      color: var(--faint, $fallback--faint);
      box-shadow: 0px 0px 4px rgba(0,0,0,.6);
    
      box-shadow: var(--topBarShadow);
    
    lain's avatar
    lain committed
    }
    
    
    .fade-enter-active, .fade-leave-active {
      transition: opacity .2s
    }
    .fade-enter, .fade-leave-active {
      opacity: 0
    }
    
    lain's avatar
    lain committed
    
    .main {
    
      flex-basis: 50%;
    
    lain's avatar
    lain committed
    }
    
    lain's avatar
    lain committed
    .mobile-shown {
    
    @media all and (min-width: 800px) {
    
    HJ's avatar
    HJ committed
    
    
        flex-shrink: 0;
        flex-grow: 0;
    
    HJ's avatar
    HJ committed
    .badge {
    
    HJ's avatar
    HJ committed
      display: inline-block;
      border-radius: 99px;
    
      max-width: 10em;
      min-width: 1.7em;
      height: 1.3em;
      padding: 0.15em 0.15em;
    
    HJ's avatar
    HJ committed
      vertical-align: middle;
    
      font-weight: normal;
      font-style: normal;
      font-size: 0.9em;
      line-height: 1;
      text-align: center;
    
    HJ's avatar
    HJ committed
      white-space: nowrap;
    
      overflow: hidden;
      text-overflow: ellipsis;
    
    HJ's avatar
    HJ committed
    
      &.badge-notification {
        background-color: $fallback--cRed;
        background-color: var(--badgeNotification, $fallback--cRed);
        color: white;
        color: var(--badgeNotificationText, white);
      }
    }
    
    .alert {
      margin: 0.35em;
      padding: 0.25em;
      border-radius: $fallback--tooltipRadius;
      border-radius: var(--tooltipRadius, $fallback--tooltipRadius);
      min-height: 28px;
      line-height: 28px;
    
      &.error {
    
    HJ's avatar
    HJ committed
        background-color: $fallback--alertError;
        background-color: var(--alertError, $fallback--alertError);
    
        color: $fallback--text;
        color: var(--alertErrorText, $fallback--text);
    
        .panel-heading & {
          color: $fallback--text;
          color: var(--alertErrorPanelText, $fallback--text);
        }
    
    
      &.warning {
        background-color: $fallback--alertWarning;
        background-color: var(--alertWarning, $fallback--alertWarning);
        color: $fallback--text;
        color: var(--alertWarningText, $fallback--text);
    
        .panel-heading & {
          color: $fallback--text;
          color: var(--alertWarningPanelText, $fallback--text);
        }
      }
    
    
      &.success {
        background-color: var(--alertSuccess, $fallback--alertWarning);
        color: var(--alertSuccessText, $fallback--text);
    
        .panel-heading & {
          color: var(--alertSuccessPanelText, $fallback--text);
        }
      }
    
    .faint {
      color: $fallback--faint;
    
    Shpuld Shpludson's avatar
    Shpuld Shpludson committed
      color: var(--faint, $fallback--faint);
    
    
    .faint-link {
      color: $fallback--faint;
      color: var(--faint, $fallback--faint);
    
      &:hover {
        text-decoration: underline;
      }
    }
    
    
    .visibility-notice {
      padding: .5em;
      border: 1px solid $fallback--faint;
      border: 1px solid var(--faint, $fallback--faint);
      border-radius: $fallback--inputRadius;
      border-radius: var(--inputRadius, $fallback--inputRadius);
    }
    
    .notice-dismissible {
      padding-right: 4rem;
      position: relative;
    
      .dismiss {
        position: absolute;
        top: 0;
        right: 0;
        padding: .5em;
        color: inherit;
      }
    }
    
    
        font-size: 1.1em;
      }
    
    .fa-old-padding {
      &.svg-inline--fa {
        padding: 0 0.3em;
      }
    }
    
    
    @keyframes shakeError {
      0% {
        transform: translateX(0);
      }
      15% {
        transform: translateX(0.375rem);
      }
      30% {
        transform: translateX(-0.375rem);
      }
      45% {
        transform: translateX(0.375rem);
      }
      60% {
        transform: translateX(-0.375rem);
      }
      75% {
        transform: translateX(0.375rem);
      }
      90% {
        transform: translateX(-0.375rem);
      }
      100% {
        transform: translateX(0);
      }
    }
    
    
    @media all and (max-width: 800px) {
    
      .mobile-hidden {
        display: none;
      }
    
      .panel-switcher {
        display: flex;
      }
    
      .container {
        padding: 0;
      }
    
      .panel {
        margin: 0.5em 0 0.5em 0;
      }
    
    
      .menu-button {
        display: block;
        margin-right: 0.8em;
      }
    
    .setting-list,
    .option-list{
      list-style-type: none;
      padding-left: 2em;
      li {
        margin-bottom: 0.5em;
      }
      .suboptions {
        margin-top: 0.3em
      }
    }
    
    
    .login-hint {
      text-align: center;
    
      @media all and (min-width: 801px) {
        display: none;
      }
    
      a {
        display: inline-block;
        padding: 1em 0px;
        width: 100%;
      }
    }
    
    Edijs Bov's avatar
    Edijs Bov committed
    
    
    Edijs Bov's avatar
    Edijs Bov committed
      min-height: 28px;
    }
    
    Tae Hoon's avatar
    Tae Hoon committed
    
    .animate-spin {
      animation: spin 2s infinite linear;
      display: inline-block;
    }
    
    @keyframes spin {
      0% {
        transform: rotate(0deg);
      }
    
      100% {
        transform: rotate(359deg);
      }
    }
    
    seven's avatar
    seven committed
    
    .new-status-notification {
    
    seven's avatar
    seven committed
      font-size: 1.1em;
      z-index: 1;
    
    Eugenij's avatar
    Eugenij committed
    
    
    Eugenij's avatar
    Eugenij committed
    .chat-layout {
      // Needed for smoother chat navigation in the desktop Safari (otherwise the chat layout "jumps" as the chat opens).
      overflow: hidden;
      height: 100%;
    
    
      // Get rid of scrollbar on body as scrolling happens on different element
      body {
        overflow: hidden;
      }
    
    
    Eugenij's avatar
    Eugenij committed
      // Ensures the fixed position of the mobile browser bars on scroll up / down events.
      // Prevents the mobile browser bars from overlapping or hiding the message posting form.
      @media all and (max-width: 800px) {
        body {
          height: 100%;
        }
    
        #app {
          height: 100%;
          overflow: hidden;
          min-height: auto;
        }
    
        #app_bg_wrapper {
          overflow: hidden;
        }
    
        .main {
          overflow: hidden;
          height: 100%;
        }
    
        #content {
          padding-top: 0;
          height: 100%;
          overflow: visible;
        }
      }
    }