jss-extend
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "jss-extend", | ||
"description": "Inheritance plugin for jss", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"author": { | ||
@@ -28,4 +28,4 @@ "name": "Oleg Slobodskoi", | ||
"dependencies": { | ||
"jsstyles": "0.x" | ||
"jsstyles": "^1.0.0" | ||
} | ||
} |
// Application | ||
jss.use(jssExtend) | ||
jss.createStyleSheet(window.styles).attach() | ||
var sheet = jss.createStyleSheet(window.styles).attach() | ||
var buttons = document.querySelectorAll('button') | ||
buttons[0].className = sheet.classes.button0 | ||
buttons[1].className = sheet.classes.button1 | ||
(function() { | ||
var styles = window.styles = {} | ||
var button1 = { | ||
var button0 = { | ||
padding: '20px', | ||
@@ -10,4 +8,2 @@ background: 'blue' | ||
styles['.button-1'] = button1 | ||
var redButton = { | ||
@@ -17,7 +13,10 @@ background: 'red' | ||
styles['.button-2'] = { | ||
extend: [button1, redButton], | ||
'font-size': '20px' | ||
window.styles = { | ||
button0: button0, | ||
button1: { | ||
extend: [button0, redButton], | ||
'font-size': '20px' | ||
} | ||
} | ||
}()) |
// Application | ||
jss.use(jssExtend) | ||
jss.createStyleSheet(window.styles).attach() | ||
jss.createStyleSheet(window.styles, {named: false}).attach() | ||
@@ -0,3 +1,7 @@ | ||
## 0.1.6 / 2014-01-31 | ||
- update jss to 1.0 | ||
## 0.1.0 / 2014-11-28 | ||
- first release in a separate repository for plugins |
{ | ||
"name": "jss-extend", | ||
"description": "Inheritance plugin for jss", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"author": { | ||
@@ -31,7 +31,7 @@ "name": "Oleg Slobodskoi", | ||
"xpkg": "0.2.0", | ||
"jss": "0.x" | ||
"jss": "^1.0.0" | ||
}, | ||
"peerDependencies": { | ||
"jss": "0.x" | ||
"jss": "^1.0.0" | ||
} | ||
} |
@@ -20,3 +20,3 @@ 'use strict' | ||
} | ||
}) | ||
}, {named: false}) | ||
ok(ss.rules.a instanceof jss.Rule) | ||
@@ -35,3 +35,3 @@ ok(ss.rules.b instanceof jss.Rule) | ||
} | ||
}) | ||
}, {named: false}) | ||
ok(ss.rules.c instanceof jss.Rule) | ||
@@ -49,5 +49,5 @@ equal(ss.toString(), 'c {\n float: left;\n position: absolute;\n width: 1px;\n}') | ||
} | ||
}) | ||
}, {named: false}) | ||
ok(ss.rules.a instanceof jss.Rule) | ||
equal(ss.toString(), 'a {\n float: left;\n display: none;\n width: 1px;\n}') | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11251
176