-
Notifications
You must be signed in to change notification settings - Fork 9
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 taxonomy sidebar design #1222
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,48 @@ | ||
.govuk-taxonomy-sidebar { | ||
border-top: 10px solid $mainstream-brand; | ||
padding-top: 5px; | ||
border-top: 2px solid $govuk-blue; | ||
padding-top: $gutter-half; | ||
@include core-16; | ||
|
||
h2 { | ||
@include bold-24; | ||
margin-top: 0.3em; | ||
margin-bottom: 0.5em; | ||
.govuk-taxonomy-sidebar__heading { | ||
margin-top: 0; | ||
margin-bottom: $gutter-one-third; | ||
@include bold-19; | ||
} | ||
|
||
.taxon-description { | ||
margin-bottom: 0.75em; | ||
margin-top: 0; | ||
margin-bottom: $gutter-one-third; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
} | ||
|
||
nav { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again, this needs to be scoped |
||
margin-bottom: $gutter; | ||
} | ||
|
||
li { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. scoping needed |
||
padding: 0; | ||
list-style-type: none; | ||
margin-bottom: $gutter-one-third; | ||
} | ||
|
||
ul { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. scope |
||
// reset the default browser styles | ||
padding: 0; | ||
margin: 0; | ||
list-style: none; | ||
margin-bottom: 1.25em; | ||
} | ||
|
||
.govuk-taxonomy-sidebar__collections-heading { | ||
border-top: 1px solid $border-colour; | ||
margin-bottom: $gutter-half; | ||
margin-top: $gutter; | ||
padding-top: $gutter-half; | ||
} | ||
|
||
li { | ||
// reset the default browser styles | ||
padding: 0; | ||
margin-bottom: 0.75em; | ||
} | ||
.govuk-taxonomy-sidebar__collections-link { | ||
@include bold-19; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,5 @@ en: | |
in: "in" | ||
task_list_related: | ||
part_of: "Part of" | ||
taxonomy_sidebar: | ||
related_content: "Related content" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually wouldn't style an "a" directly. Sometimes we are forced to, but we absolutely need to ensure we're not styling all a tags on the page, so
.taxon-description a { blah }
or something may be necessary - ideally though the anchor would have a styling class such as .govuk-taxonomy-sidebar__link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem to be nested within the selector at the top, but massive 👍 to always avoiding styling base elements if possible.
We should only be doing this if there's no other way as it directly conflicts with our naming conventions that allow us to have confidence with components across so many applications.
https://github.com/alphagov/govuk_publishing_components/blob/master/docs/component_conventions.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically we're using BEM and namespacing