Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #539 from alphagov/revert-518-update-to-govuk-fron…
Browse files Browse the repository at this point in the history
…tend-3-0

Revert "Update to GOV.UK Frontend v3"
  • Loading branch information
Vanita Barrett authored Sep 18, 2019
2 parents 93a9cc1 + 9ef03e0 commit a8e01ca
Show file tree
Hide file tree
Showing 39 changed files with 1,421 additions and 452 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gem 'gds-api-adapters', '~> 60.0.0'
gem 'govuk_app_config', '~> 2.0'
gem 'govuk_elements_rails'
gem 'govuk_frontend_toolkit', '~> 8.2.0'
gem 'govuk_publishing_components', '~> 20.3.0'
gem 'govuk_publishing_components', '~> 17.21.0'
gem 'plek', '3.0.0'
gem 'rails', '~> 5.2.3'
gem 'rails-i18n', '~> 5.1.3'
Expand All @@ -18,7 +18,7 @@ gem 'uglifier', '>= 1.3.0'
group :development, :test do
gem 'govuk-lint'
gem 'jasmine-rails'
gem 'phantomjs', '~> 2.1', '>= 2.1.1.0'
gem 'phantomjs', '~> 2.1.1'
end

group :development do
Expand Down
13 changes: 7 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ GEM
govuk_frontend_toolkit (8.2.0)
railties (>= 3.1.0)
sass (>= 3.2.0)
govuk_publishing_components (20.3.0)
govuk_publishing_components (17.21.0)
gds-api-adapters
govuk_app_config
govuk_frontend_toolkit
Expand Down Expand Up @@ -246,7 +246,7 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
robotex (1.0.0)
rouge (3.10.0)
rouge (3.7.0)
rubocop (0.72.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
Expand Down Expand Up @@ -274,8 +274,9 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassc (2.2.0)
sassc (2.0.1)
ffi (~> 1.9)
rake
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
Expand Down Expand Up @@ -359,10 +360,10 @@ DEPENDENCIES
govuk_app_config (~> 2.0)
govuk_elements_rails
govuk_frontend_toolkit (~> 8.2.0)
govuk_publishing_components (~> 20.3.0)
govuk_publishing_components (~> 17.21.0)
jasmine-rails
listen (>= 3.0.5, < 3.2)
phantomjs (~> 2.1, >= 2.1.1.0)
phantomjs (~> 2.1.1)
plek (= 3.0.0)
poltergeist
pry-byebug
Expand All @@ -381,4 +382,4 @@ RUBY VERSION
ruby 2.6.3p62

BUNDLED WITH
1.17.2
1.16.2
11 changes: 7 additions & 4 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
$govuk-compatibility-govuktemplate: true;
$govuk-compatibility-govukfrontendtoolkit: true;
$govuk-compatibility-govukelements: true;
@import "govuk_publishing_components/all_components";
// The main application stylesheet

@import "common";

Expand All @@ -15,12 +12,18 @@ $govuk-compatibility-govukelements: true;
@import "modules/community-contact";
@import "modules/govspeak-wrapper";
@import "modules/hero";
@import "modules/improve-this-page";
@import "modules/link-unit";
@import "modules/main-service-manual";
@import "modules/metadata";
@import "modules/notice";
@import "modules/page-contents";
@import "modules/page-header";
@import "modules/panel";
@import "modules/related-content";
@import "modules/search";
@import "modules/service-standard-point";
@import "modules/subsections";
@import "modules/typography";

@import "govuk_publishing_components/all_components";
25 changes: 19 additions & 6 deletions app/assets/stylesheets/hacks/_full-width.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
.app-full-width {
#global-header-bar { // scss-lint:disable IdSelector
.full-width {
// We're overriding static, we have to use IDs.
// scss-lint:disable IdSelector
#wrapper {
margin: 0;
width: auto;
max-width: 100%;
}

#global-header-bar {
display: none;
}
}

