Skip to content
This repository has been archived by the owner on Jun 6, 2022. It is now read-only.

Commit

Permalink
styles to css
Browse files Browse the repository at this point in the history
  • Loading branch information
yisibl committed Jun 30, 2015
1 parent 4a38cb1 commit 5529d29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ module.exports = postcss.plugin("postcss-custom-selectors", function(options) {
/**
* 读取和替换自定义选择器
*/
return function(styles) {
return function(css) {
// 读取自定义选择器
styles.eachAtRule(function(rule) {
css.eachAtRule(function(rule) {
if (rule.name !== "custom-selector") {
return
}
Expand All @@ -54,7 +54,7 @@ module.exports = postcss.plugin("postcss-custom-selectors", function(options) {
})

// 转换自定义的选择器别名
styles.eachRule(function(rule) {
css.eachRule(function(rule) {
var flag = 0
for (var prop in customSelectors) {
if (rule.selector.indexOf(prop) >= 0) {
Expand Down

0 comments on commit 5529d29

Please sign in to comment.