Skip to content

Commit

Permalink
Merge pull request #654 from alphagov/release-v-0.0.28
Browse files Browse the repository at this point in the history
Release v0.0.28-alpha
  • Loading branch information
Jani Kraner authored Apr 13, 2018
2 parents 30efc0e + d9e35e7 commit 5461fac
Show file tree
Hide file tree
Showing 38 changed files with 320 additions and 84 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ Internal:
- Update publishing docs (PR [#651](https://github.com/alphagov/govuk-frontend/pull/651))
- Wrap `app.css` in conditional comments in review app layout (PR [#653](https://github.com/alphagov/govuk-frontend/pull/653))

## 0.0.28-alpha (Breaking release)

Fixes incomplete release from `packages/` and `dist/` in 0.0.27-alpha release.
Missing files were:
- globals/tools/_compatibility.scss
- globals/tools/_ie8.scss
- globals/settings/_compatibility.scss
- globals/settings/_ie8.scss

## 0.0.27-alpha (Breaking release)

Expand Down
2 changes: 1 addition & 1 deletion dist/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.27-alpha
0.0.28-alpha
34 changes: 34 additions & 0 deletions dist/components/globals/settings/_compatibility.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// We default these settings to true so that if they are missed we opt for a
// mild performance hit over a potential broken experience for the end-user.

/// Compatibility Mode: alphagov/govuk_frontend_toolkit
///
/// @type Boolean True if used in a project that also includes
/// alphagov/govuk_frontend_toolkit.

$govuk-compatibility-govukfrontendtoolkit: true !default;

/// Compatibility Mode: alphagov/govuk_template
///
/// @type Boolean True if used in a project that also includes
/// alphagov/govuk_template

$govuk-compatibility-govuktemplate: true !default;

/// Compatibility Mode: alphagov/govuk_elements
///
/// @type Boolean True if used in a project that also includes
/// alphagov/govuk_elements

$govuk-compatibility-govukelements: true !default;

/// Compatibility Product Map
///
/// @type Map Map of product names to their settings that we can use to lookup
/// states from within the `@govuk-compatibility` mixin.

$govuk-compatibility: (
govuk_frontend_toolkit: $govuk-compatibility-govukfrontendtoolkit,
govuk_template: $govuk-compatibility-govuktemplate,
govuk_elements: $govuk-compatibility-govukelements,
);
4 changes: 4 additions & 0 deletions dist/components/globals/settings/_ie8.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Whether the stylesheet being built is targeting Internet Explorer 8. Used by
// the ie8 mixin tools and in other settings.
// @type Bool
$govuk-is-ie8: false !default;
30 changes: 30 additions & 0 deletions dist/components/globals/tools/_compatibility.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/// Conditional Compatibility Mixin
///
/// Selectively output a block (available to the mixin as @content) if a given
/// $product is also identified as being used in the project.
///
/// This can then be used to include styles that are only needed to override
/// styles provided by those other products (e.g. where govuk_template has a
/// very specific link selector that otherwise affects buttons).
///
/// @example scss
/// // Override .my-class if GOV.UK Template is also being used
/// @include govuk-compatibility(govuk_template) {
/// .my-class {
/// color: inherit;
/// }
/// }
///
/// @param String Name of product that we are defending against.
///
/// @throw If product name is not recognised

@mixin govuk-compatibility($product) {
@if map-has-key($govuk-compatibility, $product) {
@if map-get($govuk-compatibility, $product) == true {
@content;
}
} @else {
@error "Non existent compatibility product '#{$product}'";
}
}
46 changes: 46 additions & 0 deletions dist/components/globals/tools/_ie8.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Include IE8 settings where these tools are used directly within a component
@import "../settings/ie8";

/// Conditionally include rules only for IE8
///
/// Only output the CSS passed to the mixin if the $govuk-is-ie8 variable is
/// set to true, which means the rules should only be outputted if compiling an
/// IE8 specific stylesheet.
///
/// @example scss - Usage
///
/// .foo {
/// min-width: 100px;
/// // Specify width for IE8 only
/// @include govuk-is-ie8 {
/// width: 100px;
/// }
/// }
@mixin govuk-if-ie8 {
@if $govuk-is-ie8 {
@content;
}
}

/// Conditionally exclude rules for IE8
///
/// Only output the CSS passed to the mixin if the $govuk-is-ie8 variable is
/// not set to true, which means the rules should be excluded when compiling
/// an IE8 specific stylesheet.
///
/// @example scss - Usage
///
/// .foo {
/// font-weight: bold;
///
/// // Enhance foo only for modern browsers (not IE8)
/// @include govuk-not-ie8 {
/// font-family: "Comic Sans MS", "Curlz MT" cursive, sans-serif;
/// color: #FF69B4;
/// }
/// }
@mixin govuk-not-ie8 {
@if not $govuk-is-ie8 {
@content;
}
}
File renamed without changes.
48 changes: 24 additions & 24 deletions packages/all/package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"name": "@govuk-frontend/all",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/back-link": "^0.0.27-alpha",
"@govuk-frontend/breadcrumbs": "^0.0.27-alpha",
"@govuk-frontend/button": "^0.0.27-alpha",
"@govuk-frontend/checkboxes": "^0.0.27-alpha",
"@govuk-frontend/date-input": "^0.0.27-alpha",
"@govuk-frontend/details": "^0.0.27-alpha",
"@govuk-frontend/error-message": "^0.0.27-alpha",
"@govuk-frontend/error-summary": "^0.0.27-alpha",
"@govuk-frontend/fieldset": "^0.0.27-alpha",
"@govuk-frontend/file-upload": "^0.0.27-alpha",
"@govuk-frontend/footer": "^0.0.27-alpha",
"@govuk-frontend/icons": "^0.0.27-alpha",
"@govuk-frontend/input": "^0.0.27-alpha",
"@govuk-frontend/label": "^0.0.27-alpha",
"@govuk-frontend/panel": "^0.0.27-alpha",
"@govuk-frontend/phase-banner": "^0.0.27-alpha",
"@govuk-frontend/radios": "^0.0.27-alpha",
"@govuk-frontend/select": "^0.0.27-alpha",
"@govuk-frontend/skip-link": "^0.0.27-alpha",
"@govuk-frontend/table": "^0.0.27-alpha",
"@govuk-frontend/tag": "^0.0.27-alpha",
"@govuk-frontend/textarea": "^0.0.27-alpha",
"@govuk-frontend/warning-text": "^0.0.27-alpha"
"@govuk-frontend/back-link": "^0.0.28-alpha",
"@govuk-frontend/breadcrumbs": "^0.0.28-alpha",
"@govuk-frontend/button": "^0.0.28-alpha",
"@govuk-frontend/checkboxes": "^0.0.28-alpha",
"@govuk-frontend/date-input": "^0.0.28-alpha",
"@govuk-frontend/details": "^0.0.28-alpha",
"@govuk-frontend/error-message": "^0.0.28-alpha",
"@govuk-frontend/error-summary": "^0.0.28-alpha",
"@govuk-frontend/fieldset": "^0.0.28-alpha",
"@govuk-frontend/file-upload": "^0.0.28-alpha",
"@govuk-frontend/footer": "^0.0.28-alpha",
"@govuk-frontend/icons": "^0.0.28-alpha",
"@govuk-frontend/input": "^0.0.28-alpha",
"@govuk-frontend/label": "^0.0.28-alpha",
"@govuk-frontend/panel": "^0.0.28-alpha",
"@govuk-frontend/phase-banner": "^0.0.28-alpha",
"@govuk-frontend/radios": "^0.0.28-alpha",
"@govuk-frontend/select": "^0.0.28-alpha",
"@govuk-frontend/skip-link": "^0.0.28-alpha",
"@govuk-frontend/table": "^0.0.28-alpha",
"@govuk-frontend/tag": "^0.0.28-alpha",
"@govuk-frontend/textarea": "^0.0.28-alpha",
"@govuk-frontend/warning-text": "^0.0.28-alpha"
}
}
4 changes: 2 additions & 2 deletions packages/back-link/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@govuk-frontend/back-link",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/globals": "^0.0.27-alpha"
"@govuk-frontend/globals": "^0.0.28-alpha"
}
}
6 changes: 3 additions & 3 deletions packages/breadcrumbs/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@govuk-frontend/breadcrumbs",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/globals": "^0.0.27-alpha",
"@govuk-frontend/icons": "^0.0.27-alpha"
"@govuk-frontend/globals": "^0.0.28-alpha",
"@govuk-frontend/icons": "^0.0.28-alpha"
}
}
6 changes: 3 additions & 3 deletions packages/button/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@govuk-frontend/button",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/globals": "^0.0.27-alpha",
"@govuk-frontend/icons": "^0.0.27-alpha"
"@govuk-frontend/globals": "^0.0.28-alpha",
"@govuk-frontend/icons": "^0.0.28-alpha"
}
}
6 changes: 3 additions & 3 deletions packages/checkboxes/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@govuk-frontend/checkboxes",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/globals": "^0.0.27-alpha",
"@govuk-frontend/label": "^0.0.27-alpha"
"@govuk-frontend/globals": "^0.0.28-alpha",
"@govuk-frontend/label": "^0.0.28-alpha"
}
}
8 changes: 4 additions & 4 deletions packages/date-input/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@govuk-frontend/date-input",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/error-message": "^0.0.27-alpha",
"@govuk-frontend/globals": "^0.0.27-alpha",
"@govuk-frontend/label": "^0.0.27-alpha"
"@govuk-frontend/error-message": "^0.0.28-alpha",
"@govuk-frontend/globals": "^0.0.28-alpha",
"@govuk-frontend/label": "^0.0.28-alpha"
}
}
4 changes: 2 additions & 2 deletions packages/details/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@govuk-frontend/details",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/globals": "^0.0.27-alpha"
"@govuk-frontend/globals": "^0.0.28-alpha"
}
}
4 changes: 2 additions & 2 deletions packages/error-message/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@govuk-frontend/error-message",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/globals": "^0.0.27-alpha"
"@govuk-frontend/globals": "^0.0.28-alpha"
}
}
4 changes: 2 additions & 2 deletions packages/error-summary/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@govuk-frontend/error-summary",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/globals": "^0.0.27-alpha"
"@govuk-frontend/globals": "^0.0.28-alpha"
}
}
4 changes: 2 additions & 2 deletions packages/fieldset/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@govuk-frontend/fieldset",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/globals": "^0.0.27-alpha"
"@govuk-frontend/globals": "^0.0.28-alpha"
}
}
4 changes: 2 additions & 2 deletions packages/file-upload/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@govuk-frontend/file-upload",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/globals": "^0.0.27-alpha"
"@govuk-frontend/globals": "^0.0.28-alpha"
}
}
6 changes: 3 additions & 3 deletions packages/footer/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@govuk-frontend/footer",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"@govuk-frontend/globals": "^0.0.27-alpha",
"@govuk-frontend/icons": "^0.0.27-alpha"
"@govuk-frontend/globals": "^0.0.28-alpha",
"@govuk-frontend/icons": "^0.0.28-alpha"
}
}
2 changes: 1 addition & 1 deletion packages/globals/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@govuk-frontend/globals",
"version": "0.0.27-alpha",
"version": "0.0.28-alpha",
"dependencies": {
"sass-mq": "^3.3.2"
}
Expand Down
34 changes: 34 additions & 0 deletions packages/globals/settings/_compatibility.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// We default these settings to true so that if they are missed we opt for a
// mild performance hit over a potential broken experience for the end-user.

