1212$segment-properties : (
1313 ' default-background' : awsui .$color-background-segment-default ,
1414 ' default-color' : awsui .$color-text-segment-default ,
15- ' hover-background' : awsui .$color-background-segment-hover ,
15+ // 'hover-background': awsui.$color-background-segment-hover,
16+ ' hover-background' : awsui .$color-background-dropdown-item-filter-match ,
1617 ' hover-color' : awsui .$color-text-segment-hover ,
1718 ' active-background' : awsui .$color-background-segment-active ,
1819 ' disabled-background' : awsui .$color-background-segment-disabled ,
@@ -38,73 +39,108 @@ $selected-color: awsui.$color-text-segment-active;
3839 @include styles .text-flex-wrapping ;
3940 @include styles .font-button ;
4041 letter-spacing : 0.25px ;
41- border-block : styles .$control-border-width solid $default-border-color ;
42- border-inline : styles .$control-border-width solid $default-border-color ;
43- padding-block : styles . $control-padding-vertical ;
44- padding-inline : awsui .$space-button-horizontal ;
45- border-inline-end-width : 0 ;
42+ // border-block: styles.$control-border-width solid $default-border-color;
43+ // border-inline: styles.$control-border-width solid $default-border-color;
44+ padding-block : 2 px ;
45+ padding-inline : calc ( awsui .$space-button-horizontal - 8 px ) ;
46+ // border-inline-end-width: 0;
4647 background : $default-background ;
4748 color : $default-color ;
49+ border-inline : none ;
50+ border-block : none ;
51+ border-start-start-radius : 0 ;
52+ border-start-end-radius : 0 ;
53+ border-end-start-radius : 0 ;
54+ border-end-end-radius : 0 ;
4855 overflow : visible ;
56+ position : relative ;
57+ height : calc (100% - 4px );
58+
4959 & :focus {
5060 outline : none ;
5161 }
62+
5263 @for $i from 1 through 6 {
5364 & :nth-child (#{$i } ) {
5465 grid-column : $i ;
5566 -ms-grid-column : $i ;
5667 }
5768 }
69+
5870 @include focus-visible .when-visible {
5971 @include styles .focus-highlight (awsui .$space-segmented-control-focus-outline-gutter );
6072 }
61- & :last-child {
62- border-inline-end-width : styles .$control-border-width ;
63- border-start-start-radius : 0 ;
64- border-start-end-radius : awsui .$border-radius-button ;
65- border-end-start-radius : 0 ;
66- border-end-end-radius : awsui .$border-radius-button ;
67- }
68- & :first-child {
69- border-start-start-radius : awsui .$border-radius-button ;
70- border-start-end-radius : 0 ;
71- border-end-start-radius : awsui .$border-radius-button ;
72- border-end-end-radius : 0 ;
73- }
73+
74+ // &:last-child {
75+ // // border-inline-end-width: styles.$control-border-width;
76+ // // border-start-start-radius: 0;
77+ // // border-start-end-radius: 8px;
78+ // // border-end-start-radius: 0;
79+ // // border-end-end-radius: 8px;
80+ // border-radius: 4px;
81+ // }
82+ // &:first-child {
83+ // border-start-start-radius: 8px;
84+ // border-start-end-radius: 0;
85+ // border-end-start-radius: 8px;
86+ // border-end-end-radius: 0;
87+ // }
7488
7589 & .disabled {
7690 background : $disabled-background ;
77- border-color : $disabled-border-color ;
91+ // border-color: $disabled-border-color;
7892 color : $disabled-color ;
7993 }
8094
8195 & :not (.disabled ) + .segment.disabled {
82- border-inline-start-color : $default-border-color ;
96+ // border-inline-start-color: $default-border-color;
8397 }
8498
8599 & .selected {
86100 background : $selected-background ;
87- border-color : $selected-border-color ;
101+ // border-color: $selected-border-color;
88102 color : $selected-color ;
103+
89104 & + .segment ,
90105 & + .segment.disabled {
91- border-inline-start-color : $selected-border-color ;
106+ // border-inline-start-color: $selected-border-color;
92107 }
93108 }
94109
95110 & :hover:not (.selected ):not (.disabled ):not (:focus ) {
96111 background : $hover-background ;
97112 color : $hover-color ;
98- border-color : $hover-border-color ;
113+ // border-color: $hover-border-color;
99114 cursor : pointer ;
115+
100116 & + .segment :not (.selected ) {
101- border-inline-start-color : $hover-border-color ;
117+ // border-inline-start-color: $hover-border-color;
102118 }
103119 }
104120
105121 & .selected + .segment :hover:not (.selected ):not (.disabled ):not (:focus ) {
106- border-inline-start-color : $selected-border-color ;
122+ // border-inline-start-color: $selected-border-color;
123+ }
124+
125+ // Add dividers after each button except the last one
126+ & :not (:last-child )::after {
127+ content : ' ' ;
128+ position : absolute ;
129+ right : -9px ;
130+ top : 4px ;
131+ height : calc (100% - 8px );
132+ width : 1px ;
133+ background : awsui .$color-border-input-default ;
134+ z-index : 1 ;
107135 }
136+
137+ // &:has(+ .selected)::after {
138+ // content: none;
139+ // }
140+
141+ // &.selected::after {
142+ // content: none;
143+ // }
108144}
109145
110146.icon {
0 commit comments