Sha256: 08731f9082d85bec00c8268ecfbcf1d7cf5dcc81ae3e379ff9fb07032d83e417

Contents?: true

Size: 1.32 KB

Versions: 5

Compression:

Stored size: 1.32 KB

Contents

// stylelint-disable scss/at-extend-no-missing-placeholder
.govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items.
.gem-c-govspeak {
  @import "govuk/components/button/button";

  // Some links in Govspeak should look like buttons[1] when using:
  // ```
  //    {button}[Random page](https://gov.uk/random){/button}
  // ```.
  //
  // To make sure that the link styles don't override the button styles this
  // needs more specificity.
  //
  // Govspeak targets link by using element selectors; so the selector
  // `.gem-c-govspeak a:link` will override `.govuk-button`. Extending
  // `govuk-button` here gives `gem-c-govspeak .gem-c-button` and prevents the
  // link-that-looks-like-a-button from being overriden.

  // [1]: https://github.com/alphagov/govspeak#button
  .gem-c-button {
    @extend .govuk-button;
  }

  .govuk-button--start {
    @extend .govuk-button--start;
  }

  @include govuk-media-query($media-type: print) {
    .gem-c-button {
      box-shadow: none;
      border: 2pt solid $govuk-print-text-colour;

      &,
      & * {
        background-color: unset;
        color: $govuk-print-text-colour !important; // stylelint-disable-line declaration-no-important
      }

      &::after {
        display: none;
      }
    }
  }
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
govuk_publishing_components-43.0.1 app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss
govuk_publishing_components-43.0.0 app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss
govuk_publishing_components-42.1.0 app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss
govuk_publishing_components-42.0.0 app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss
govuk_publishing_components-41.1.2 app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss