| 1 |
/* CheckBox |
| 2 |
* |
| 3 |
* Styling CheckBox mainly includes: |
| 4 |
* |
| 5 |
* 1. Containers |
| 6 |
* .dijitCheckBox |
| 7 |
* |
| 8 |
* 2. CheckBox within ToggleButton |
| 9 |
* .dijitCheckBoxIcon |
| 10 |
* |
| 11 |
* 3. States - Checked, Hover, Disabled. |
| 12 |
* .dijitCheckBoxChecked |
| 13 |
* .dijitCheckBoxHover |
| 14 |
* .dijitCheckBoxCheckedHover |
| 15 |
* .dijitCheckBoxDisabled |
| 16 |
* .dijitCheckBoxCheckedDisabled |
| 17 |
*/ |
| 18 |
|
| 19 |
|
| 20 |
@import 'dijit_form_variables'; |
| 21 |
|
| 22 |
.{$theme-name} { |
| 23 |
|
| 24 |
.dijitCheckBox { |
| 25 |
background-color: $checkbox-background-color; |
| 26 |
border: 1px solid $checkbox-border-color; |
| 27 |
width: $checkbox-width; |
| 28 |
height: $checkbox-height; |
| 29 |
line-height: 1; |
| 30 |
padding: $checkbox-padding; |
| 31 |
border-radius: $checkbox-border-radius; |
| 32 |
text-align: center; |
| 33 |
position: relative; |
| 34 |
overflow: visible; |
| 35 |
transition: all 0.1s linear; |
| 36 |
input { |
| 37 |
position: absolute; |
| 38 |
top: 0; |
| 39 |
} |
| 40 |
} |
| 41 |
|
| 42 |
/* Icon */ |
| 43 |
|
| 44 |
.dijitCheckBoxIcon, |
| 45 |
.dijitCheckBoxChecked, |
| 46 |
.dijitCheckBoxCheckedDisabled { |
| 47 |
&:before { |
| 48 |
_icon-core-style(); |
| 49 |
content: $checkbox-icon; |
| 50 |
color: $checkbox-checked-icon-color; |
| 51 |
} |
| 52 |
} |
| 53 |
|
| 54 |
/* This is the checkbox icon within a widget, e.g. toggle button */ |
| 55 |
|
| 56 |
.dijitCheckBoxIcon { |
| 57 |
padding: $checkbox-icon-padding; |
| 58 |
|
| 59 |
&:before { |
| 60 |
color: $checkbox-icon-checked-icon-color; |
| 61 |
} |
| 62 |
} |
| 63 |
|
| 64 |
// checkbox icon within alternative buttons |
| 65 |
if($button-alternative-colors && length($button-alternative-colors) > 0) { |
| 66 |
for class in $button-alternative-colors { |
| 67 |
.{class} { |
| 68 |
.dijitCheckBoxIcon { |
| 69 |
&:before { |
| 70 |
color: $checkbox-checked-icon-color; |
| 71 |
} |
| 72 |
} |
| 73 |
} |
| 74 |
} |
| 75 |
} |
| 76 |
|
| 77 |
/* checked */ |
| 78 |
|
| 79 |
.dijitCheckBoxChecked { |
| 80 |
background-color: $checkbox-checked-background-color; |
| 81 |
border-color: $checkbox-checked-border-color; |
| 82 |
} |
| 83 |
|
| 84 |
/* hovered */ |
| 85 |
/* over unchecked */ |
| 86 |
|
| 87 |
.dijitCheckBoxHover { |
| 88 |
background-color: $checkbox-hover-unchecked-background-color; |
| 89 |
border: $checkbox-hover-unchecked-border-color; |
| 90 |
} |
| 91 |
|
| 92 |
/* over checked */ |
| 93 |
|
| 94 |
.dijitCheckBoxCheckedHover { |
| 95 |
background-color: $checkbox-hover-checked-background-color; |
| 96 |
border: $checkbox-hover-checked-border-color; |
| 97 |
} |
| 98 |
|
| 99 |
/* disabled */ |
| 100 |
|
| 101 |
.dijitCheckBoxDisabled { |
| 102 |
color: $checkbox-disabled-color; |
| 103 |
background-color: $checkbox-disabled-background-color; |
| 104 |
border-color: $checkbox-disabled-border-color; |
| 105 |
} |
| 106 |
|
| 107 |
.dijitCheckBoxCheckedDisabled { |
| 108 |
color: $checkbox-checked-disabled-color; |
| 109 |
background-color: $checkbox-checked-disabled-background-color; |
| 110 |
border-color: $checkbox-checked-disabled-border-color; |
| 111 |
} |
| 112 |
|
| 113 |
/* Checkbox within a menu item */ |
| 114 |
|
| 115 |
.dijitCheckedMenuItem .dijitCheckedMenuItemIcon { |
| 116 |
background-color: $checkbox-background-color; |
| 117 |
border: 1px solid $checkbox-border-color; |
| 118 |
width: $checkbox-width; |
| 119 |
height: $checkbox-height; |
| 120 |
line-height: 1; |
| 121 |
padding: $checkbox-padding; |
| 122 |
border-radius: $checkbox-border-radius; |
| 123 |
text-align: center; |
| 124 |
position: relative; |
| 125 |
overflow: visible; |
| 126 |
transition: all 0.1s linear; |
| 127 |
} |
| 128 |
|
| 129 |
.dijitCheckedMenuItemChecked .dijitCheckedMenuItemIcon { |
| 130 |
&:before { |
| 131 |
_icon-core-style(); |
| 132 |
content: $checkbox-icon; |
| 133 |
color: $theme-base; |
| 134 |
} |
| 135 |
} |
| 136 |
|
| 137 |
} |