Skip to content

Commit

Permalink
Improve: Rename css.insertRules to css.render
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Nov 7, 2023
1 parent 9da7d35 commit 2b454bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/css/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ export class MasterCSS {
insert(syntax: string): boolean {
const rules = this.create(syntax)
if (rules.length) {
this.insertRules(rules)
this.render(rules)
return true
} else {
return false
Expand All @@ -1016,7 +1016,7 @@ export class MasterCSS {
* 11. media width where selectors
* 12. media width selectors
*/
insertRules(rules: Rule[]) {
render(rules: Rule[]) {
for (const rule of rules) {
if (this.ruleBy[rule.className])
continue
Expand Down
2 changes: 1 addition & 1 deletion packages/extractor/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default class CSSExtractor extends EventEmitter {
.map(async (eachLatentClass) => {
const validRules = createValidRules(eachLatentClass, { css: this.css })
if (validRules.length) {
this.css.insertRules(validRules)
this.css.render(validRules)
validClasses.push(eachLatentClass)
this.validClasses.add(eachLatentClass)
} else {
Expand Down

0 comments on commit 2b454bd

Please sign in to comment.