Sha256: 209c5fcfd41f3522c3e416d0fd7d8bd91db5df2c28c2dac6e5d8a0e89dc8370d

Contents?: true

Size: 1.92 KB

Versions: 75

Compression:

Stored size: 1.92 KB

Contents

@import "helpers/contents-list-helper";

.gem-c-contents-list {
  // Always render the contents list above a
  // back to contents link
  position: relative;
  margin: 0 0 $gutter-two-thirds 0;
  z-index: 1;
  background: $white;
  box-shadow: 0 20px 15px -10px $white;
}

.gem-c-contents-list__title {
  @include govuk-text-colour;
  @include govuk-font($size: 16, $weight: regular, $line-height: 1.5);
  margin: 0;
}

.gem-c-contents-list__list,
.gem-c-contents-list__nested-list {
  @include govuk-text-colour;
  @include govuk-font($size: 16);
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.gem-c-contents-list__link {
  @include govuk-link-common;
  @include govuk-link-style-default;
}

.gem-c-contents-list--no-underline {
  .gem-c-contents-list__link {
    text-decoration: none;

    &:hover,
    &:focus,
    &:active {
      text-decoration: underline;
    }
  }
}

.gem-c-contents-list__link {
  .gem-c-contents-list__list-item--parent > & {
    font-weight: bold;
  }
}

.gem-c-contents-list__list-item {
  padding-top: $gutter-one-third;
  line-height: 1.3;
  list-style-type: none;

  @include media(tablet) {
    padding-top: $gutter-one-quarter;
  }
}

.gem-c-contents-list__list-item--dashed {
  $contents-spacing: $gutter-half + 10;
  margin-left: $contents-spacing;
  padding-right: $contents-spacing;

  &:before {
    content: "— ";
    margin-left: -$contents-spacing;
    padding-right: 5px;

    .direction-rtl & {
      margin-left: 0;
      margin-right: -$contents-spacing;
      padding-right: 0;
      padding-left: 5px;
    }
  }

  // Focus styles on IE8 and older include the
  // left margin, creating an odd white box with
  // orange border around the em dash.
  // Use inline-block and vertical alignment to
  // fix focus styles
  //
  // https://github.com/alphagov/government-frontend/pull/420#issuecomment-320632386
  .lte-ie8 & .gem-c-contents-list__link {
    display: inline-block;
    vertical-align: top;
  }
}

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
govuk_publishing_components-12.11.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.10.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.9.1 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.9.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.8.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.7.1 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.7.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.6.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.5.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.4.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.3.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.2.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.1.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.0.1 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-12.0.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss