TODO: Slider

DONE: Segmented buttons
This commit is contained in:
2024-02-12 20:11:33 +04:00
committed by doryan
parent ff00e19aeb
commit fef77fb0f9
9 changed files with 175 additions and 62 deletions

View File

@@ -1,3 +1,10 @@
input[type="button"].test-button
color: white
&:not(:checked)
background-color: green
&:checked
background-color: blue
button:not(.m3-fab, .m3-icon-button)
width: min-content
height: min-content

View File

@@ -1,31 +1,46 @@
div.m3.m3-segmented-buttons
padding: 0
height: 40px
display: flex
flex-direction: row
width: min-content
border-radius: 20px
box-sizing: border-box
border-collapse: collapse
& > button.m3.m3-button-segment
margin: 0 -0.5px 0 -0.5px
& > button.m3.m3-button-segment:first-child
border-radius: 20px 0 0 20px
& > button.m3.m3-button-segment:last-child
border-radius: 0 20px 20px 0
& > button.m3.m3-button-segment
height: 40px
border-radius: 0
display: flex
min-width: 108px
width: max-content
box-sizing: border-box
padding-inline: 10px
border: 1px solid var(--md-sys-color-outline)
&
border-radius: 0
background-color: transparent
& > span
color: var(--md-sys-color-on-surface)
& > svg > text
fill: var(--md-sys-color-on-surface)
&:not(:first-child)
margin-left: -1px
&.selected
background-color: var(--md-sys-color-secondary-container)
&:first-child
border-radius: 20px 0 0 20px
&.selected > span
color: var(--md-sys-color-on-secondary-container)
&:last-child
border-radius: 0 20px 20px 0
&.selected > svg > text
fill: var(--md-sys-color-on-secondary-container)
& > span.m3.m3-button-segment-state-layer
position: absolute