Sha256: 24b15dee04129c8e5a493f5fc73da5a421630495a1b1676e643c8e4f235a425a
Contents?: true
Size: 1.47 KB
Versions: 209
Compression:
Stored size: 1.47 KB
Contents
@import "../settings/all"; @import "../tools/all"; @import "../helpers/all"; //// /// @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
209 entries across 209 versions & 3 rubygems