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 #542 from alphagov/revert-and-fix-upgrade-to-govuk…
Browse files Browse the repository at this point in the history
…-frontend-v3

Revert and fix upgrade to govuk frontend v3
  • Loading branch information
injms authored Sep 23, 2019
2 parents 96bbb10 + a855717 commit 84c165f
Show file tree
Hide file tree
Showing 43 changed files with 489 additions and 1,495 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.1.0'
gem 'govuk_app_config', '~> 2.0'
gem 'govuk_elements_rails'
gem 'govuk_frontend_toolkit', '~> 8.2.0'
gem 'govuk_publishing_components', '~> 17.21.0'
gem 'govuk_publishing_components', '~> 20.3.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.1'
gem 'phantomjs', '~> 2.1', '>= 2.1.1.0'
end

group :development do
Expand Down
13 changes: 6 additions & 7 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 (17.21.0)
govuk_publishing_components (20.3.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.7.0)
rouge (3.10.0)
rubocop (0.72.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
Expand Down Expand Up @@ -274,9 +274,8 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassc (2.0.1)
sassc (2.2.0)
ffi (~> 1.9)
rake
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
Expand Down Expand Up @@ -360,10 +359,10 @@ DEPENDENCIES
govuk_app_config (~> 2.0)
govuk_elements_rails
govuk_frontend_toolkit (~> 8.2.0)
govuk_publishing_components (~> 17.21.0)
govuk_publishing_components (~> 20.3.0)
jasmine-rails
listen (>= 3.0.5, < 3.2)
phantomjs (~> 2.1.1)
phantomjs (~> 2.1, >= 2.1.1.0)
plek (= 3.0.0)
poltergeist
pry-byebug
Expand All @@ -382,4 +381,4 @@ RUBY VERSION
ruby 2.6.3p62

BUNDLED WITH
1.16.2
1.17.2
14 changes: 5 additions & 9 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// The main application stylesheet
$govuk-compatibility-govuktemplate: true;
$govuk-compatibility-govukfrontendtoolkit: true;
$govuk-compatibility-govukelements: true;

@import "govuk_publishing_components/all_components";

@import "common";

Expand All @@ -12,18 +16,10 @@
@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: 6 additions & 19 deletions app/assets/stylesheets/hacks/_full-width.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
.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 {
.app-full-width {
#global-header-bar { // scss-lint:disable IdSelector
display: none;
}
}

.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;
}
.app-\!-full-width-override {
margin: auto !important;
max-width: none !important;
}
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: $white;
color: govuk-colour("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: $gutter-half;
margin-bottom: govuk-spacing(3);

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

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

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

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


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

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

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

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

@include media(tablet) {
margin-bottom: $gutter * 2;
margin-bottom: govuk-spacing(9);
}
}
34 changes: 2 additions & 32 deletions app/assets/stylesheets/modules/_change-history.scss
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
.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;
}
}
.app-change-history__change-note {
color: $govuk-secondary-text-colour;
}
34 changes: 8 additions & 26 deletions app/assets/stylesheets/modules/_collection.scss
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
.collection {
border-bottom: 1px solid $border-colour;

padding-bottom: $gutter-half;
margin-bottom: $gutter-half;
.app-collection {
border-bottom: 1px solid $govuk-border-colour;
margin-bottom: govuk-spacing(3);
padding-bottom: govuk-spacing(3);

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

&:last-child {
margin-bottom: 0;
border-bottom: none;
}

&__title {
@include bold-36;
margin-bottom: 5px;
margin-top: 1.25em;
margin-bottom: 0;
}

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

&__link {
@include bold-24;
margin: 0.8333333333em 0;
}

&__link-description {
@include core-19;
color: $govuk-secondary-text-colour;
}
}
5 changes: 2 additions & 3 deletions app/assets/stylesheets/modules/_community-contact.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.community-contact {
@include gutter-vertical-margins;
.app-community-contact {
@include media(tablet) {
text-align: right;
padding-top: $gutter-half;
padding-top: govuk-spacing(8);
}
}
17 changes: 0 additions & 17 deletions app/assets/stylesheets/modules/_govspeak-wrapper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,4 @@
@include media(tablet) {
padding-top: 1.875em;
}

.govuk-govspeak p,
.govuk-govspeak ol,
.govuk-govspeak ul {
// govspeak margin bottom is 20px
margin-bottom: $gutter-half;
}

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

margin-bottom: $gutter-half;
.app-hero {
background-color: $govuk-brand-colour;
color: govuk-colour("white");
margin-bottom: govuk-spacing(3);
position: relative;
top: -1px;

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

a:link,
a:visited {
font-weight: bold;
color: $white;
}

a:hover,
a:active {
color: $light-blue-25;
@include govuk-typography-weight-bold;
}
}

&__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;
}
}

&__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;
}
}
.app-hero-lead {
line-height: 1.35;
}

&__search {
margin-bottom: $gutter-half;
}
.app-hero__heading--inverse,
.app-hero__body--inverse {
color: govuk-colour("white");
}
Loading

0 comments on commit 84c165f

Please sign in to comment.