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

govuk-list needs margin adjustment #1069

Closed
dashouse opened this issue Nov 19, 2018 · 0 comments
Closed

govuk-list needs margin adjustment #1069

dashouse opened this issue Nov 19, 2018 · 0 comments

Comments

@dashouse
Copy link

dashouse commented Nov 19, 2018

On small screens govuk-list > <li> has no bottom margin (with 5px being applied at tablet and above)

This works when the bullet or number modifier is added e.g. class="govuk-list govuk-list--bullet" because the bullet marker gives a clear indication of the start of a new list item.

When the govuk-list class is applied on it's own, such as a list of links the <li>'s appear to run into each other like so:

screen shot 2018-11-19 at 15 38 13

My suggestion would be to apply to spacing to the govuk-list class for all breakpoints, then remove when the modifiers are added.

  // add spacing to list on all breakpoints

  %govuk-list > li {
      margin-bottom: govuk-spacing(1);
  }

  %govuk-list--bullet > li,
  %govuk-list--number > li {
  // remove spacing from govuk-list
  margin-bottom: 0; 
  
  // add spacing back in from tablet
   @include govuk-media-query($from: tablet) {
      margin-bottom: govuk-spacing(1);
    }
  }

Before
screen shot 2018-11-19 at 15 36 46

After
screen shot 2018-11-19 at 15 37 42

@dashouse dashouse changed the title govuk-list needs margin on each <li>, which is then removed by modifiers govuk-list--bullet and govuk-list--number govuk-list needs margin adjustment Nov 19, 2018
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

No branches or pull requests

1 participant