Skip to content

Commit 8feaca8

Browse files
author
Vanita Barrett
authored
Merge pull request #2376 from alphagov/support-release-3.14.0
Release 3.14.0
2 parents 0bd698c + ae6fecf commit 8feaca8

File tree

9 files changed

+60
-9
lines changed

9 files changed

+60
-9
lines changed

dist/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.13.1
1+
3.14.0

dist/govuk-frontend-3.13.1.min.css renamed to dist/govuk-frontend-3.14.0.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

dist/govuk-frontend-ie8-3.13.1.min.css renamed to dist/govuk-frontend-ie8-3.14.0.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/govuk/components/panel/_index.scss

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,19 @@
1212
text-align: center;
1313

1414
@include govuk-media-query($until: tablet) {
15-
padding: govuk-spacing(6) - $govuk-border-width;
15+
padding: govuk-spacing(3) - $govuk-border-width;
16+
17+
// This is an if-all-else-fails attempt to stop long words from overflowing the container
18+
// on very narrow viewports by forcing them to break and wrap instead. This
19+
// overflowing is more likely to happen when user increases text size on a mobile eg. using
20+
// iOS Safari text resize controls.
21+
//
22+
// The overflowing is a particular problem with the panel component since it uses white
23+
// text: when the text overflows the container, it is invisible on the white (page)
24+
// background. When the text in our other components overflow, the user might have to scroll
25+
// horizontally to view it but the the text remains legible.
26+
overflow-wrap: break-word;
27+
word-wrap: break-word; // Support IE (autoprefixer doesn't add this as it's not a prefix)
1628
}
1729
}
1830

package/govuk/helpers/_spacing.scss

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,26 @@
88
///
99
/// Returns measurement corresponding to the spacing point requested.
1010
///
11-
/// @param {Number} $spacing-point - Point on the spacing scale (set in `settings/_spacing.sccs`)
11+
/// @param {Number} $spacing-point - Point on the spacing scale
12+
/// (set in `settings/_spacing.scss`)
1213
///
13-
/// @returns {String} Spacing Measurement eg. 10px
14+
/// @returns {String} Spacing measurement eg. 10px
1415
///
1516
/// @example scss
1617
/// .element {
1718
/// padding: govuk-spacing(5);
18-
/// top: govuk-spacing(2) !important; // if `!important` is required
1919
/// }
20+
///
21+
/// @example scss Using negative spacing
22+
/// .element {
23+
/// margin-top: govuk-spacing(-1);
24+
/// }
25+
///
26+
/// @example scss Marking spacing declarations as important
27+
/// .element {
28+
/// margin-top: govuk-spacing(1) !important;
29+
/// }
30+
///
2031
/// @access public
2132

2233
@function govuk-spacing($spacing-point) {
@@ -27,11 +38,18 @@
2738
+ "#{$actual-input-type}.";
2839
}
2940

41+
$is-negative: false;
42+
@if ($spacing-point < 0) {
43+
$is-negative: true;
44+
$spacing-point: abs($spacing-point);
45+
}
46+
3047
@if not map-has-key($govuk-spacing-points, $spacing-point) {
3148
@error "Unknown spacing variable `#{$spacing-point}`. Make sure you are using a point from the spacing scale in `_settings/spacing.scss`.";
3249
}
3350

34-
@return map-get($govuk-spacing-points, $spacing-point);
51+
$value: map-get($govuk-spacing-points, $spacing-point);
52+
@return if($is-negative, $value * -1, $value);
3553
}
3654

3755
/// Responsive spacing

package/govuk/overrides/_all.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import "display";
22
@import "spacing";
3+
@import "text-align";
34
@import "typography";
45
@import "width";
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@if not mixin-exists("govuk-exports") {
2+
@warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3+
}
4+
5+
@import "../base";
6+
7+
// stylelint-disable declaration-no-important
8+
@include govuk-exports("govuk/overrides/text-align") {
9+
.govuk-\!-text-align-left {
10+
text-align: left !important;
11+
}
12+
13+
.govuk-\!-text-align-centre {
14+
text-align: center !important;
15+
}
16+
17+
.govuk-\!-text-align-right {
18+
text-align: right !important;
19+
}
20+
}

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "govuk-frontend",
33
"description": "GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.",
4-
"version": "3.13.1",
4+
"version": "3.14.0",
55
"main": "govuk/all.js",
66
"sass": "govuk/all.scss",
77
"engines": {

0 commit comments

Comments
 (0)