Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update govuk-main-wrapper object and add a large varient #602

Merged
merged 1 commit into from
Mar 26, 2018

Conversation

dashouse
Copy link

This PR:

  • Updates the govuk-main-wrapper class to use the responsive spacing mixin, rather than the fixed spacing scale with media queries.
  • Adds a large variant of govuk-main-wrapper (govuk-main-wrapper--l) for use on pages where there is no Back link, Breadcrumb or Phase banner. This applies some more space to the top and bottom of the page.

With breadcrumb
screen shot 2018-03-13 at 11 54 47

Without breadcrumb (standard govuk-main-wrapper
screen shot 2018-03-13 at 11 55 09

Without breadcrumb (using govuk-main-wrapper--l)
screen shot 2018-03-13 at 11 55 27

@NickColley
Copy link
Contributor

NickColley commented Mar 13, 2018

Nice approach.

Is this useful across services or just for us on the design system?

Edit: Misunderstood this, nevermind, makes sense.

@alex-ju
Copy link
Contributor

alex-ju commented Mar 19, 2018

Definitely a good approach. Did some testing (captures below).

I'm wandering if we should have the page title vertically aligned regardless of having or not a back-link on the page (i.e. when a service has the back button only on some pages to have the title in the same y-axis location) - not sure is a common scenario.

Otherwise I'm happy for this to get merged.

govuk-c-back-link+govuk-main-wrapper
wrapper-desktop-back-link
govuk-main-wrapper--l
wrapper-desktop-no-back-link
govuk-c-back-link+govuk-main-wrapper
wrapper-mobile-back-link
govuk-main-wrapper--l
wrapper-mobile-no-back-link

Copy link
Contributor

@36degrees 36degrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like it, but got a couple of minor issues / questions.

//
// Example usage without Breadcrumbs, phase banners, back links:
// <div class="govuk-o-width-container">
// <div class="govuk-o-main-wrapper--l">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modifiers (--) should always be used with the classes that they are modifying – in which case this would be class="govuk-o-main-wrapper govuk-o-main-wrapper--l".

// Use govuk-main-wrapper--l when you page does not have Breadcrumbs, phase banners or back links
@mixin govuk-main-wrapper--l {
@include govuk-responsive-padding($govuk-spacing-responsive-8, "top");
@include govuk-responsive-padding($govuk-spacing-responsive-8, "bottom");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why the presence (or absence) of breadcrumbs / back links would affect the padding at the bottom of the page – should this still be responsive-6?

@dashouse
Copy link
Author

I've fixed @36degrees 's issues.
@alex-ju I originally intended for this to position the H1 in the same place, irregardless of back link or breadcrumb, however in practice 80px at the top looks too much.

I've messed up these commits slightly I think, had some issues with a rebase on the CHANGELOG

@dashouse dashouse changed the title RFC - Update govuk-main-wrapper object and add a large varient Update govuk-main-wrapper object and add a large varient Mar 21, 2018
Update to use the responsive spacing mixin and add a large variant for use when the page does not contain back links or breadcrumbs
Copy link
Contributor

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to be merged to me 👍.
Just helped rebasing for the CHANGELOG.

@dashouse dashouse merged commit 44e4108 into master Mar 26, 2018
@dashouse dashouse deleted the update-main-wrapper-object branch March 26, 2018 08:44
@dashouse
Copy link
Author

Merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants