New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nocssjs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nocssjs - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

.travis.yml

3

package.json
{
"name": "nocssjs",
"version": "0.2.1",
"version": "0.2.2",
"description": "NoCSS -- stop writing CSS, just use Javascript",

@@ -29,2 +29,1 @@ "main": "src/index.js",

}

@@ -1,9 +0,11 @@

# Summary
NoCSS is a small, fast, js->css compiler. It lets you write all your css in Javascript. It also has automatic enforcement of browser support levels. Need to support IE 8? NoCSS will make sure you do.
# NoCSS [![Build Status](https://travis-ci.org/nocss/nocss.svg?branch=master)](https://travis-ci.org/nocss/nocss)
NoCSS is a small, fast, Javascript to CSS compiler. It's written in ES6 and has a growing library of plugins, including auto-prefixer and support-level-enforcer (need your CSS to support IE 8? This plugin will ensure that it happens).
## Background
Pure CSS is hard to maintain. This has given rise to a plethora of frameworks, including sass, less, stylus, PostCSS, etc. These frameworks are great, but there was clearly room for simplification, both in language choice and feature set. We chose the most pressing problems with css, and wrote a library to address those, whose core is [less than 50 lines of code](src/index.js).
Pure CSS is hard to maintain. This has given rise to a plethora of frameworks, including sass, less, stylus, PostCSS, etc. These frameworks are great, but none of them has been built from the ground up on a simple Javascript DSL -- a design choice which lends speed, simplicity, and economy of space to the entire project.
Because of its diminutive size, you can embed it in your frontend code and render css at runtime. Because it's in ES6, it's easy to debug, see how the library works and to augment it to your needs. The goal was to make the simplest, lightest css processor, which could be used at compile-time or run-time.
The core engine in NoCSS is [less than 50 lines of code](src/index.js). It does not have to parse CSS, build and then execute transforms on an abstract syntax tree (like PostCSS). Because of its diminutive size, you can embed NoCSS in your frontend code and render CSS from Javascript at runtime. It turns out this is a useful ability in many situations, particularly as UIs become more complex.
Because it's in ES6, it's easy to debug, see how the library works and to augment it to your needs. The goal was to make the simplest, lightest-weight CSS processor, which could be used at compile-time or run-time.
Here's an example of NoCSS in action:

@@ -10,0 +12,0 @@

@@ -244,4 +244,5 @@ // When the property value is true (eg for 'background'), it is supported

'display': [{
values: ['none', 'inline', 'block', 'list-item'],
values: ['none', 'inline', 'block', 'inline-block', 'list-item', 'flex'],
support: true,
// TODO: add support levels for display: flex
}],

@@ -248,0 +249,0 @@ 'empty-cells': [{

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