Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
jss-plugin-vendor-prefixer
Advanced tools
The jss-plugin-vendor-prefixer is a plugin for JSS (JavaScript Style Sheets) that automatically adds vendor prefixes to CSS properties, ensuring compatibility across different browsers.
Automatic Vendor Prefixing
This feature automatically adds vendor prefixes to CSS properties. In the example, the 'display' and 'userSelect' properties will be prefixed as needed for different browsers.
const jss = require('jss').default;
const preset = require('jss-preset-default').default;
const vendorPrefixer = require('jss-plugin-vendor-prefixer').default;
jss.setup(preset());
jss.use(vendorPrefixer());
const styles = {
button: {
display: 'flex',
userSelect: 'none'
}
};
const { classes } = jss.createStyleSheet(styles).attach();
console.log(classes.button);
Autoprefixer is a PostCSS plugin that parses your CSS and adds vendor prefixes to CSS rules using values from the Can I Use website. It is more comprehensive and widely used compared to jss-plugin-vendor-prefixer, but it requires a PostCSS setup.
Styletron is a toolkit for component-oriented styling. The styletron-engine-atomic package includes automatic vendor prefixing as part of its functionality. It is similar to jss-plugin-vendor-prefixer but is part of the Styletron ecosystem, which is focused on atomic CSS.
Emotion is a library designed for writing CSS styles with JavaScript. It includes automatic vendor prefixing as part of its core functionality. Emotion is more feature-rich and offers a broader range of styling capabilities compared to jss-plugin-vendor-prefixer.
JSS plugin that handles vendor prefixes in the browser
See our website jss-plugin-vendor-prefixer for more information.
Using npm:
npm install jss-plugin-vendor-prefixer
or using yarn:
yarn add jss-plugin-vendor-prefixer
10.6.0 (2021-3-14)
globalThis
to support secure version of JavaScript called SES 1449Styles
now supports ClassNames
, Props
/Data
, and Theme
as type parameters (eg. Styles<Names, Data, Theme>
). 1460withStyles
and createUseStyles
now support ClassNames
, Props
, and Theme
as type parameters (eg. createUseStyles<Names, Props, Theme>
). 1460useStyles
finally expects the correct argument type: a Props
object with an optional Theme
property (both determined from createUseStyles
). 1460classes
prop in withStyles()
1428Theme
is no longer the first generic type parameter for createUseStyles
. 1460
Theme
's type without reaching over the other type parameters:Using the function argument.
const useStyles = createUseStyles(theme: Theme => ({
ruleName: { /* ... */ };
}))
Using the object argument with a function. (You will only need to specify the Theme
type once.)
const useStyles = createUseStyles({
ruleName: ({theme}: {theme: Theme}) => ({
/* ... */
})
})
FAQs
JSS plugin that handles vendor prefixes in the browser
The npm package jss-plugin-vendor-prefixer receives a total of 1,191,841 weekly downloads. As such, jss-plugin-vendor-prefixer popularity was classified as popular.
We found that jss-plugin-vendor-prefixer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.