Sha256: 44455c1a80692962338b7e23518e93039d4276563415bcc05116aa5f0306e1b1

Contents?: true

Size: 1.71 KB

Versions: 130

Compression:

Stored size: 1.71 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 govuk-spacing(4) 0;
  z-index: 1;
  background: govuk-colour("white");
  box-shadow: 0 20px 15px -10px govuk-colour("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 {
  .gem-c-contents-list__list-item--parent > & {
    font-weight: bold;
  }

  @include govuk-template-link-focus-override;
}

.gem-c-contents-list__list-item {
  padding-top: govuk-spacing(2);
  line-height: 1.3;
  list-style-type: none;

  @include govuk-media-query($from: tablet) {
    padding-top: govuk-spacing(6) / 4;
  }
}

.gem-c-contents-list__list-item--dashed {
  $contents-spacing: govuk-spacing(5);
  position: relative;
  padding-left: $contents-spacing;
  padding-right: $contents-spacing;

  &:before {
    content: "—";
    position: absolute;
    left: 0;
    width: govuk-spacing(4);
    overflow: hidden;

    .direction-rtl & {
      left: auto;
      right: 0;
    }
  }

  // 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

130 entries across 130 versions & 1 rubygems

Version Path
govuk_publishing_components-33.1.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-33.0.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-32.1.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-32.0.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-31.2.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-31.1.2 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-31.1.1 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-31.1.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-31.0.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.7.3 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.7.2 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.7.1 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.7.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.6.1 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.6.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.5.2 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.5.1 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.5.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.4.1 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
govuk_publishing_components-30.4.0 app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss