grid-auto-rows: 1fr;
grid-template-columns: repeat(3, minmax(0, 1fr));
.grid {
display: grid;
grid-template-columns: 1fr 1.5fr 1fr;
grid-template-rows: repeat(2, auto) repeat(3, 1fr);
grid-gap: 10px;
height: calc(100vh - 10px);
}
// avoid using align-items : center; in Grid container
@Composable
fun Board() {
Column {
for (i in 0 until 8) {
Row {
for (j in 0 until 8) {
val isLightSquare = i % 2 == j % 2
val squareColor = if (isLightSquare) lightSquare else darkSquare
Box(
modifier = Modifier
.weight(1f)
.aspectRatio(1f)
.background(squareColor)
) {
Text(text = "${i + j}")
}
}
}
}
}
}
Code Example |
---|
Css :: styles only for IE |
Css :: all.min.css cdn |
Css :: how to make border for letters in css |
Css :: min padding |
Css :: css glow on hover |
Css :: text properties css |
Css :: html text not wrapping |
Css :: flex fill space |
Css :: html table wrap text |
Css :: how to give text two colors in css |
Css :: background image and position css |
Css :: put an border around an text in css |
Css :: bootstrap Aligning images |
Css :: id starts with css |
Css :: css calc |
Css :: background repeat space |
Css :: vuetify input change outline color |
Css :: wrap none css |
Css :: javavscript use .filter to return odd numbers in an array |
Css :: datatables width 100% not working |
Css :: inline text and image |
Css :: border image css |
Css :: special custom scrollbar in scss |
Css :: scss percentage |
Css :: css transform origin |
Css :: border buttom color |
Css :: input text only css |
Css :: import custom font |
Css :: css chevron arrow |
Css :: image with background color css |