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

Make css output easier to debug #257

Merged
merged 1 commit into from
Oct 7, 2016
Merged

Conversation

alextea
Copy link
Contributor

@alextea alextea commented Oct 4, 2016

The generated css will now include source comments which show where in
your sass files each css block comes from.

Also tidied up the options block:

  • The style option is not supported by grunt-sass (outputStyle is the correct option)
  • sourceMap was misspelt and wasn’t generating the source maps
  • The options have been arranged in alphabetical order to make it easier
    to read

Example source comments:

/* line 18, govuk_modules/govuk_frontend_toolkit/stylesheets/_grid_layout.scss */
#content {
  max-width: 960px;
  margin: 0 15px;
}

@media (min-width: 641px) {
  /* line 18, govuk_modules/govuk_frontend_toolkit/stylesheets/_grid_layout.scss */
  #content {
    margin: 0 30px;
  }
}

The generated css will now include source comments which show where in 
your sass files each css block comes from.

Also tidied up the options block:

 - The `style` option is not supported by grunt-sass (`outputStyle` is the 
correct option)
- `sourceMap` was misspelt and wasn’t generating the source maps
- The options have been arranged in alphabetical order to make it easier 
to read
@gemmaleigh
Copy link
Contributor

Nice!

Works for me, here's a couple of screenshots.

on master (without this change):

before

on this branch:

after

I've rebased on top of master, happy for you to merge when the tests are complete @alextea.

Copy link
Contributor

@gemmaleigh gemmaleigh left a comment

Choose a reason for hiding this comment

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

I've tested this locally, it works well - I've added screenshots to the comments to show it has been tested.

@gemmaleigh gemmaleigh merged commit f234df2 into master Oct 7, 2016
@gemmaleigh gemmaleigh deleted the add-sourcecomments-css branch October 7, 2016 14:15
robinwhittleton pushed a commit that referenced this pull request Oct 13, 2016
Breaking changes:

- #244 Migrate documentation into a seperate application

All changes:

- Bump all GOV.UK assets to their latest versions
- Remove duplicate GOV.UK assets copied to the app
- #241 Warn against using the prototype kit to build production services
- #268 Automatically keep the latest release branch up to date. This can be used to update the kit
- #270 Add a new stylesheet for the unbranded layout to fix font issues
- #257 Make CSS output easier to debug (with sourcemaps)
- #237 Make links with role="button" behave like buttons
- #224 Lint the prototype kit’s codebase using Standard. This only applies to the kit’s codebase - there’s no requirement for your app to meet this
robinwhittleton pushed a commit that referenced this pull request Oct 13, 2016
Breaking changes:

- #244 Migrate documentation into a separate application

All changes:

- Bump all GOV.UK assets to their latest versions
- Remove duplicate GOV.UK assets copied to the app
- #241 Warn against using the prototype kit to build production services
- #268 Automatically keep the latest release branch up to date. This can be used to update the kit
- #270 Add a new stylesheet for the unbranded layout to fix font issues
- #257 Make CSS output easier to debug (with sourcemaps)
- #237 Make links with role="button" behave like buttons
- #224 Lint the prototype kit’s codebase using Standard. This only applies to the kit’s codebase - there’s no requirement for your app to meet this
@robinwhittleton robinwhittleton mentioned this pull request Oct 13, 2016
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.

2 participants