More properties

This commit is contained in:
2020-03-15 19:36:18 +01:00
parent 5a0eeac2fe
commit 5b557c8535
3 changed files with 38 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package nl.astraeus.css
import nl.astraeus.css.properties.*
import nl.astraeus.css.properties.Color.Companion.hex
import nl.astraeus.css.properties.Measurement.Companion.em
import nl.astraeus.css.properties.Measurement.Companion.px
import nl.astraeus.css.style.Style
@@ -32,14 +33,14 @@ private fun generateCss(
select("body") {
// fontFamily = base.mainFont
// color = base.mainColor
// backgroundColor = base.mainBackgroundColor
backgroundColor(base.mainBackgroundColor)
// alignContent = AlignContent.initial()
}
select(".test") {
// top = px(10)
// left = em(5)
// backgroundColor = Color.rgba(255, 255, 255, 0.75)
backgroundColor(Color.rgba(255, 255, 255, 0.75))
//
// select("> a") {
// color = Color.hsl(200, 50, 50)
@@ -48,11 +49,12 @@ private fun generateCss(
select("nav") {
select("ul") {
// color = Color.hsl(0, 100, 25)
// backgroundColor = base.mainBackgroundColor
color(Color.hsl(0, 100, 25))
backgroundColor(base.mainBackgroundColor)
}
select("li") {
sizePX(25, 25, 200, 200)
animationPlayState(AnimationPlayState.paused(), AnimationPlayState.running())
select("a") {
// width = px(725)
@@ -79,6 +81,8 @@ fun main() {
val sd = style {
select("#pipo") {
backgroundColor(hex("ffeedd"))
fontFamily("Arial, Courier")
// backgroundColor = Color.hex("eeeeee")
// fontFamily = text("Arial, Courier")
// animationDelay = listOf(DelayDuration.initial())