Skip to content

Commit b7cb213

Browse files
author
fedeTibaldo
committed
Update priority order to (from the highest): active-hover-focus
1 parent 62cf25f commit b7cb213

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

__tests__/variantsAtRule.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ test('it can generate hover, active and focus variants', () => {
101101
const output = `
102102
.banana { color: yellow; }
103103
.chocolate { color: brown; }
104+
.focus\\:banana:focus { color: yellow; }
105+
.focus\\:chocolate:focus { color: brown; }
104106
.hover\\:banana:hover { color: yellow; }
105107
.hover\\:chocolate:hover { color: brown; }
106108
.active\\:banana:active { color: yellow; }
107109
.active\\:chocolate:active { color: brown; }
108-
.focus\\:banana:focus { color: yellow; }
109-
.focus\\:chocolate:focus { color: brown; }
110110
`
111111

112112
return run(input).then(result => {
@@ -127,10 +127,10 @@ test('it wraps the output in a responsive at-rule if responsive is included as a
127127
@responsive {
128128
.banana { color: yellow; }
129129
.chocolate { color: brown; }
130-
.hover\\:banana:hover { color: yellow; }
131-
.hover\\:chocolate:hover { color: brown; }
132130
.focus\\:banana:focus { color: yellow; }
133131
.focus\\:chocolate:focus { color: brown; }
132+
.hover\\:banana:hover { color: yellow; }
133+
.hover\\:chocolate:hover { color: brown; }
134134
}
135135
`
136136

src/lib/substituteVariantsAtRules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default function(config) {
6161

6262
atRule.before(atRule.clone().nodes)
6363

64-
_.forEach(['hover', 'active', 'focus', 'group-hover'], variant => {
64+
_.forEach(['focus', 'hover', 'active', 'group-hover'], variant => {
6565
if (variants.includes(variant)) {
6666
variantGenerators[variant](atRule, unwrappedConfig)
6767
}

0 commit comments

Comments
 (0)