How to use jss-plugin-default-unit - 3 common examples

To help you get started, we’ve selected a few jss-plugin-default-unit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mui-org / material-ui / packages / material-ui-styles / src / jssPreset / jssPreset.js View on Github external
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(),
    ],
  };
}
github ubergrape / grape-electron / src / pages / index.js View on Github external
jss.use(
  functions(),
  isolate({
    reset: [
      'inherit',
      {
        fontFamily:
          '"Proxima Nova", "Helvetica Neue", Arial, Helvetica, sans-serif',
      },
    ],
  }),
  global(),
  extend(),
  nested(),
  camel(),
  unit(),
  expand(),
)

jss.createStyleSheet(styles).attach()
const { page, type, url } = qs.parse(window.location.search.substr(1))
const Page = pageComponentMap[page]

render(
  
    
      
    
  ,
  document.getElementById('grape'),
)
github cssinjs / jss / packages / jss-preset-default / src / index.js View on Github external
export default (options: Options = {}) => ({
  plugins: [
    functions(),
    observable(options.observable),
    template(),
    global(),
    extend(),
    nested(),
    compose(),
    camelCase(),
    defaultUnit(options.defaultUnit),
    expand(),
    vendorPrefixer(),
    propsSort()
  ]
})

jss-plugin-default-unit

JSS plugin that adds default custom unit to numeric values where needed

MIT
Latest version published 1 year ago

Package Health Score

81 / 100
Full package analysis

Popular jss-plugin-default-unit functions