.app-\!-full-width-override {
margin: auto !important;
max-width: none !important;
.govuk-beta-label {
border-bottom: none;
}

.full-page-width-wrapper,
#wrapper .report-a-problem-toggle-wrapper,
#wrapper .report-a-problem-container {
@extend %site-width-container;
}
}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/hacks/_header-tweaks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// this work, we need to slightly tweak the header's CSS from our app.
.header-title {
float: left;
color: govuk-colour("white");
color: $white;
@include bold-24;

// When the title appears on its own line (the search box is hidden and only a
Expand Down
16 changes: 8 additions & 8 deletions app/assets/stylesheets/mixins/_margins.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
@mixin responsive-bottom-margin {
margin-bottom: govuk-spacing(3);
margin-bottom: $gutter-half;

@include media(tablet) {
margin-bottom: govuk-spacing(7);
margin-bottom: $gutter * 1.5;
}
}

@mixin responsive-top-margin {
margin-top: govuk-spacing(3);
margin-top: $gutter-half;

@include media(tablet) {
margin-top: govuk-spacing(7);
margin-top: $gutter * 1.5;
}
}

Expand All @@ -21,11 +21,11 @@


@mixin gutter-bottom-margin {
margin-bottom: govuk-spacing(6);
margin-bottom: $gutter;
}

@mixin gutter-top-margin {
margin-top: govuk-spacing(6);
margin-top: $gutter;
}

@mixin gutter-vertical-margins {
Expand All @@ -34,9 +34,9 @@
}

@mixin gutter-bottom-margin-to-double {
margin-bottom: govuk-spacing(3);
margin-bottom: $gutter;

@include media(tablet) {
margin-bottom: govuk-spacing(9);
margin-bottom: $gutter * 2;
}
}
34 changes: 32 additions & 2 deletions app/assets/stylesheets/modules/_change-history.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
.app-c-change-history__change-note {
color: $govuk-secondary-text-colour;
.change-history {
margin-top: 30px;
width: 66%;

&__latest-change {

dt {
@include core-19;
}

dd {
@include bold-24;
margin-bottom: 10px;
}
}

&__summary {
@include core-16;
color: $grey-1;
}

&__past {

time {
@include bold-19;
}

li {
list-style: none;
margin-bottom: 10px;
}
}
}
12 changes: 6 additions & 6 deletions app/assets/stylesheets/modules/_collection.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.collection {
border-bottom: 1px solid $govuk-border-colour;
border-bottom: 1px solid $border-colour;

padding-bottom: govuk-spacing(3);
margin-bottom: govuk-spacing(3);
padding-bottom: $gutter-half;
margin-bottom: $gutter-half;

@include media(tablet) {
padding-bottom: govuk-spacing(6);
margin-bottom: govuk-spacing(6);
padding-bottom: $gutter;
margin-bottom: $gutter;
}

&:last-child {
Expand All @@ -22,7 +22,7 @@

&__description {
@include core-24;
color: $govuk-secondary-text-colour;
color: $secondary-text-colour;
margin-top: 0;
}

Expand Down
5 changes: 3 additions & 2 deletions app/assets/stylesheets/modules/_community-contact.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.app-c-community-contact {
.community-contact {
@include gutter-vertical-margins;
@include media(tablet) {
text-align: right;
padding-top: govuk-spacing(8);
padding-top: $gutter-half;
}
}
11 changes: 8 additions & 3 deletions app/assets/stylesheets/modules/_govspeak-wrapper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@
.govuk-govspeak p,
.govuk-govspeak ol,
.govuk-govspeak ul {
line-height: 1.45;
// govspeak margin bottom is 20px
margin-bottom: govuk-spacing(3);
margin-bottom: $gutter-half;
}

.govuk-govspeak h2 {
@extend %govuk-heading-m;
margin-top: 15px;
padding-top: 15px;
// govspeak margin-top is 45px
@include media(tablet) {
margin-top: 15px;
padding-top: 30px;
}
}
}
62 changes: 47 additions & 15 deletions app/assets/stylesheets/modules/_hero.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,57 @@
.app-c-hero {
background-color: $govuk-brand-colour;
color: govuk-colour("white");
margin-bottom: govuk-spacing(3);
position: relative;
top: -1px;
.hero {
background-color: $govuk-blue;
color: $white;

margin-bottom: $gutter-half;

@include media(tablet) {
margin-bottom: govuk-spacing(6);
margin-bottom: $gutter;
}

a:link,
a:visited {
@include govuk-typography-weight-bold;
font-weight: bold;
color: $white;
}
}

.app-c-hero-lead {
line-height: 1.35;
}
a:hover,
a:active {
color: $light-blue-25;
}

&__content {
$border-top-width: 10px;

@extend %site-width-container;

padding: ($gutter-half + $border-top-width) 0 $gutter-half;

@include media(tablet) {
padding: ($gutter + $border-top-width) 0 $gutter;
}
}

.app-c-hero__heading--inverse,
.app-c-hero__body--inverse {
color: govuk-colour("white");
&__title {
@include core-48;
margin-bottom: $gutter;
font-weight: bold;
}

&__description {
@include core-24;
}

&__feedback-link {
@include core-16;
line-height: 1.25;
margin-top: $gutter;

@include media(tablet) {
margin-top: 0;
}
}

&__search {
margin-bottom: $gutter-half;
}
}
Loading

0 comments on commit a8e01ca

Please sign in to comment.