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

Use placeholders when @​extend'ing in prose scope #550

Merged
merged 3 commits into from
Feb 26, 2018

Commits on Feb 26, 2018

  1. Use placeholders when extending in prose scope

    This updates the prose scope (and the things the prose scope depends on) such that we only ever @​extend placeholder classes (classes starting with % which are not outputted into the CSS themselves)
    
    This abstraction gives us control over which occurrences of the selector are included by the @​extend. Without this change, occurrences of e.g. the heading classes within the fieldset component are also ending up being ‘applied’ to the prose scope, leading to selectors like `.govuk-c-fieldset__legend .govuk-prose-scope h4` in the CSS. This makes no sense, as the prose scope should never be used within the fieldset legend.
    
    With this change, only occurrences of the placeholder class are included when @​extend’ing. This means that we can define e.g. the typographic contextual adjustments at the placeholder level and these _will_ be applied to the prose scope, but other references to the concrete classes will have no effect on the prose scope.
    36degrees committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    a4123c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b1511af View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    45630e0 View commit details
    Browse the repository at this point in the history