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

Render nested contents for specialist documents #328

Merged
merged 3 commits into from
Apr 19, 2017
Merged

Conversation

fofr
Copy link
Contributor

@fofr fofr commented Apr 19, 2017

https://trello.com/c/phs722pV/186-1-add-new-contents-list

  • Use an em dash for all contents lists
  • Include a two level contents list (based on h2s and h3s)
  • Style the h2s without a list marker and in bold
  • h3s appear like standard contents lists
  • h4s and further, although appearing in the headers hash are not displayed – at this level the contents list stops being useful
  • Markup mostly ported from specialist-frontend
  • Move strip_trailing_colons into shared helper
Nested Normal
screen shot 2017-04-19 at 11 24 55 screen shot 2017-04-19 at 11 25 00

On older browsers that don't support content: or @supports:
screen shot 2017-04-19 at 12 51 12

em dashes make each content item clearer in the list

* Replace media query hack with `@supports` - IE9-11 will get disc
bullets
* Move list-style-type declaration next to @supports so it’s clear that
it gets overridden
* Add 5px to the margins to give extra space around the em dash
@boffbowsh boffbowsh temporarily deployed to government-frontend-pr-328 April 19, 2017 11:27 Inactive
* Include a two level contents list (based on h2s and h3s)
* Style the h2s without a list marker and in bold
* h3s appear like standard contents lists
* h4s and further, although appearing in the `headers` hash are not
displayed – at this level the contents list stops being useful
* Markup mostly ported from specialist-frontend
* Move strip_trailing_colons into shared helper
This gives a better content outline, while the previous heading was
valid, the HTML5 outline algorithm is not widely supported.
@NickColley
Copy link
Contributor

Did you get Mia's eyes on the lack of emdash at the top level?

@fofr
Copy link
Contributor Author

fofr commented Apr 19, 2017

@NickColley Yep.

@NickColley
Copy link
Contributor

I seem to remember (might be wrong) that some of our other documents also have nested contents list, does this change only update specialist documents to have nested list behaviour?

@fofr
Copy link
Contributor Author

fofr commented Apr 19, 2017

@NickColley No other format in government-frontend has nested contents. The existing contents list is always one level deep and remains the same. Nested contents only applies to specialist documents.

@miaallers-zz
Copy link

Looks good to me!

Copy link
Contributor

@NickColley NickColley left a comment

Choose a reason for hiding this comment

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

👍

@fofr fofr merged commit 29bdd82 into master Apr 19, 2017
@fofr fofr deleted the contents-design-update branch April 19, 2017 16:31
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.

4 participants