{"version":3,"sources":["../../../../src/nhsuk/core/tools/_grid.scss"],"names":[],"mappings":"AAAA,eAAe;AACf,gBAAgB;AAChB,uBAAuB;AACvB,kBAAkB;AAClB,mBAAmB;;AAEnB,GAAG;AACH,OAAO;AACP,EAAE;AACF,eAAe;AACf,6GAA6G;AAC7G,GAAG;;AAEH,wBAAwB;AACxB,EAAE;AACF,8DAA8D;AAC9D,oCAAoC;AACpC,6CAA6C;;AAE7C;EACE;IACE,yCAAyC;EAC3C;;EAEA,qCAAqC;AACvC;;AAEA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,EAAE;AACF,2DAA2D;AAC3D,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,aAAa;AACb,EAAE;AACF,6EAA6E;AAC7E,6CAA6C;AAC7C,oFAAoF;AACpF,EAAE;AACF,0BAA0B;AAC1B,oCAAoC;AACpC,6CAA6C;AAC7C,MAAM;AACN,EAAE;AACF,+EAA+E;AAC/E,4CAA4C;AAC5C,yDAAyD;AACzD,MAAM;AACN,EAAE;AACF,kDAAkD;AAClD,wCAAwC;AACxC,6DAA6D;AAC7D,MAAM;AACN,EAAE;AACF,6GAA6G;;AAE7G;EACE,sBAAsB;;EAEtB;IACE,WAAW;EACb;;EAEA,6BAA6B;;EAE7B;IACE,+BAA+B;IAC/B,aAAa;EACf;AACF","file":"_grid.scss","sourcesContent":["@use \"sass:map\";\n@use \"sass:math\";\n@use \"../settings\" as *;\n@use \"mixins\" as *;\n@use \"sass-mq\" as *;\n\n////\n/// Grid\n///\n/// @group tools\n/// @link https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service)\n////\n\n/// Grid width percentage\n///\n/// @param {String} $key - Name of grid width (e.g. two-thirds)\n/// @return {Number} Percentage width\n/// @throw if `$key` is not a valid grid width\n\n@function nhsuk-grid-width($key) {\n  @if map.has-key($nhsuk-grid-widths, $key) {\n    @return map.get($nhsuk-grid-widths, $key);\n  }\n\n  @error \"Unknown grid width `#{$key}`\";\n}\n\n/// Generate grid column styles\n///\n/// Creates a grid column with standard gutter between the columns.\n///\n/// Grid widths are defined in the `$nhsuk-grid-widths` map.\n///\n/// By default the column width changes from 100% to specified width at the\n/// 'desktop' breakpoint, but other breakpoints can be specified using the `$at`\n/// parameter.\n///\n/// @param {String} $width [full] name of a grid width from $nhsuk-grid-widths\n/// @param {String} $float [left] left | right\n/// @param {String} $at [desktop] - mobile | tablet | desktop | any custom breakpoint\n///\n/// @example scss - Default\n///   .nhsuk-grid-column-two-thirds {\n///     @include nhsuk-grid-column(two-thirds)\n///   }\n///\n/// @example scss - Customising the breakpoint where width percentage is applied\n///   .nhsuk-grid-column-one-half-at-tablet {\n///     @include nhsuk-grid-column(one-half, $at: tablet);\n///   }\n///\n/// @example scss - Customising the float direction\n///   .nhsuk-grid-column-one-half-right {\n///     @include nhsuk-grid-column(two-thirds, $float: right);\n///   }\n///\n/// @link https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service)\n\n@mixin nhsuk-grid-column($width: full, $float: left, $at: desktop) {\n  box-sizing: border-box;\n\n  @if $at != tablet {\n    width: 100%;\n  }\n\n  padding: 0 $nhsuk-gutter-half;\n\n  @include nhsuk-media-query($from: $at) {\n    width: nhsuk-grid-width($width);\n    float: $float;\n  }\n}\n"]}
