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

css2stylus

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css2stylus

Converts CSS to Stylus.

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

css2stylus.js

JavaScript utility to convert CSS into Stylus.

Node/Browser compatible.

Demo

###Try it online css2stylus.com

Usage

Node

Install the module

$ npm install -g css2stylus

Convert any css file:

$ css2stylus myfile.css

The output will be saved to myfile.styl.

Browser

<!doctype html>
  <title>Demo</title>
  <script src="css2stylus.js"></script>
  <script>
  (function () {
    var css = 'body { color: red; }';
    var converter = new Css2Stylus.Converter(css);
    converter.processCss();
    // output
    var stylus_output = converter.getStylus();
    // body
    //   color red
  }());
  </script>

Keep CSS syntax

To keep CSS punctuation {:;} just pass --cssSyntax option from command line.

Or pass options object when processing a CSS file from JavaScript converter.processCss({ cssSyntax: true });

nib support

Unprefix any CSS snippet with vendor prefixes by passing --unPrefix option from command line.

Or pass an options object when processing a CSS file from JavaScript converter.processCss({ unPrefix: true });

License

See LICENSE.txt

Keywords

FAQs

Package last updated on 22 Jan 2013

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