Created
November 6, 2013 11:05
-
-
Save cahnory/7334340 to your computer and use it in GitHub Desktop.
PlastiCSS/helper/_script.scss Manage javascript specific styles.
Output javascript only, no javascript only (separate sheets) or both with corresponding classes (single sheet).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: scope vars | |
@mixin script() { | |
@if $plasticss__helper__script--use_class { | |
#{$plasticss__helper__script--class} { | |
@content; | |
} | |
} | |
@else if $plasticss__helper__script { | |
@content; | |
} | |
} | |
@mixin noscript() { | |
@if $plasticss__helper__script--use_class { | |
#{$plasticss__helper__script--noclass} { | |
@content; | |
} | |
} | |
@else if not $plasticss__helper__script { | |
@content; | |
} | |
} | |
@mixin script--set( | |
$script: $plasticss__helper__script, | |
$use-class: $plasticss__helper__script--use_class, | |
$class: $plasticss__helper__script--class, | |
$noclass: $plasticss__helper__script--noclass | |
) { | |
$plasticss__helper__script: $script; | |
$plasticss__helper__script--use_class: $use-class; | |
$plasticss__helper__script--class: $class; | |
$plasticss__helper__script--noclass: $noclass; | |
} | |
$plasticss__helper__script: true!default; | |
$plasticss__helper__script--use_class: false!default; | |
$plasticss__helper__script--class: '.js'!default; | |
$plasticss__helper__script--noclass: '.no-js'!default; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment