Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Apr 21, 2024
1 parent 9efb473 commit c488e5c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,11 @@ module.exports = (opts = {}) => {
return {
AtRuleExit: {
media(atrule) {
if (
!atrule.params.includes('dark') &&
!atrule.params.includes('light')
) {
let params = atrule.params
if (!params.includes('dark') && !params.includes('light')) {
return
}

let params = atrule.params
let fixedSelector = params.includes('dark') ? dark : light
let nodeSelector = `:not(${params.includes('dark') ? light : dark})`

Expand Down

0 comments on commit c488e5c

Please sign in to comment.