Sha256: 9de99ff5f982c80d2e03e4fbdd80fe14798b8dabd2928bd713c1cb595076a9d7

Contents?: true

Size: 1.98 KB

Versions: 55

Compression:

Stored size: 1.98 KB

Contents

@include govuk-exports("govuk/component/details") {
  .govuk-details {
    @include govuk-font($size: 19);
    @include govuk-text-colour;
    @include govuk-responsive-margin(6, "bottom");

    display: block;
  }

  .govuk-details__summary {
    // Make the focus outline shrink-wrap the text content of the summary
    display: inline-block;

    // Absolutely position the marker against this element
    position: relative;

    margin-bottom: govuk-spacing(1);

    // Allow for absolutely positioned marker and align with disclosed text
    padding-left: govuk-spacing(4) + $govuk-border-width;

    // Style the summary to look like a link...
    color: $govuk-link-colour;
    cursor: pointer;

    &:hover {
      color: $govuk-link-hover-colour;
    }

    &:focus {
      @include govuk-focused-text;
    }
  }

  // ...but only underline the text, not the arrow
  .govuk-details__summary-text {
    text-decoration: underline;
  }

  // Remove the underline when focussed to avoid duplicate borders
  .govuk-details__summary:focus .govuk-details__summary-text {
    text-decoration: none;
  }

  // Remove the default details marker so we can style our own consistently and
  // ensure it displays in Firefox (see implementation.md for details)
  .govuk-details__summary::-webkit-details-marker {
    display: none;
  }

  // Append our own open / closed marker using a pseudo-element
  .govuk-details__summary:before {
    content: "";
    position: absolute;

    top: -1px;
    bottom: 0;
    left: 0;

    margin: auto;

    @include govuk-shape-arrow($direction: right, $base: 14px);

    .govuk-details[open] > & {
      @include govuk-shape-arrow($direction: down, $base: 14px);
    }
  }

  .govuk-details__text {
    padding: govuk-spacing(3);
    padding-left: govuk-spacing(4);
    border-left: $govuk-border-width solid $govuk-border-colour;
  }

  .govuk-details__text p {
    margin-top: 0;
    margin-bottom: govuk-spacing(4);
  }

  .govuk-details__text > :last-child {
    margin-bottom: 0;
  }
}

Version data entries

55 entries across 55 versions & 2 rubygems

Version Path
govuk_publishing_components-24.10.3 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.10.2 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.10.1 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.10.0 node_modules/govuk-frontend/govuk/components/details/_index.scss
dxw_govuk_frontend_rails-3.11.0 vendor/assets/stylesheets/components/details/_index.scss
govuk_publishing_components-24.9.4 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.9.3 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.9.2 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.9.1 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.9.0 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.8.0 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.7.1 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.7.0 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.6.1 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.6.0 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.5.0 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.4.1 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.4.0 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.3.1 node_modules/govuk-frontend/govuk/components/details/_index.scss
govuk_publishing_components-24.3.0 node_modules/govuk-frontend/govuk/components/details/_index.scss