Skip to content

Commit 9046afd

Browse files
Add tablet specific grid classes
Inspired by “desktop specific grid classs” in: alphagov/govuk-frontend#1094
1 parent 6610ad0 commit 9046afd

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
@@ -11,6 +11,15 @@
1111
margin-left: -($nhsuk-gutter-half);
1212
}
1313

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

0 commit comments

Comments
 (0)