Skip to content
This repository has been archived by the owner on Mar 5, 2018. It is now read-only.

Add some heading helper classes #469

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mgdhs
Copy link

@mgdhs mgdhs commented Jan 24, 2017

Description

This adds some helper functionality to headings. Don't you hate when someone says 'make that heading a h4', but to be semantic and accessible, it has to stay a <h3>. Well, these helpers let you have the best of both worlds. It can be a h3, but look like a h4.

Additional information

  • It may be more useful in non-application uses, such as authors entering content into a CMS. However, it can be useful within a web application too.
  • It breaks the guideline of 'don't name things based on appearance', and could probably be done using alternative class names. However, it is useful to keep consistency within your site.
  • It could easily be abused. <p class="h2">My heading</p> could be a nasty result of using this badly. Some clear guidance will need to be included in the Design Guide.
  • It is useful in circumstances where the space available to headings is narrow and the default headings look to big. Here's a prominent example where we use it in the wild.
  • I was initially unconvinced this was a good idea, but it is something we use only when needed with great success.

Definition of Done

  • Content/documentation reviewed by Julian or someone in the Content Team
  • UX reviewed by Gary or someone the Design team
  • Code reviewed by one of the core developers
  • Acceptance Testing
  • Stakeholder/PO review
  • CHANGELOG updated

@elisechant
Copy link

Yes! we needed this. ⭐️

@klepas klepas self-assigned this Feb 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants