Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-styled-components-autoprefixer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-styled-components-autoprefixer

autoprefixer for styled-components

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

babel-plugin-styled-components-autoprefixer

autoprefixer for styled-components. I want to exclude autoprefixer from styled-componets. I think autoprefixer should be executed at bundle. However styled-componets has autoprefixer in a production codes....

Input

styled.h1`
  display: flex;
`;

Output

var _templateObject = _taggedTemplateLiteral(['\n  display: -webkit-box;\ndisplay: -ms-flexbox;\ndisplay: flex;\n'], ['\n  display: -webkit-box;\ndisplay: -ms-flexbox;\ndisplay: flex;\n']);

_styledComponents2.default.h1(_templateObject);

-------------------------

// As you can see:
display: -webkit-box;
display: -ms-flexbox;
display: flex;

Input

styled.h1`
  background: ${color};
  display: flex;
  border: 2px solid ${props => props.theme.main};
  padding: ${(props) => {
    props.theme.main
  }};
`;

Output

var _templateObject = _taggedTemplateLiteral(['\n  background: ', ';\n  display: -webkit-box;\n  display: -ms-flexbox;\n  display: flex;\n  border: 2px solid ', ';\n  padding: ', ';\n'], ['\n  background: ', ';\n  display: -webkit-box;\n  display: -ms-flexbox;\n  display: flex;\n  border: 2px solid ', ';\n  padding: ', ';\n']);

_styledComponents2.default.h1(_templateObject, color, function (props) {
  return props.theme.main;
}, function (props) {
  props.theme.main;
});

Keywords

FAQs

Package last updated on 26 Nov 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc