@import "govuk_publishing_components/individual_component_support"; @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 { margin: 0; @include govuk-text-colour; @include govuk-font($size: 16, $weight: regular, $line-height: 1.5); } .gem-c-contents-list__list, .gem-c-contents-list__nested-list { margin: 0; padding: 0; list-style-type: none; @include govuk-text-colour; @include govuk-font($size: 16); } .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: calc(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; & span::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; } } @include govuk-media-query($media-type: print) { // Override default browser indentation .gem-c-contents-list__list, .gem-c-contents-list__nested-list { padding-left: 0; margin-left: 0; } .gem-c-contents-list__list-item--numbered, .gem-c-contents-list__list-item--parent { list-style-type: none; } .gem-c-contents-list__link { &.govuk-link { color: $govuk-print-text-colour; } } }