Skip to content

Commit

Permalink
Add linear-gradient() to NameFormat whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Bea authored and sds committed Mar 25, 2016
1 parent 388cf71 commit ccc2e6b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/scss_lint/linter/name_format.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def visit_variable(node)
scaleX scaleY scaleZ
skewX skewY
translateX translateY translateZ
linear-gradient
].to_set

def check_name(node, node_type, node_text = node.name)
Expand Down
10 changes: 10 additions & 0 deletions spec/scss_lint/linter/name_format_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@
it { should_not report_lint }
end

context 'when using whitelisted css function' do
let(:scss) { <<-SCSS }
.gradient {
background: linear-gradient(#000, #fff);
}
SCSS

it { should_not report_lint }
end

context 'when a mixin contains keyword arguments with underscores' do
let(:scss) { '@include mixin($some_var: 4);' }

Expand Down

0 comments on commit ccc2e6b

Please sign in to comment.