Skip to content
This repository has been archived by the owner. It is now read-only.

Allow hyphenated BEM in CSS #79

merged 1 commit into from Jul 26, 2017

Allow hyphenated BEM in CSS #79

merged 1 commit into from Jul 26, 2017


Copy link

@fofr fofr commented Jul 26, 2017

The GOV.UK Frontend alpha uses a BEM convention:

This convention encourages isolation within components.

GOV.UK Publishing Frontend ( are writing components that conform to this convention. Components should be easily movable/promotable to GOV.UK Frontend when appropriate.

Selector Allowed

This is the same as @alecgibson’s PR which had a lot of debate: #65

In February we decided not to do this here, most of those concerns have since been addressed:
#65 (comment)

* An extension of our original rules, hyphenated classes are still ok
* Allows underscores in BEM classes only
* Specifics of what is/is not allowed here:
@nickcolley nickcolley merged commit 4a8dd6c into master Jul 26, 2017
1 check passed
1 check passed
continuous-integration/jenkins/branch This commit looks good
@nickcolley nickcolley deleted the hyphenated-bem branch Jul 26, 2017
fofr added a commit that referenced this pull request Jul 27, 2017
Relax class naming rules for Sass to allow hyphenated BEM classes (#79)
@fofr fofr mentioned this pull request Jul 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.