Skip to content

Commit

Permalink
Plugin: color previewer: Add support for Sass variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Oct 5, 2015
1 parent 6d94e03 commit 3a1fb04
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
3 changes: 2 additions & 1 deletion plugins/previewer-color/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ <h2>Less</h2>
}</code></pre>

<h2>Sass</h2>
<pre class="language-sass"><code>@mixin foobar
<pre class="language-sass"><code>$color: blue
@mixin foobar
color: rgba(147, 32, 34, 0.8)
.foo
color: pink
Expand Down
18 changes: 13 additions & 5 deletions plugins/previewer-color/prism-previewer-color.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@
inside: 'inside',
root: Prism.languages.markup && Prism.languages.markup['tag'].inside['attr-value']
},
'sass': {
lang: 'sass',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['property-line']
},
'sass': [
{
lang: 'sass',
before: 'punctuation',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['variable-line']
},
{
lang: 'sass',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['property-line']
}
],
'scss': true,
'stylus': [
{
Expand Down
2 changes: 1 addition & 1 deletion plugins/previewer-color/prism-previewer-color.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a1fb04

Please sign in to comment.