More properties, val i.o. fun

This commit is contained in:
2020-03-22 16:40:18 +01:00
parent 7a92e53006
commit 2bf19fd647
75 changed files with 1121 additions and 614 deletions

View File

@@ -1,7 +1,6 @@
package nl.astraeus.css
import nl.astraeus.css.properties.*
import nl.astraeus.css.properties.AlignContentValue.*
import nl.astraeus.css.properties.Color.Companion.hex
import nl.astraeus.css.style.Css
import nl.astraeus.css.style.Style
@@ -98,6 +97,17 @@ fun main() {
}
val sd = style {
media("screen and (max-width: 600px)") {
fontSize(12.px())
fontWeight(FontWeight.normal)
supports("bla") {
media("bloe") {
fontSize(14.px())
}
}
}
select("#pipo") {
backgroundColor(hex("eeeeee"))
fontFamily("Arial, Courier")
@@ -106,7 +116,7 @@ fun main() {
select("div") {
fontFace {
fontFamily("SanSation")
fontSize(FontSize.larger())
fontSize(FontSize.larger)
src("font/sansation_bold.woff")
// fontStretch = FontStretch.condensed()
// fontStyle = FontStyle.italic()
@@ -123,8 +133,8 @@ fun main() {
// text("bar")
// )
select("span") {
alignItems(AlignItems.BASELINE)
alignSelf(AlignSelf.FLEX_START)
alignItems(AlignItems.baseline)
alignSelf(AlignSelf.flexStart)
// animationIterationCount = listOf(
// Count.count(3),
@@ -146,8 +156,8 @@ fun main() {
select("border-2") {
// borderRadius = BorderRadius(4, 5, 6, 7)
import(border2)
borderStyle(BorderStyle.dashed(), BorderStyle.dotted())
animationPlayState(AnimationPlayState.paused(), AnimationPlayState.running())
borderStyle(BorderStyle.dashed, BorderStyle.dotted)
animationPlayState(AnimationPlayState.paused, AnimationPlayState.running)
keyFrames("mymove") {
percentage(0) {
@@ -177,13 +187,11 @@ fun main() {
}
}
media("(max-width: 600px)") {
fontSize(12.px())
fontWeight(FontWeight.normal())
}
objectFit(ObjectFit.initial)
pageBreakAfter(PageBreak.auto)
objectFit(ObjectFit.initial())
pageBreakAfter(PageBreak.auto())
tableLayout(TableLayout.auto)
tabSize(12.px())
// display = Display.none()
// borderBottomWidth = BorderWidth.perc(13)
@@ -205,8 +213,8 @@ fun main() {
val test = style {
select("nav") {
alignContent(STRETCH)
margin(0.px(), 2.em(), 0.5.px(), Measurement.auto())
alignContent(AlignContent.stretch)
margin(0.px(), 2.em(), 0.5.px(), Measurement.auto)
}
}