Skip to content

Commit 5edb790

Browse files
Add tablet specific grid classes
Inspired by “desktop specific grid classs” in: alphagov/govuk-frontend#1094
1 parent 9c96464 commit 5edb790

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/core/objects/_grid.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
margin-left: -($nhsuk-gutter-half);
1616
}
1717

18+
// These *must* be defined in a separate loop as they have the same
19+
// specificity as the non-breakpoint specific classes, so need to appear before
20+
// them in the outputted CSS
21+
@each $width in map-keys($nhsuk-grid-widths) {
22+
.nhsuk-grid-column-#{$width}-from-tablet {
23+
@include govuk-grid-column($width, $at: tablet, $class: false);
24+
}
25+
}
26+
1827
@each $width in map.keys($nhsuk-grid-widths) {
1928
.nhsuk-grid-column-#{$width} {
2029
@include nhsuk-grid-column($width, $class: false);

0 commit comments

Comments
 (0)