Syntax
DarkCSS is in beta, and there are few things to learn, but to get a head start, learn a little bit of early syntax!
DarkCSS is a superset of CSS, meaning it compiles right back down to CSS allowing you to use it anywhere that supports CSS. DarkCSS does NOT support writing in sass(scss), so you can't do that.
Now, let's see a sample DarkCSS code, and we'll break it down!
h1 {
content.color = red;
}
As you can see, the tag starts off like CSS, but the descriptions of the tag are much different.
Content is the element, meaning it would be h1
in this case. Then you get to the obj that describes h1, which is color. Then we put an equal sign and put the color we want. DarkCSS does not care what you put in there. We put red for an example, but it can be Hex, RGB, ext. DarkCSS is not case sensitive, so spaces are not required.
If you would like a full list of all of the element, please go here, also put link here lol. If you want an element that is not in DarkCSS, please contact us and we will see if we can add it!
If you contradict yourself, DarkCSS will put in the last element, for example:
h1 {
content.color = blue;
content.color = red;
}
DarkCSS will look for the last known element, for color, and the compiled CSS outfile will look like this:
h1 {
color: red;
}
Sadly, DarkCSS requires semicolons, so if you were looking to escape semicolons, you're out of luck.
Thanks for looking at basic syntax of DarkCSS!