Skip to content

Commit

Permalink
Added support for Bd(0) and Bd(n)
Browse files Browse the repository at this point in the history
  • Loading branch information
renatoi committed Jun 11, 2015
1 parent 1ca4175 commit db2a5ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/rules.js
Expand Up @@ -182,7 +182,13 @@ module.exports = [
"allowParamToValue": false,
"styles": {
"border": "$0"
}
},
"arguments": [
{
"0": 0,
"n": "none"
}
]
},
// top
{
Expand Down
8 changes: 7 additions & 1 deletion tests/atomizer.js
Expand Up @@ -302,9 +302,15 @@ describe('Atomizer()', function () {
it ('returns css by reading an array of class names', function () {
var atomizer = new Atomizer();
var config = {
classNames: ['C(red)', 'Px(inh)', 'Trsdu(.3s)', 'sibling:c+D(n)', 'End(0)', 'Ta(start)', 'Ta(end)', 'Bgc(#fff.4)', 'Bgc(#fff)', 'P(55px)', 'H(100%)', 'M(a)', 'test:h>Op(1):h', 'test:h_Op(1):h', 'Op(1)', 'Op(1)!', 'D(n)!', 'C(#333)', 'C(#333):li', 'Mt(-10px)', 'W(1/3)', 'Bgz(45px)']
classNames: ['Bd(0)', 'Bd(n)', 'C(red)', 'Px(inh)', 'Trsdu(.3s)', 'sibling:c+D(n)', 'End(0)', 'Ta(start)', 'Ta(end)', 'Bgc(#fff.4)', 'Bgc(#fff)', 'P(55px)', 'H(100%)', 'M(a)', 'test:h>Op(1):h', 'test:h_Op(1):h', 'Op(1)', 'Op(1)!', 'D(n)!', 'C(#333)', 'C(#333):li', 'Mt(-10px)', 'W(1/3)', 'Bgz(45px)']
};
var expected = [
'.Bd\\(0\\) {',
' border: 0;',
'}',
'.Bd\\(n\\) {',
' border: none;',
'}',
'.Bgc\\(\\#fff\\.4\\) {',
' background-color: rgba(255,255,255,.4);',
'}',
Expand Down

0 comments on commit db2a5ca

Please sign in to comment.