Skip to content

Commit ad64849

Browse files
committed
feat: expose selector for addons
1 parent c0367ee commit ad64849

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
var hash = require('./hash').hash;
4-
var interpolateSelectors = require('./interpolateSelectors');
54

65
var KEBAB_REGEX = /[A-Z]/g;
76
var isClient = typeof window === 'object';
@@ -20,6 +19,9 @@ exports.create = function (h) {
2019
hash: function (obj) {
2120
return hash(renderer.stringify(obj));
2221
},
22+
selector: function (parent, selector) {
23+
return parent + ' ' + selector;
24+
},
2325
};
2426

2527
var putRaw;
@@ -36,15 +38,14 @@ exports.create = function (h) {
3638
}
3739

3840
var put = function (selector, decls) {
39-
var selectors = selector.split(',');
4041
var str = '';
4142
var prop, value;
4243

4344
for (prop in decls) {
4445
value = decls[prop];
4546

4647
if (value instanceof Object) {
47-
var selectorInterpolated = interpolateSelectors(selectors, prop);
48+
var selectorInterpolated = renderer.selector(selector, prop);
4849
put(selectorInterpolated, value);
4950
} else {
5051
str += renderer.decl(prop, value);

0 commit comments

Comments
 (0)