Closed fofr closed 5 years ago
We have begun using BEM for component CSS. See https://github.com/alphagov/govuk-lint/pull/79
Having used BEM when writing components, I'd definitely recommend rolling this approach out across GOV.UK. It makes it much easier to reason about the context a CSS rule applies to and to find corresponding CSS rules for a DOM element.
I’m in favour of BEM. The govuk-frontend approach is 👌
This repo has now been archived. Styleguide discussions can be moved to https://github.com/alphagov/gds-way.
I'd be interested to see the BEM discussion continue!
Following on from this PR and discussion: https://github.com/alphagov/govuk-lint/pull/65, we've created this issue to discuss what benefits BEM can give us. It is somewhere permanent and public, for future reference.
BEM: "Block Element Modifier": An introduction to BEM
Please consider these perspectives:
If we believe using BEM is a good idea, we should consider what the first steps towards using BEM would be.