@mui/styles
Version:
MUI Styles - The legacy JSS-based styling solution of Material UI.
18 lines (17 loc) • 821 B
JavaScript
import functions from 'jss-plugin-rule-value-function';
import global from 'jss-plugin-global';
import nested from 'jss-plugin-nested';
import camelCase from 'jss-plugin-camel-case';
import defaultUnit from 'jss-plugin-default-unit';
import vendorPrefixer from 'jss-plugin-vendor-prefixer';
import propsSort from 'jss-plugin-props-sort';
// Subset of jss-preset-default with only the plugins the MUI components are using.
export default function jssPreset() {
return {
plugins: [functions(), global(), nested(), camelCase(), defaultUnit(),
// Disable the vendor prefixer server-side, it does nothing.
// This way, we can get a performance boost.
// In the documentation, we are using `autoprefixer` to solve this problem.
typeof window === 'undefined' ? null : vendorPrefixer(), propsSort()]
};
}