Sha256: c6a30a998f0b0260e1297935c33b1278e899083ae20ffb640a8c65797db43ba8
Contents?: true
Size: 1.6 KB
Versions: 194
Compression:
Stored size: 1.6 KB
Contents
@if not mixin-exists("govuk-exports") { @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0."; } @import "../base"; //// /// @group overrides //// /// Directions for spacing /// /// @type Map /// @access private $_spacing-directions: ( "top", "right", "bottom", "left" ) !default; /// Spacing override classes /// /// Generate spacing override classes for the given property (e.g. margin) /// for each point in the spacing scale. /// /// @param {String} $property - Property to add spacing to (e.g. 'margin') /// /// @example scss /// .govuk-\!-margin-0 { /// margin: 0; /// } /// /// .govuk-\!-margin-top-1 { /// margin-top: [whatever spacing point 1 is...] /// } /// /// @access private @mixin _govuk-generate-spacing-overrides($property) { // For each point in the spacing scale (defined in settings), create an // override that affects all directions... @each $scale-point, $scale-map in $govuk-spacing-responsive-scale { .govuk-\!-#{$property}-#{$scale-point} { @include _govuk-responsive-spacing($scale-point, $property, "all", true); } // ... and then an override for each individual direction @each $direction in $_spacing-directions { .govuk-\!-#{$property}-#{$direction}-#{$scale-point} { @include _govuk-responsive-spacing($scale-point, $property, $direction, true); } } } } @include govuk-exports("govuk/overrides/spacing") { @include _govuk-generate-spacing-overrides("margin"); @include _govuk-generate-spacing-overrides("padding"); }
Version data entries
194 entries across 191 versions & 4 rubygems