Skip to content

Commit

Permalink
Merge pull request #3 from alphagov/node-sass-for-heroku
Browse files Browse the repository at this point in the history
Revert ruby sass to libsass as it breaks deployment to heroku
  • Loading branch information
gemmaleigh committed Mar 25, 2014
2 parents 204fdd5 + a76e233 commit 21862a0
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 18 deletions.
26 changes: 20 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function(grunt){

// Builds Sass
sass: {
ruby: {
dev: {
files: {
'public/stylesheets/main.css': 'public/sass/main.scss',
'public/stylesheets/main-ie6.css': 'public/sass/main-ie6.scss',
Expand All @@ -16,9 +16,8 @@ module.exports = function(grunt){
'public/stylesheets/elements-page-ie8.css': 'public/sass/elements-page-ie8.scss'
},
options: {
loadPath: ['govuk/public/sass'],
style: 'expanded',
lineNumbers: true
includePaths: ['govuk/public/sass'],
outputStyle: 'expanded'
}
}
},
Expand Down Expand Up @@ -54,6 +53,18 @@ module.exports = function(grunt){

},

// workaround for libsass
replace: {
fixSass: {
src: ['govuk/public/sass/**/*.scss'],
overwrite: true,
replacements: [{
from: /filter:chroma(.*);/g,
to: 'filter:unquote("chroma$1");'
}]
}
},

// Watches styles and specs for changes
watch: {
css: {
Expand Down Expand Up @@ -86,7 +97,7 @@ module.exports = function(grunt){
[
'grunt-contrib-copy',
'grunt-contrib-watch',
'grunt-contrib-sass',
'grunt-sass',
'grunt-nodemon',
'grunt-text-replace',
'grunt-concurrent'
Expand All @@ -110,8 +121,11 @@ module.exports = function(grunt){
'copy:govuk_assets',
'convert_template',
'copy:govuk_frontend_toolkit',
'sass:ruby',
'replace',
'sass',
'concurrent:target'
]);



};
2 changes: 1 addition & 1 deletion govuk/public/sass/design-patterns/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
&[type="submit"],
&[type="reset"],
&[type="button"] {
filter:chroma(color=#000000);
filter:unquote("chroma(color=#000000)");
}

&[type=submit].button {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"grunt-contrib-clean": "0.5.0",
"grunt-contrib-copy": "0.5.0",
"grunt-contrib-watch": "0.5.3",
"grunt-contrib-sass": "0.7.1",
"grunt-nodemon": "0.x"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion public/sass/base/_grid-wrapper.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Wrap grid layout
.grid-wrapper {
@extend %contain-floats;
@include contain-floats;
padding: 0 $gutter-half;
@include media(tablet) {
padding: 0 $gutter-half;
Expand Down
2 changes: 1 addition & 1 deletion public/sass/elements-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ code {
// Example box
.example {

@extend %contain-floats;
@include contain-floats;
position: relative;
overflow: hidden;
border: 1px solid $grey-2;
Expand Down
15 changes: 10 additions & 5 deletions public/sass/helpers/_helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
// Import GOV.UK frontend toolkit shims
@import "_shims";

// Extend the %contain-floats placeholder
// Apply the contain floats mixin to a .cf 'contain-floats' or 'clearfix' class

.cf {
@extend %contain-floats;
// Use contain floats mixin as placeholders are not supported
@mixin contain-floats {
&:after {
content: "";
display: block;
clear: both;
}
@include ie-lte(7) {
zoom: 1;
}
}
2 changes: 1 addition & 1 deletion public/sass/modules/_form-validation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

// Validation message box
.validation {
@extend %contain-floats;
@include contain-floats;
border-left: 3px solid $mellow-red;
background: #fef7f7; // NOT IN THE PALETTE !!
padding-top: $gutter-half;
Expand Down
2 changes: 1 addition & 1 deletion public/sass/modules/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ textarea {
// Block form layout (tablet and up)

.form-group-block {
@extend %contain-floats;
@include contain-floats;
}
.form-group-block .form-checkbox,
.form-group-block .form-radio {
Expand Down
2 changes: 1 addition & 1 deletion public/sass/template/_main-wrapper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
max-width: 1020px;
width: auto;
margin: 0 auto 90px;
@extend %contain-floats;
@include contain-floats;

@include ie-lte(6) {
width: 990px;
Expand Down

0 comments on commit 21862a0

Please sign in to comment.