Sha256: a4aa4e6e2e87a6d18d0b86064e4553ce629cdeea445d70ab300cbb88abbff219

Contents?: true

Size: 1.76 KB

Versions: 1

Compression:

Stored size: 1.76 KB

Contents

@mixin notice($notice-color) {
  margin: 1rem 0 !important;
  padding: 1em;
  color: $color-fg-default;
  font-size: 0.85em !important;
  text-indent: initial; /* override*/
  background-color: mix($color-card-background, $notice-color, $notice-background-mix);
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba($notice-color, 0.25);

  h4 {
    margin-top: 0 !important; /* override*/
    margin-bottom: 0.75em;
    line-height: inherit;
  }

  @at-root .page__content #{&} h4 {
    /* using at-root to override .page-content h4 font size*/
    margin-bottom: 0;
    font-size: $font-size-4;
  }

  p {
    &:last-child {
      margin-bottom: 0 !important; /* override*/
    }
  }

  h4 + p {
    /* remove space above paragraphs that appear directly after notice headline*/
    margin-top: 0;
    padding-top: 0;
  }

  a {
    text-decoration: underline;
    transition: 0.2s;

    color: mix(#000, $notice-color, 10%);

    &:hover {
      color: mix(#000, $notice-color, 50%);
    }
  }

  code {
    color: inherit;
    background-color: mix($color-card-background, $notice-color, $code-notice-background-mix);
  }

  pre code {
    background-color: inherit;
  }

  ul {
    &:last-child {
      margin-bottom: 0; /* override*/
    }
  }
}

.markdown-body {
  /* Default notice */
  .notice {
    @include notice($color-notice-default);
  }

  /* Primary notice */
  .notice--primary {
    @include notice($color-notice-primary);
  }

  /* Info notice */
  .notice--info {
    @include notice($color-notice-info);
  }

  /* Warning notice */
  .notice--warning {
    @include notice($color-notice-warning);
  }

  /* Success notice */
  .notice--success {
    @include notice($color-notice-success);
  }

  /* Danger notice */
  .notice--danger {
    @include notice($color-notice-danger);
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-theme-twail-1.0.0 _sass/vendors/_notices.scss