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

Lint Sass #101

Merged
merged 3 commits into from Feb 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -7,7 +7,7 @@ gem 'govuk_frontend_toolkit', '2.0.1'
gem 'logstasher', '0.6.1'
gem 'plek', '1.11'
gem 'rails', '4.1.14.1'
gem 'sass-rails', '~> 4.0.3'
gem 'sass-rails', '~> 5.0.4'
gem 'slimmer', '9.0.1'
gem 'uglifier', '>= 1.3.0'
gem 'unicorn', '4.8'
Expand Down
33 changes: 18 additions & 15 deletions Gemfile.lock
Expand Up @@ -56,6 +56,7 @@ GEM
xpath (~> 2.0)
casperjs (1.0.0)
coderay (1.1.0)
concurrent-ruby (1.0.0)
crack (0.4.3)
safe_yaml (~> 1.0.0)
debug_inspector (0.0.2)
Expand All @@ -72,12 +73,12 @@ GEM
rest-client (~> 1.8.0)
govuk-content-schema-test-helpers (1.1.0)
json-schema (~> 2.5.1)
govuk-lint (0.5.3)
govuk-lint (0.6.1)
rubocop (~> 0.35.0)
scss_lint (~> 0.44.0)
govuk_frontend_toolkit (2.0.1)
rails (>= 3.1.0)
sass (>= 3.2.0)
hike (1.2.3)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
Expand Down Expand Up @@ -106,7 +107,7 @@ GEM
mini_portile2 (~> 2.0.0.rc2)
null_logger (0.0.1)
parallel (1.6.1)
parser (2.3.0.4)
parser (2.3.0.6)
ast (~> 2.2)
plek (1.11.0)
powerpack (0.1.1)
Expand Down Expand Up @@ -161,12 +162,16 @@ GEM
tins (<= 1.6.0)
ruby-progressbar (1.7.5)
safe_yaml (1.0.4)
sass (3.2.19)
sass-rails (4.0.5)
sass (3.4.21)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.2)
sprockets (~> 2.8, < 3.0)
sprockets-rails (~> 2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
scss_lint (0.44.0)
rake (~> 10.0)
sass (~> 3.4.15)
slimmer (9.0.1)
activesupport
json
Expand All @@ -176,18 +181,16 @@ GEM
rack (>= 1.3.5)
rest-client
slop (3.6.0)
sprockets (2.12.4)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets (3.5.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
tilt (2.0.2)
tins (1.6.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
Expand Down Expand Up @@ -235,7 +238,7 @@ DEPENDENCIES
rails (= 4.1.14.1)
rails-i18n (>= 4.0.4)
rails_translation_manager (~> 0.0.2)
sass-rails (~> 4.0.3)
sass-rails (~> 5.0.4)
slimmer (= 9.0.1)
uglifier (>= 1.3.0)
unicorn (= 4.8)
Expand Down
6 changes: 4 additions & 2 deletions app/assets/stylesheets/helpers/_available-languages.scss
Expand Up @@ -7,7 +7,6 @@
padding: $gutter-half 0 $gutter-one-third;
border-bottom: 1px solid $border-colour;


li {
float: left;
display: block;
Expand All @@ -20,11 +19,13 @@
border-right: 0;
}

a, span {
a,
span {
display: block;
margin-top: -1px;
@include core-16;
}

.direction-rtl & {
direction: rtl;
float: right;
Expand All @@ -33,6 +34,7 @@
border-right: 0;
margin: 3px 0 2px $gutter-one-third;
padding: 0 0 0 $gutter-one-third;

&.last {
border-left: 0;
}
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/helpers/_dash-list.scss
Expand Up @@ -9,12 +9,13 @@

@media (min-width: 1px) { // target modern browsers
list-style-type: none;

&:before {
content: "-";
position: relative;
float: left;
width: $gutter-half;
margin-left: $gutter-half*-1;
margin-left: $gutter-half * -1;
}
}
}
Expand Down
12 changes: 8 additions & 4 deletions app/assets/stylesheets/views/_service-manual.scss
Expand Up @@ -21,14 +21,16 @@
width: auto;
min-width: 120px;

@include media(tablet){
@include media(tablet) {
padding-right: $gutter-one-third;
}
}

&.direction-rtl dt {
float: right;
clear: right;
@include media(tablet){

@include media(tablet) {
padding-left: $gutter-one-third;
padding-right: 0;
}
Expand All @@ -38,10 +40,11 @@
float: left;
width: 55%;

@include media(tablet){
@include media(tablet) {
width: 70%;
}
}

&.direction-rtl dd {
float: right;
}
Expand All @@ -53,10 +56,10 @@
}
}


// Page contents
.page-contents {
margin-top: 1em;

@include media(tablet) {
margin-top: 2em;
}
Expand Down Expand Up @@ -84,6 +87,7 @@

.govspeak-wrapper {
padding-top: 0.9375em;

@include media(tablet) {
padding-top: 1.875em;
}
Expand Down
Expand Up @@ -3,6 +3,7 @@
@include sidebar-with-body;

.offset-one-third {
// scss-lint:disable SpaceAroundOperator
margin-left: percentage(1/3);
}
}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/views/_unpublishing.scss
@@ -1,5 +1,5 @@
.unpublishing {
margin-bottom: $gutter*2;
margin-bottom: $gutter * 2;

.summary,
.alternative {
Expand Down
2 changes: 2 additions & 0 deletions jenkins.sh
Expand Up @@ -48,6 +48,8 @@ if [[ ${GIT_BRANCH} != "origin/master" ]]; then
--format html --out rubocop-${GIT_COMMIT}.html \
--format clang \
Gemfile app test config

bundle exec govuk-lint-sass app
fi

GOVUK_CONTENT_SCHEMAS_PATH=tmp/govuk-content-schemas bundle exec rake
Expand Down