Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit a3fd913

Browse files
committed
Fix dark variant to only modify last class not all classes
1 parent d3ec4b5 commit a3fd913

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/corePlugins/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ module.exports = {
9696
addVariant(
9797
'dark',
9898
transformAllSelectors((selector) => {
99-
let variantSelector = updateAllClasses(selector, (className) => {
99+
let variantSelector = updateLastClasses(selector, (className) => {
100100
return `dark:${className}`
101101
})
102102

src/index.test.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
margin: 1.25rem;
116116
margin-top: 1.5rem;
117117
}
118-
.dark .dark\:group:hover .apply-dark-group-example-a {
118+
.dark .group:hover .apply-dark-group-example-a {
119119
--tw-bg-opacity: 1;
120120
background-color: rgba(16, 185, 129, var(--tw-bg-opacity));
121121
}

0 commit comments

Comments
 (0)