/// Compatibility Mode: alphagov/govuk_frontend_toolkit
///
/// @type Boolean True if used in a project that also includes
/// alphagov/govuk_frontend_toolkit.

$govuk-compatibility-govukfrontendtoolkit: true !default;

/// Compatibility Mode: alphagov/govuk_template
///
/// @type Boolean True if used in a project that also includes
/// alphagov/govuk_template

$govuk-compatibility-govuktemplate: true !default;

/// Compatibility Mode: alphagov/govuk_elements
///
/// @type Boolean True if used in a project that also includes
/// alphagov/govuk_elements

$govuk-compatibility-govukelements: true !default;

/// Compatibility Product Map
///
/// @type Map Map of product names to their settings that we can use to lookup
/// states from within the `@govuk-compatibility` mixin.

$govuk-compatibility: (
govuk_frontend_toolkit: $govuk-compatibility-govukfrontendtoolkit,
govuk_template: $govuk-compatibility-govuktemplate,
govuk_elements: $govuk-compatibility-govukelements,
);
4 changes: 4 additions & 0 deletions packages/globals/settings/_ie8.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Whether the stylesheet being built is targeting Internet Explorer 8. Used by
// the ie8 mixin tools and in other settings.
// @type Bool
$govuk-is-ie8: false !default;
30 changes: 30 additions & 0 deletions packages/globals/tools/_compatibility.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/// Conditional Compatibility Mixin
///
/// Selectively output a block (available to the mixin as @content) if a given
/// $product is also identified as being used in the project.
///
/// This can then be used to include styles that are only needed to override
/// styles provided by those other products (e.g. where govuk_template has a
/// very specific link selector that otherwise affects buttons).
///
/// @example scss
/// // Override .my-class if GOV.UK Template is also being used
/// @include govuk-compatibility(govuk_template) {
/// .my-class {
/// color: inherit;
/// }
/// }
///
/// @param String Name of product that we are defending against.
///
/// @throw If product name is not recognised

@mixin govuk-compatibility($product) {
@if map-has-key($govuk-compatibility, $product) {
@if map-get($govuk-compatibility, $product) == true {
@content;
}
} @else {
@error "Non existent compatibility product '#{$product}'";
}
}
Loading

0 comments on commit 5461fac

Please sign in to comment.