Skip to content

Commit 5529d29

Browse files
committed
styles to css
1 parent 4a38cb1 commit 5529d29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ module.exports = postcss.plugin("postcss-custom-selectors", function(options) {
2626
/**
2727
* 读取和替换自定义选择器
2828
*/
29-
return function(styles) {
29+
return function(css) {
3030
// 读取自定义选择器
31-
styles.eachAtRule(function(rule) {
31+
css.eachAtRule(function(rule) {
3232
if (rule.name !== "custom-selector") {
3333
return
3434
}
@@ -54,7 +54,7 @@ module.exports = postcss.plugin("postcss-custom-selectors", function(options) {
5454
})
5555

5656
// 转换自定义的选择器别名
57-
styles.eachRule(function(rule) {
57+
css.eachRule(function(rule) {
5858
var flag = 0
5959
for (var prop in customSelectors) {
6060
if (rule.selector.indexOf(prop) >= 0) {

0 commit comments

Comments
 (0)