@ -42,3 +42,12 @@ fun StyleBuilder.lineHeight(value: CSSNumeric) {
fun StyleBuilder.font(value: String) {
property("font", value)
}
// https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing
fun StyleBuilder.letterSpacing(value: String) {
property("letter-spacing", value)
fun StyleBuilder.letterSpacing(value: CSSNumeric) {
@ -104,6 +104,25 @@ class CSSFontTests {
assertEquals("2em", (root.children[1] as HTMLElement).style.lineHeight)
@Test
fun letterSpacing() = runTest {
composition {
Div({
style {
letterSpacing("normal")
})
letterSpacing(2.em)
assertEquals("normal", (root.children[0] as HTMLElement).style.letterSpacing)
assertEquals("2em", (root.children[1] as HTMLElement).style.letterSpacing)
fun fontFamily() = runTest {