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

greencss

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

greencss

The classy way to write sustainable CSS.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

A classy way to write sustainable CSS

Prettier Code Style NPM publish

greencss logo

Getting started

npm i greencss

Initialisation

  • Import all CSS classes into your project.
import 'greencss/css/greencss.css'
  • If you only want to use the animations, for example, import only one category into your project.
import 'greencss/css/classes/animation/animation.css'

You will find all CSS categories here.

Lightweight Version

Instead of the normal version, you can also import a lightweight minified version.

import 'greencss/css/minified/greencss.css'

Compact imports also work with categories:

import 'greencss/css/minified/classes/animation/animation.css'
import 'greencss/css/minified/classes/color/color.css'

Before you code

By default, all default browser settings are reset. This means that you enjoy unlimited freedom and can choose your own design. Create a default reset.css file and specify your desired spacing, fonts, text sizes and font weights. Make sure that your reset file is imported after the greencss file. This way your file has a higher priority and you overwrite any greencss classes.

import 'greencss/css/greencss.css'.
import 'path-to-your-reset.css-file'.

By the way, when you use greenCSS, sustainability is not the only thing which is important. Writing CSS intuitively and easily is also crucial. For this reason, greenCSS has decided to reset the default font size to 62.5%. For you, this means that 1rem = 10px. This allows you to calculate in the simplified power of ten.

/* Set core root defaults */
html {
  font-size: 62.5%; // default pixel size reset to 10px
}

Contribute

You want to collaborate? Have a look at the documentation in the information folder.

Keywords

FAQs

Package last updated on 24 Jun 2022

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