More properties, cleanup

This commit is contained in:
2020-03-01 12:47:23 +01:00
parent ba58deeaf5
commit b80873a85a
20 changed files with 636 additions and 231 deletions

View File

@@ -8,6 +8,7 @@ open class Measurement(
fun auto() = Measurement("auto")
fun initial() = Measurement("initial")
fun inherit() = Measurement("inherit")
fun normal() = Measurement("normal")
fun px(nr: Int) = Measurement("${nr}px")
fun em(nr: Int) = Measurement("${nr}em")
fun em(nr: Double) = Measurement("${nr}em")
@@ -19,31 +20,3 @@ open class Measurement(
fun cm(nr: Double) = Measurement("${nr}cm")
}
}
class FontSize(
value: String
) : 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")
fun px(nr: Int) = FontSize("${nr}px")
fun em(nr: Int) = FontSize("${nr}em")
fun em(nr: Double) = FontSize("${nr}em")
fun perc(nr: Int) = FontSize("${nr}%")
fun perc(nr: Double) = FontSize("${nr}%")
fun pc(nr: Int) = FontSize("${nr}pc")
fun pc(nr: Double) = FontSize("${nr}pc")
fun cm(nr: Int) = FontSize("${nr}cm")
fun cm(nr: Double) = FontSize("${nr}cm")
}
}