Sha256: 2ce28f7c4f186ae420394a78985a58b713edb5048fbce9e4148359f3e663f124
Contents?: true
Size: 1.12 KB
Versions: 249
Compression:
Stored size: 1.12 KB
Contents
//// /// @group tools/compatibility-mode //// /// Conditional Compatibility Mixin /// /// Selectively output a block (available to the mixin as @content) if a given /// $product is also identified as being used in the project. /// /// This can then be used to include styles that are only needed to override /// styles provided by those other products (e.g. where govuk_template has a /// very specific link selector that otherwise affects buttons). /// /// @example scss /// // Override .my-class if GOV.UK Template is also being used /// @include govuk-compatibility(govuk_template) { /// .my-class { /// color: inherit; /// } /// } /// /// @param {String} $product - Name of product that we are 'defending' against. /// @content Passed content is outputted only if Frontend is being used with /// this product /// @throw Errors if product name is not recognised /// @access public @mixin govuk-compatibility($product) { @if map-has-key($_govuk-compatibility, $product) { @if map-get($_govuk-compatibility, $product) == true { @content; } } @else { @error "Non existent product '#{$product}'"; } }
Version data entries
249 entries across 246 versions & 4 rubygems