Skip to content

Commit

Permalink
feat: add pseudo selectors :hover :focus
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Mar 24, 2018
1 parent 4a2a1f8 commit 4bacb7e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions addon/snake.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ exports.addon = function (renderer, rules) {
this[prop] = (value instanceof Object) ? (value.obj || value) : value;
},

hover: function (value) {
defaultRules.s.call(this, ':hover', value);
},

focus: function (value) {
defaultRules.s.call(this, ':focus', value);
},

bgWhite: function () {
this.backgroundColor = '#fff';
},
Expand All @@ -23,6 +31,10 @@ exports.addon = function (renderer, rules) {
this.position = 'relative';
},

abs: function () {
this.position = 'absolute';
},

pointer: function () {
this.cursor = 'pointer';
},
Expand Down

0 comments on commit 4bacb7e

Please sign in to comment.