implement segmented select control without JS

This commit is contained in:
Bilal Catic
2019-11-01 08:53:50 +01:00
parent e3e0ddd508
commit a0449f7ffd
2 changed files with 31 additions and 56 deletions

View File

@@ -1,14 +1,18 @@
.ui-segment {
.segmented {
color: #02adba;
border: 1px solid #02adba;
border-radius: 4px;
display: inline-block;
}
.ui-segment span.option.active {
.segmented label {
color: #02adba;
}
.segmented input:checked + .label {
background-color: #02adba;
color: white;
}
.ui-segment span.option {
[type="radio"]:not(:checked) + span,
[type="radio"]:checked + span {
padding-left: 30px;
padding-right: 30px;
height: 35px;
@@ -21,9 +25,14 @@
border-right: 1px solid #02adba;
}
.ui-segment span.option:last-child {
.segmented :last-child .label {
border-right: none;
}
.segment-select {
.segmented input {
display: none;
}
span.label:before,
span.label:after {
display: none;
}