Skip to content

Commit 60e752c

Browse files
committed
feat(markdown-layout): Add table styles with rounded borders, spacing, and alternating row colors. Removed unused BackdropFilter import.
1 parent 6014330 commit 60e752c

File tree

1 file changed

+33
-1
lines changed
  • website/src/jsMain/kotlin/io/github/ayfri/kore/website/components/layouts

1 file changed

+33
-1
lines changed

website/src/jsMain/kotlin/io/github/ayfri/kore/website/components/layouts/MarkdownLayout.kt

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package io.github.ayfri.kore.website.components.layouts
22

33
import androidx.compose.runtime.*
44
import com.varabyte.kobweb.compose.css.*
5-
import com.varabyte.kobweb.compose.css.BackdropFilter
65
import com.varabyte.kobweb.compose.css.functions.blur
76
import com.varabyte.kobweb.core.rememberPageContext
87
import com.varabyte.kobweb.silk.components.icons.mdi.MdiChevronRight
@@ -335,6 +334,39 @@ object MarkdownLayoutStyle : StyleSheet() {
335334
flexDirection(FlexDirection.Column)
336335
gap(0.25.cssRem)
337336
}
337+
338+
"table" style {
339+
borderCollapse(BorderCollapse.Separate)
340+
borderRadius(GlobalStyle.roundingButton)
341+
border(1.px, LineStyle.Solid, GlobalStyle.tertiaryBackgroundColor)
342+
property("border-spacing", "0")
343+
marginY(1.cssRem)
344+
overflow(Overflow.Hidden)
345+
width(100.percent)
346+
}
347+
348+
"thead" style {
349+
backgroundColor(GlobalStyle.secondaryBackgroundColor)
350+
}
351+
352+
"th, td" style {
353+
borderBottom(1.px, LineStyle.Solid, GlobalStyle.tertiaryBackgroundColor)
354+
borderRight(1.px, LineStyle.Solid, GlobalStyle.tertiaryBackgroundColor)
355+
padding(0.75.cssRem)
356+
textAlign(TextAlign.Left)
357+
}
358+
359+
"th:last-child, td:last-child" style {
360+
borderRight(0.px)
361+
}
362+
363+
"tr:last-child td" style {
364+
borderBottom(0.px)
365+
}
366+
367+
"tr:nth-child(even)" style {
368+
backgroundColor(rgba(255, 255, 255, 0.05))
369+
}
338370
}
339371

340372
val contentWrapper by style {

0 commit comments

Comments
 (0)