Skip to content
A tiny CSS preprocessor that converts the `size` property to `width` and `height`.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md We can't have nice things, naming this parsesize now Sep 4, 2019
index.js sizecss script and test file Sep 4, 2019
package.json We can't have nice things, naming this parsesize now Sep 4, 2019
testfile.size sizecss script and test file Sep 4, 2019

README.md

parsesize

A tiny CSS preprocessor that converts the size property to width and height.

How to use it

npm install -g parsesize
sizecss testfile.size

Example

testfile.size input file:

.never {
  color: blue;
  size: 20% 12rem;
}

.gonna {
  size: 50px;
}

.give {
  size: 300em 1px;
}

.you {
  size: 13%;
}

.up {
  border-radius: 30px;
  size: 80em;
}

Outputted testfile.css file:

.never {
  color: blue;
  height: 20%;
  width: 12rem;
}

.gonna {
  height: 50px;
  width: 50px;
}

.give {
  height: 300em;
  width: 1px;
}

.you {
  height: 13%;
  width: 13%;
}

.up {
  border-radius: 30px;
  height: 80em;
  width: 80em;
}
You can’t perform that action at this time.