Skip to content

Commit 62cf25f

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

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

__tests__/variantsAtRule.test.js

Lines changed: 6 additions & 6 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; }
106-
.active\\:banana:active { color: yellow; }
107-
.active\\:chocolate:active { color: brown; }
108104
.hover\\:banana:hover { color: yellow; }
109105
.hover\\:chocolate:hover { color: brown; }
106+
.active\\:banana:active { color: yellow; }
107+
.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-
.focus\\:banana:focus { color: yellow; }
131-
.focus\\:chocolate:focus { color: brown; }
132130
.hover\\:banana:hover { color: yellow; }
133131
.hover\\:chocolate:hover { color: brown; }
132+
.focus\\:banana:focus { color: yellow; }
133+
.focus\\:chocolate:focus { 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(['focus', 'active', 'hover', 'group-hover'], variant => {
64+
_.forEach(['hover', 'active', 'focus', 'group-hover'], variant => {
6565
if (variants.includes(variant)) {
6666
variantGenerators[variant](atRule, unwrappedConfig)
6767
}

0 commit comments

Comments
 (0)