Sha256: 300122416508b540fe14b981a0460c439ee9f29dac5e65b28931679b2c778331
Contents?: true
Size: 1.59 KB
Versions: 94
Compression:
Stored size: 1.59 KB
Contents
//// /// @group tools/compatibility-mode //// /// Temporary private version of govuk-compatibility to avoid deprecation warnings /// /// @access private @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}'"; } } /// 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 /// @deprecated Will be removed in v5.0 with the rest of the compatibility mode /// suite of tools and settings @mixin govuk-compatibility($product) { @include _warning(compatibility-helper, "govuk-compatibility is deprecated. " + "From version 5.0, GOV.UK Frontend will not support compatibility mode."); @include _govuk-compatibility($product) { @content; } }
Version data entries
94 entries across 94 versions & 4 rubygems