What is jss-plugin-props-sort?
The jss-plugin-props-sort npm package is a plugin for JSS (JavaScript Style Sheets) that allows for sorting CSS properties in a predefined order. This can help in maintaining a consistent style in the stylesheet code, making it easier to read and manage.
Sorting CSS properties
This feature allows developers to automatically sort CSS properties in their JSS stylesheets. The code sample demonstrates how to create a stylesheet with unsorted properties and apply the jss-plugin-props-sort to sort them according to a specific order.
{
jss.createStyleSheet({
button: {
color: 'blue',
margin: 5,
background: 'red',
border: '1px solid black'
}
}, {
plugins: [jssPluginPropsSort()]
}).attach();
}