Merge function-builder branch into master

This commit is contained in:
2021-05-11 09:04:49 +02:00
parent 4730e6d3d7
commit d1094bddef
82 changed files with 2542 additions and 1062 deletions

View File

@@ -5,17 +5,18 @@ class FontSize(
) : CssProperty(value) {
companion object {
fun xxSmall() = FontSize("xx-small")
fun xSmall() = FontSize("x-small")
fun small() = FontSize("small")
fun medium() = FontSize("medium")
fun large() = FontSize("large")
fun xLarge() = FontSize("x-large")
fun xxLarge() = FontSize("xx-large")
fun smaller() = FontSize("smaller")
fun larger() = FontSize("larger")
fun initial() = FontSize("initial")
fun inherit() = FontSize("inherit")
val xxSmall = FontSize("xx-small")
val xSmall = FontSize("x-small")
val small = FontSize("small")
val medium = FontSize("medium")
val large = FontSize("large")
val xLarge = FontSize("x-large")
val xxLarge = FontSize("xx-large")
val smaller = FontSize("smaller")
val larger = FontSize("larger")
val initial = FontSize("initial")
val inherit = FontSize("inherit")
fun px(nr: Int) = FontSize("${nr}px")
fun em(nr: Int) = FontSize("${nr}em")
fun em(nr: Double) = FontSize("${nr}em")
@@ -26,6 +27,7 @@ class FontSize(
fun cm(nr: Int) = FontSize("${nr}cm")
fun cm(nr: Double) = FontSize("${nr}cm")
}
}
class FontStretch(
@@ -33,15 +35,17 @@ class FontStretch(
) : CssProperty(value) {
companion object {
fun normal() = FontStretch("normal")
fun condensed() = FontStretch("condensed")
fun ultraCondensed() = FontStretch("ultra-condensed")
fun extraCondensed() = FontStretch("extra-condensed")
fun semiCondensed() = FontStretch("semi-condensed")
fun expanded() = FontStretch("expanded")
fun semiExpanded() = FontStretch("semi-expanded")
fun extraExpanded() = FontStretch("extra-expanded")
fun ultraExpanded() = FontStretch("ultra-expanded")
val normal = FontStretch("normal")
val condensed = FontStretch("condensed")
val ultraCondensed = FontStretch("ultra-condensed")
val extraCondensed = FontStretch("extra-condensed")
val semiCondensed = FontStretch("semi-condensed")
val expanded = FontStretch("expanded")
val semiExpanded = FontStretch("semi-expanded")
val extraExpanded = FontStretch("extra-expanded")
val ultraExpanded = FontStretch("ultra-expanded")
val initial = FontWeight("initial")
val inherit = FontWeight("inherit")
}
}
@@ -51,9 +55,11 @@ class FontStyle(
) : CssProperty(value) {
companion object {
fun normal() = FontStyle("normal")
fun italic() = FontStyle("italic")
fun oblique() = FontStyle("oblique")
val normal = FontStyle("normal")
val italic = FontStyle("italic")
val oblique = FontStyle("oblique")
val initial = FontStyle("initial")
val inherit = FontStyle("inherit")
}
}
@@ -63,18 +69,74 @@ class FontWeight(
) : CssProperty(value) {
companion object {
fun normal() = FontWeight("normal")
fun bold() = FontWeight("bold")
fun _100() = FontWeight("100")
fun _200() = FontWeight("200")
fun _300() = FontWeight("300")
fun _400() = FontWeight("400")
fun _500() = FontWeight("500")
fun _600() = FontWeight("600")
fun _700() = FontWeight("700")
fun _800() = FontWeight("800")
fun _900() = FontWeight("900")
val normal = FontWeight("normal")
val bold = FontWeight("bold")
val _100 = FontWeight("100")
val _200 = FontWeight("200")
val _300 = FontWeight("300")
val _400 = FontWeight("400")
val _500 = FontWeight("500")
val _600 = FontWeight("600")
val _700 = FontWeight("700")
val _800 = FontWeight("800")
val _900 = FontWeight("900")
val initial = FontWeight("initial")
val inherit = FontWeight("inherit")
}
}
class FontKerning(
value: String
) : CssProperty(value) {
companion object {
val auto = FontKerning("auto")
val normal = FontKerning("normal")
val none = FontKerning("none")
}
}
class FontSizeAdjust(
value: String
) : CssProperty(value) {
companion object {
val none = FontSizeAdjust("none")
val initial = FontSizeAdjust("initial")
val inherit = FontSizeAdjust("inherit")
}
}
class FontVariant(
value: String
) : CssProperty(value) {
companion object {
val normal = FontVariant("normal")
val smallCaps = FontVariant("small-caps")
val initial = FontVariant("initial")
val inherit = FontVariant("inherit")
}
}
class FontVariantCaps(
value: String
) : CssProperty(value) {
companion object {
val normal = FontVariantCaps("normal")
val smallCaps = FontVariantCaps("small-caps")
val allSmallCaps = FontVariantCaps("all-small-caps")
val petiteCaps = FontVariantCaps("petite-caps")
val allPetiteCaps = FontVariantCaps("all-petite-caps")
val unicase = FontVariantCaps("unicase")
val initial = FontVariantCaps("initial")
val inherit = FontVariantCaps("inherit")
val unset = FontVariantCaps("unset")
}
}