Skip to content

johnie/postcss-swedish-stylesheets

Repository files navigation

Sweden PostCSS Swedish Stylesheets test status

PostCSS plugin for writing Swedish Style Sheets.

Installation

$ npm install postcss-swedish-stylesheets --save-dev

Quick Start

// Dependencies
const fs = require('fs');
const postcss = require('postcss');
const sweCSS = require('postcss-swedish-stylesheets');

// CSS to be processed
const css = fs.readFileSync('input.css', 'utf8');

// Process our swedish stylesheets css using postcss-swedish-stylesheets
const output = postcss().use(sweCSS(options)).process(css).css;

console.log('\n===>Output CSS:\n', output);

Or just:

const output = postcss(sweCSS()).process(css).css;

Swedish syntax

.foo {
  position: relativ;
  bakgrund-färg: laxrosa;
  bakgrund-bild: ingen;
  typsnitt-familj: Helvetica, Arial;
  färg: vit;
  linje-höjd: 1.68;
  bokstav-mellanrum: 2px;
  flyt: vänster;
  visa: ingen;
  nivå: 1000 !viktigt;
}

CSS output

.foo {
  position: relative;
  background-color: salmon;
  background-image: none;
  font-family: Helvetica, Arial;
  color: white;
  line-height: 1.68;
  letter-spacing: 2px;
  float: left;
  display: none;
  z-index: 1000 !important;
}

Contributing

Fork, work on a branch, install dependencies & run tests before submitting a PR.

$ git clone https://github.com/YOU/postcss-swedish-stylesheets.git
$ git checkout -b your-branch
$ npm install
$ npm test

About

💙💛 PostCSS plugin for writing Swedish Style Sheets.

Resources

License

Stars

Watchers

Forks

Packages

No packages published