Skip to content

Commit f4ac505

Browse files
Prefer NHS default $at param
1 parent cc92e80 commit f4ac505

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

packages/core/tools/_grid.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@
6464
/// Grid widths are defined in the `$nhsuk-grid-widths` map.
6565
///
6666
/// By default the column width changes from 100% to specified width at the
67-
/// 'tablet' breakpoint, but other breakpoints can be specified using the `$at`
67+
/// 'desktop' breakpoint, but other breakpoints can be specified using the `$at`
6868
/// parameter.
6969
///
7070
/// @param {String} $width [full] name of a grid width from $nhsuk-grid-widths
7171
/// @param {String} $float [left] left | right
72-
/// @param {String} $at [tablet] - mobile | tablet | desktop | any custom breakpoint
72+
/// @param {String} $at [desktop] - mobile | tablet | desktop | any custom breakpoint
7373
/// @param {String} $class [nhsuk-grid-column] CSS class name (deprecated)
7474
///
7575
/// @example scss - Default
@@ -78,8 +78,8 @@
7878
/// }
7979
///
8080
/// @example scss - Customising the breakpoint where width percentage is applied
81-
/// .nhsuk-grid-column-one-half-at-desktop {
82-
/// @include govuk-grid-column(one-half, $at: desktop);
81+
/// .nhsuk-grid-column-one-half-at-tablet {
82+
/// @include govuk-grid-column(one-half, $at: tablet);
8383
/// }
8484
///
8585
/// @example scss - Customising the float direction
@@ -92,14 +92,14 @@
9292
///
9393
/// @access public
9494

95-
@mixin govuk-grid-column($width: full, $float: left, $at: tablet, $class: "nhsuk-grid-column") {
95+
@mixin govuk-grid-column($width: full, $float: left, $at: desktop, $class: "nhsuk-grid-column") {
9696
@if $class {
9797
.#{$class}-#{$width} {
9898
@include govuk-grid-column($width, $float, $at, $class: false);
9999
}
100100
} @else {
101101
box-sizing: border-box;
102-
@if $at != desktop {
102+
@if $at != tablet {
103103
width: 100%;
104104
}
105105
padding: 0 $nhsuk-gutter-half;

packages/core/tools/grid.unit.test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ describe('grid system', () => {
123123
width: 100%;
124124
padding: 0 16px;
125125
}
126-
@media (min-width: 46.25em) {
126+
@media (min-width: 61.25em) {
127127
.nhsuk-grid-column-full {
128128
width: 100%;
129129
float: left;
@@ -151,7 +151,7 @@ describe('grid system', () => {
151151
width: 100%;
152152
padding: 0 16px;
153153
}
154-
@media (min-width: 46.25em) {
154+
@media (min-width: 61.25em) {
155155
.nhsuk-grid-column-two-thirds {
156156
width: 66.6666666667%;
157157
float: left;
@@ -164,8 +164,8 @@ describe('grid system', () => {
164164
const sass = `
165165
${sassImports}
166166
167-
.nhsuk-grid-column-one-quarter-at-desktop {
168-
@include govuk-grid-column(one-quarter, $at: desktop, $class: false);
167+
.nhsuk-grid-column-one-quarter-at-tablet {
168+
@include govuk-grid-column(one-quarter, $at: tablet, $class: false);
169169
}
170170
`
171171

@@ -174,12 +174,12 @@ describe('grid system', () => {
174174
})
175175

176176
expect(results.css).toBe(outdent`
177-
.nhsuk-grid-column-one-quarter-at-desktop {
177+
.nhsuk-grid-column-one-quarter-at-tablet {
178178
box-sizing: border-box;
179179
padding: 0 16px;
180180
}
181-
@media (min-width: 61.25em) {
182-
.nhsuk-grid-column-one-quarter-at-desktop {
181+
@media (min-width: 46.25em) {
182+
.nhsuk-grid-column-one-quarter-at-tablet {
183183
width: 25%;
184184
float: left;
185185
}
@@ -234,7 +234,7 @@ describe('grid system', () => {
234234
width: 100%;
235235
padding: 0 16px;
236236
}
237-
@media (min-width: 46.25em) {
237+
@media (min-width: 61.25em) {
238238
.nhsuk-grid-column-one-half-right {
239239
width: 50%;
240240
float: right;
@@ -260,7 +260,7 @@ describe('grid system', () => {
260260
width: 100%;
261261
padding: 0 16px;
262262
}
263-
@media (min-width: 46.25em) {
263+
@media (min-width: 61.25em) {
264264
.nhsuk-grid-column-full {
265265
width: 100%;
266266
float: left;
@@ -286,7 +286,7 @@ describe('grid system', () => {
286286
width: 100%;
287287
padding: 0 16px;
288288
}
289-
@media (min-width: 46.25em) {
289+
@media (min-width: 61.25em) {
290290
.large-column-three-quarters {
291291
width: 75%;
292292
float: left;

0 commit comments

Comments
 (0)