Skip to content

Commit 1100ce1

Browse files
committed
Maintain order of screens
1 parent 04b2185 commit 1100ce1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

index.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ module.exports = plugin.withOptions(
1313
*/
1414
const allScreens = theme('screens') || {};
1515
const enabledScreenNames = Object.keys(allScreens['__CSS_VALUES__'] || {});
16-
const screens = Object.fromEntries(
17-
Object.entries(allScreens).filter(
18-
([name, _size]) => enabledScreenNames.includes(name)
19-
)
20-
);
16+
const screens = Object.fromEntries(enabledScreenNames.map((name) => [name, allScreens[name]]));
2117

2218
const positions = position.split(',').map(position => position.trim());
2319
const positionY = ['top', 'bottom'].includes(positions[0]) ? positions[0] : 'bottom';

0 commit comments

Comments
 (0)