material-you-react/src/styles/button-styles/segmented-button.sass

64 lines
1.9 KiB
Sass
Raw Normal View History

div.m3.m3-segmented-buttons
2024-02-12 19:11:33 +03:00
padding: 0
height: 40px
display: flex
flex-direction: row
border-radius: 20px
2024-02-12 19:11:33 +03:00
box-sizing: border-box
border-collapse: collapse
& > button.m3.m3-button-segment
2024-02-12 19:11:33 +03:00
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
2024-02-12 19:11:33 +03:00
display: flex
2024-02-08 23:18:34 +03:00
min-width: 108px
width: max-content
2024-02-12 19:11:33 +03:00
padding-inline: 10px
2024-02-08 23:18:34 +03:00
border: 1px solid var(--md-sys-color-outline)
2024-02-12 19:11:33 +03:00
&
border-radius: 0
background-color: transparent
& > span
color: var(--md-sys-color-on-surface)
& > svg > text
fill: var(--md-sys-color-on-surface)
2024-02-12 19:11:33 +03:00
&.selected
background-color: var(--md-sys-color-secondary-container)
2024-02-12 19:11:33 +03:00
&.selected > span
color: var(--md-sys-color-on-secondary-container)
2024-02-12 19:11:33 +03:00
&.selected > svg > text
fill: var(--md-sys-color-on-secondary-container)
& > span.m3.m3-button-segment-state-layer
position: absolute
width: 100%
height: 100%
& > span.m3.m3-button-segment-state-layer, span.m3.m3-ripple-domain
transition: .2s cubic-bezier(0.2, 0, 0, 1)
&:hover
& > span.m3.m3-button-segment-state-layer
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 8%, transparent)
&:is(&:active, &:focus-visible)
& > span.m3.m3-button-segment-state-layer
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 12%, transparent)
&:active
& > span.m3.m3-ripple-domain > span.m3.ripple
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 12%, transparent)