1.1.0 • Published 3 years ago

ecss-lang v1.1.0

Weekly downloads
27
License
MIT
Repository
github
Last release
3 years ago

ECSS

ECSS is an english implementation of CSS written in Javascript.


Installation

$ npm install ecss-lang -g

Basic Syntax

To select a tag, use the for keyword.

for button

for h3

To add styling, replace the usual colon with "is", and omit semicolons and hyphens.

for button
    background color is blue
    outline is none

for h3
    text align is center

Once you're done, run this command:

$ ecss -o path/to/file.ecss

The parsed ECSS should output in the console.

button{background-color:blue;outline:none;}h3{text-align:center;}

To parse to a file, make a ecssconfig.json in your root directory with these contents.

{
    "compilerOptions": {
        "outDir": "css/"
    }
}

Then, in your console, type

ecss -p path/to/file.ecss

The ecss should output in a css folder.


Variables

To make a variable, use:

variable main color is orange

To use a variable, surround it with parenthesis:

variable main color is orange

for .navbar
    background color is (main color)

Extend

To extend the styles from another selector, use:

for h1
    font style is cursive

for p 
    extend h1

License

MIT

1.1.0

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago