Skip to content
Snippets Groups Projects
content.scss 2.38 KiB
Newer Older
@charset "UTF-8";

Patrick Marsceill's avatar
Patrick Marsceill committed
//
// Styles for rendered markdown in the .main-content container
//
Patrick Marsceill's avatar
Patrick Marsceill committed
// stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type
Patrick Marsceill's avatar
Patrick Marsceill committed

Silvio Giebl's avatar
Silvio Giebl committed
.main-content {
  line-height: $content-line-height;
Patrick Marsceill's avatar
Patrick Marsceill committed
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

Patrick Marsceill's avatar
Patrick Marsceill committed
  ul,
Patrick Marsceill's avatar
Patrick Marsceill committed
    padding-left: 1.5em;
  }

  ol {
    list-style-type: none;
    counter-reset: step-counter;

Patrick Marsceill's avatar
Patrick Marsceill committed
    > li {
Patrick Marsceill's avatar
Patrick Marsceill committed
      position: relative;

      &::before {
        position: absolute;
Patrick Marsceill's avatar
Patrick Marsceill committed
        top: 0.2em;
Patrick Marsceill's avatar
Patrick Marsceill committed
        color: $grey-dk-000;
Patrick Marsceill's avatar
Patrick Marsceill committed
        content: counter(step-counter);
        counter-increment: step-counter;
Patrick Marsceill's avatar
Patrick Marsceill committed
        @include fs-3;
Patrick Marsceill's avatar
Patrick Marsceill committed

        @include mq(sm) {
          top: 0.11em;
        }
Patrick Marsceill's avatar
Patrick Marsceill committed
      }

      ol {
        counter-reset: sub-counter;

        li {
          &::before {
            content: counter(sub-counter, lower-alpha);
Patrick Marsceill's avatar
Patrick Marsceill committed
            counter-increment: sub-counter;
  ul {
    list-style: none;

Patrick Marsceill's avatar
Patrick Marsceill committed
    > li {
      &::before {
        position: absolute;
        margin-left: -1.4em;
        color: $grey-dk-000;
        content: "•";
      }
    }
  }

  .task-list {
    padding-left: 0;
  }

  .task-list-item {
    display: flex;
    align-items: center;
Patrick Marsceill's avatar
Patrick Marsceill committed

    &::before {
      content: "";
    }
  }

  .task-list-item-checkbox {
    margin-right: 0.6em;
  }

  hr + * {
Patrick Marsceill's avatar
Patrick Marsceill committed
    margin-top: 0;
  }

  h1:first-of-type {
    margin-top: 0.5em;
  }
David Darnes's avatar
David Darnes committed

  dl {
    display: grid;
    grid-template-columns: max-content 1fr;
  }

  dt,
  dd {
    margin: 0.25em 0;
  }

  dt {
    text-align: right;
Patrick Marsceill's avatar
Patrick Marsceill committed

    &::after {
      content: ":";
    }
  }

  dd {
    margin-left: 1em;
    font-weight: 500;
  }
Patrick Marsceill's avatar
Patrick Marsceill committed

  .anchor-heading {
    position: absolute;
    width: $sp-5;
    height: 100%;
    padding-right: $sp-1;
    padding-left: $sp-1;
Patrick Marsceill's avatar
Patrick Marsceill committed
    overflow: visible;
Patrick Marsceill's avatar
Patrick Marsceill committed

    @include mq(md) {
Patrick Marsceill's avatar
Patrick Marsceill committed
      left: -$sp-5;
    }

    svg {
      display: inline-block;
      width: 100%;
      height: 100%;
      fill: $link-color;
      visibility: hidden;
    }
Patrick Marsceill's avatar
Patrick Marsceill committed
  h1:hover > .anchor-heading,
  h2:hover > .anchor-heading,
  h3:hover > .anchor-heading,
  h4:hover > .anchor-heading,
  h5:hover > .anchor-heading,
  h6:hover > .anchor-heading {
Patrick Marsceill's avatar
Patrick Marsceill committed
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    position: relative;
  }
Patrick Marsceill's avatar
Patrick Marsceill committed
}