| 1 |
/* RadioButton |
| 2 |
* |
| 3 |
* Styling RadioButton mainly includes: |
| 4 |
* |
| 5 |
* 1. Containers |
| 6 |
* .dijitRadio|.dijitRadioIcon |
| 7 |
* |
| 8 |
* 2. RadioButton within ToggleButton |
| 9 |
* .dijitToggleButton|.dijitToggleButtonChecked |
| 10 |
* |
| 11 |
* 3. Checked state |
| 12 |
* .dijitRadioChecked |
| 13 |
* .dijitToggleButtonChecked |
| 14 |
* |
| 15 |
* 4. Hover state |
| 16 |
* .dijitRadioHover|.dijitRadioCheckedHover |
| 17 |
* |
| 18 |
* 5. Disabled state |
| 19 |
* .dijitRadioDisabled|.dijitRadioCheckedDisabled |
| 20 |
*/ |
| 21 |
|
| 22 |
@import 'dijit_form_variables'; |
| 23 |
|
| 24 |
.{$theme-name} { |
| 25 |
|
| 26 |
.dijitRadio, |
| 27 |
.dijitRadioIcon { /* inside a toggle button */ |
| 28 |
width: $radio-width; |
| 29 |
height: $radio-height; |
| 30 |
background: $radio-background-color; |
| 31 |
border: 1px solid $radio-border-color; |
| 32 |
border-radius: 50%; |
| 33 |
position: relative; |
| 34 |
overflow: visible; |
| 35 |
box-sizing: border-box; |
| 36 |
&:after { |
| 37 |
content: " "; |
| 38 |
display: block; |
| 39 |
width: 0; |
| 40 |
height: 0; |
| 41 |
background-color: $radio-checked-color; |
| 42 |
border-radius: 50%; |
| 43 |
opacity: 0; |
| 44 |
margin: ($radio-width) * .5; |
| 45 |
position: absolute; |
| 46 |
top: 0; |
| 47 |
left: 0; |
| 48 |
transition: all 0.15s ease-in-out; |
| 49 |
} |
| 50 |
} |
| 51 |
|
| 52 |
// hover |
| 53 |
.dijitRadioHover { |
| 54 |
border-color: $radio-hover-border-color; |
| 55 |
} |
| 56 |
|
| 57 |
// checked |
| 58 |
.dijitRadioChecked, |
| 59 |
.dijitChecked .dijitRadioIcon { |
| 60 |
&:after { |
| 61 |
width: $radio-width - 8px; |
| 62 |
height: @width; |
| 63 |
margin: 3px; |
| 64 |
opacity: 1; |
| 65 |
} |
| 66 |
} |
| 67 |
|
| 68 |
// checkbox icon within alternative buttons |
| 69 |
if($button-alternative-colors && length($button-alternative-colors) > 0) { |
| 70 |
for class in $button-alternative-colors { |
| 71 |
.{class} { |
| 72 |
.dijitRadioIcon { |
| 73 |
border-color: $white; |
| 74 |
&:after { |
| 75 |
background-color: $white; |
| 76 |
} |
| 77 |
} |
| 78 |
} |
| 79 |
} |
| 80 |
} |
| 81 |
|
| 82 |
// disabled |
| 83 |
.dijitRadioDisabled { |
| 84 |
background-color: $radio-disabled-background-color; |
| 85 |
border-color: $radio-disabled-border-color; |
| 86 |
} |
| 87 |
|
| 88 |
.dijitRadioCheckedDisabled { |
| 89 |
background-color: $radio-disabled-background-color; |
| 90 |
border-color: $radio-checked-disabled-color; |
| 91 |
&:after { |
| 92 |
background-color: $radio-checked-disabled-color; |
| 93 |
} |
| 94 |
} |
| 95 |
|
| 96 |
/* ---- RadioMenuItem ---- */ |
| 97 |
.dijitRadioMenuItem { |
| 98 |
.dijitCheckedMenuItemIcon { |
| 99 |
width: $radio-width; |
| 100 |
height: $radio-height; |
| 101 |
background: $radio-background-color; |
| 102 |
border: 1px solid $border-color; |
| 103 |
border-radius: 50%; |
| 104 |
position: relative; |
| 105 |
overflow: visible; |
| 106 |
box-sizing: border-box; |
| 107 |
&:after { |
| 108 |
content: " "; |
| 109 |
display: block; |
| 110 |
width: 0; |
| 111 |
height: 0; |
| 112 |
background-color: $radio-checked-color; |
| 113 |
border-radius: 50%; |
| 114 |
opacity: 0; |
| 115 |
margin: ($radio-width) * .5; |
| 116 |
position: absolute; |
| 117 |
top: 0; |
| 118 |
left: 0; |
| 119 |
transition: all 0.15s ease-in-out; |
| 120 |
} |
| 121 |
} |
| 122 |
} |
| 123 |
|
| 124 |
.dijitRadioMenuItemChecked { |
| 125 |
.dijitCheckedMenuItemIcon { |
| 126 |
border-color: $border-color; |
| 127 |
&:after { |
| 128 |
width: $radio-width - 8px; |
| 129 |
height: @width; |
| 130 |
margin: 3px; |
| 131 |
opacity: 1; |
| 132 |
} |
| 133 |
} |
| 134 |
} |
| 135 |
|
| 136 |
} |