File tree 2 files changed +23
-1
lines changed
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 35
35
36
36
< input type ="hidden " name ="answer_id " value ="{{ answer.id }} " />
37
37
38
- < div class ="btn-group btn-group-sm " role ="group ">
38
+ < div class ="btn-group btn-group-sm outline-fix " role ="group ">
39
39
< input type ="radio " class ="btn-check " name ="action " value ="publish " id ="{{ answer.id }}-radio-publish " autocomplete ="off " {% if answer.will_be_public %}checked{% endif %} >
40
40
< label class ="btn btn-outline-primary " for ="{{ answer.id }}-radio-publish "> {% trans 'Publish' %}</ label >
41
41
Original file line number Diff line number Diff line change @@ -17,3 +17,25 @@ div.vote-inputs > textarea {
17
17
div .vote-inputs label .choice-error {
18
18
border-color : $evap-red ;
19
19
}
20
+
21
+ // Change .btn-group outlined border style to fix double borders with outlined button style
22
+ // see https://github.com/twbs/bootstrap/issues/25888
23
+ .btn-group.outline-fix {
24
+
25
+ // If .btn is not the last element in the group, remove the right border.
26
+ // Also uses :has to not remove the right border if the next element is a disabled input
27
+ .btn :not (:last-child ):not (.dropdown-toggle ):has (+ :not (.btn-check [disabled ])), .btn-group :not (:last-child ) > .btn {
28
+ border-right : 0 ;
29
+ }
30
+
31
+ // Explicitly disable the left border of disabled .btn's to use the right border of the previous button.
32
+ .btn-check [disabled ] + .btn {
33
+ border-left : 0 ;
34
+ }
35
+
36
+ // Revert Bootstrap (Prevent double borders when buttons are next to each other)
37
+ > :not (.btn-check :first-child ) + .btn ,
38
+ > .btn-group :not (:first-child ) {
39
+ margin-left : unset ;
40
+ }
41
+ }
You can’t perform that action at this time.
0 commit comments