Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 1 | label, |
| 2 | legend { |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 3 | margin: 0; |
Yoshie Muranaka | fa56273 | 2019-07-17 11:23:15 -0500 | [diff] [blame^] | 4 | color: $text-02; |
| 5 | text-transform: uppercase; |
| 6 | font-weight: 700; |
| 7 | font-size: 0.75em; |
| 8 | margin-bottom: 0; |
| 9 | line-height: 2.2; |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 10 | .error { |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 11 | font-size: 0.9em; |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 12 | } |
| 13 | } |
| 14 | |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 15 | // TODO: Start replacing use of label__helper-text |
| 16 | .label__helper-text, |
| 17 | .form__helper-text { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 18 | color: $text-02; |
Yoshie Muranaka | e4194ce | 2019-05-24 14:33:56 -0500 | [diff] [blame] | 19 | line-height: 1.2; |
| 20 | font-size: 0.9em; |
| 21 | margin-bottom: 0.4em; |
| 22 | } |
| 23 | |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 24 | input[type="email"], |
| 25 | input[type="number"], |
| 26 | input[type="password"], |
| 27 | input[type="search"], |
| 28 | input[type="tel"], |
| 29 | input[type="url"], |
| 30 | input[type="text"], |
| 31 | input[type="date"], |
| 32 | input[type="time"], |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 33 | textarea { |
| 34 | border-radius: 0px; |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 35 | border: 1px solid $border-color-02; |
beccabroek | a09cc2d | 2019-01-23 14:26:55 -0600 | [diff] [blame] | 36 | margin: 0; |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 37 | background: $primary-light; |
Michael Davis | e15a956 | 2017-03-03 14:30:24 -0600 | [diff] [blame] | 38 | box-shadow: 0 0 0; |
| 39 | transition: none !important; |
Yoshie Muranaka | 5bd1dec | 2019-05-16 13:06:32 -0500 | [diff] [blame] | 40 | max-height: 2.1em; |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 41 | &:focus { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 42 | border-color: $border-color-01; |
| 43 | box-shadow: 0 -3px $primary-accent inset; |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 44 | } |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 45 | &:disabled, |
| 46 | .disabled { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 47 | background: $background-03; |
| 48 | border: 1px solid $border-color-02; |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 49 | } |
| 50 | &.input__error { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 51 | box-shadow: 0 -5px $status-error inset; |
| 52 | color: $status-error; |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 53 | &:focus { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 54 | box-shadow: 0 -5px $primary-accent inset; |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 55 | } |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 56 | } |
| 57 | } |
| 58 | |
beccabroek | a09cc2d | 2019-01-23 14:26:55 -0600 | [diff] [blame] | 59 | //input validation |
| 60 | .ng-invalid.ng-touched { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 61 | box-shadow: 0 -3px $status-error inset; |
beccabroek | a09cc2d | 2019-01-23 14:26:55 -0600 | [diff] [blame] | 62 | &:focus { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 63 | border-color: $border-color-01; |
| 64 | box-shadow: 0 -3px $status-error inset; |
beccabroek | a09cc2d | 2019-01-23 14:26:55 -0600 | [diff] [blame] | 65 | } |
| 66 | } |
| 67 | .submitted .ng-invalid { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 68 | box-shadow: 0 -3px $status-error inset; |
beccabroek | a09cc2d | 2019-01-23 14:26:55 -0600 | [diff] [blame] | 69 | &:focus { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 70 | border-color: $border-color-01; |
| 71 | box-shadow: 0 -3px $status-error inset; |
beccabroek | a09cc2d | 2019-01-23 14:26:55 -0600 | [diff] [blame] | 72 | } |
| 73 | } |
| 74 | |
| 75 | .form-error { |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 76 | margin-bottom: 0.7em; |
beccabroek | a09cc2d | 2019-01-23 14:26:55 -0600 | [diff] [blame] | 77 | font-size: 0.8rem; |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 78 | color: $status-error; |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 79 | height: 1rem; |
beccabroek | a09cc2d | 2019-01-23 14:26:55 -0600 | [diff] [blame] | 80 | display: block; |
| 81 | visibility: hidden; |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 82 | // TODO: Create state rulesets rather than relying on one off solutions |
beccabroek | a09cc2d | 2019-01-23 14:26:55 -0600 | [diff] [blame] | 83 | .visible { |
| 84 | visibility: visible; |
| 85 | } |
| 86 | } |
Michael Davis | 4ac71d4 | 2017-06-19 14:47:50 -0500 | [diff] [blame] | 87 | //Foundation overwrite |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 88 | [type="color"], |
| 89 | [type="date"], |
| 90 | [type="datetime-local"], |
| 91 | [type="datetime"], |
| 92 | [type="email"], |
| 93 | [type="month"], |
| 94 | [type="number"], |
| 95 | [type="password"], |
| 96 | [type="search"], |
| 97 | [type="tel"], |
| 98 | [type="text"], |
| 99 | [type="time"], |
| 100 | [type="url"], |
| 101 | [type="week"], |
| 102 | textarea { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 103 | border-color: $border-color-02; |
Michael Davis | 4ac71d4 | 2017-06-19 14:47:50 -0500 | [diff] [blame] | 104 | } |
| 105 | |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 106 | input[readonly], |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 107 | input[readonly]:focus { |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 108 | box-shadow: 0 0 0; |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 109 | background: $background-03; |
| 110 | border: 1px solid $border-color-02; |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 111 | } |
| 112 | |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 113 | textarea { |
| 114 | padding: 0.2em; |
| 115 | height: auto; |
| 116 | } |
| 117 | |
| 118 | input[type="submit"], |
| 119 | .submit { |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 120 | margin: 1em 0; |
| 121 | width: 100%; |
| 122 | } |
| 123 | |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 124 | // Custom select |
| 125 | select { |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 126 | border-radius: 0px; |
Yoshie Muranaka | de38208 | 2019-04-30 13:56:10 -0500 | [diff] [blame] | 127 | height: auto; |
| 128 | padding-right: 0.5rem; //override inherited Foundation style |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 129 | border-color: $border-color-02; |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 130 | @include fastTransition-all; |
| 131 | @include bgImage__arrowDown-primary; |
| 132 | &:focus { |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 133 | box-shadow: 0 0 0; |
| 134 | } |
Yoshie Muranaka | de38208 | 2019-04-30 13:56:10 -0500 | [diff] [blame] | 135 | &[disabled] { |
| 136 | @include bgImage__arrowDown-disabled; |
| 137 | } |
Michael Davis | cb8bb19 | 2017-02-09 15:45:13 -0600 | [diff] [blame] | 138 | } |
Yoshie Muranaka | 5bd1dec | 2019-05-16 13:06:32 -0500 | [diff] [blame] | 139 | |
| 140 | #login__form { |
| 141 | input { |
| 142 | height: 3em; |
| 143 | max-height: none; |
| 144 | } |
| 145 | } |
Yoshie Muranaka | e4194ce | 2019-05-24 14:33:56 -0500 | [diff] [blame] | 146 | .form__validation-message { |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 147 | color: $status-error; |
Yoshie Muranaka | fa56273 | 2019-07-17 11:23:15 -0500 | [diff] [blame^] | 148 | font-size: 0.8em; |
| 149 | line-height: 1.1; |
| 150 | padding-top: 2px; |
| 151 | } |
| 152 | |
| 153 | .radio-label { |
| 154 | text-transform: none; |
| 155 | font-weight: normal; |
Yoshie Muranaka | e4194ce | 2019-05-24 14:33:56 -0500 | [diff] [blame] | 156 | font-size: 0.9em; |
Yoshie Muranaka | fa56273 | 2019-07-17 11:23:15 -0500 | [diff] [blame^] | 157 | line-height: 1.2; |
| 158 | margin: 0.8em 0; |
| 159 | color: $text-01; |
| 160 | input[type=radio] { |
| 161 | margin-bottom: 0; |
| 162 | } |
Yoshie Muranaka | e4194ce | 2019-05-24 14:33:56 -0500 | [diff] [blame] | 163 | } |
Dixsie Wolmers | c652ed1 | 2019-07-19 13:03:28 -0500 | [diff] [blame] | 164 | |
| 165 | /** |
| 166 | * Used for basic vertically stacked forms |
| 167 | * that do not need a grid for layout |
| 168 | * Should only wrap form elements and label |
| 169 | * Helper text shoul not be wrapped in the |
| 170 | * form-field container |
| 171 | * EX: Manage Power Usage |
| 172 | * Markup |
| 173 | <div class="section-content"> |
| 174 | <p class="form__helper-text">Some helper text</p> |
| 175 | <div class=" form__field"> |
| 176 | <label for="power-cap" class="content-label">POWER CAP VALUE IN WATTS</label> |
| 177 | <input id="power-cap type="number" /> |
| 178 | </div> |
| 179 | </div> |
| 180 | */ |
| 181 | |
| 182 | .form__field { |
| 183 | min-width: 150px; |
| 184 | max-width: 240px; |
| 185 | } |
| 186 | |
| 187 | .form__field--large { |
| 188 | max-width: 330px; |
| 189 | } |
| 190 | |
| 191 | // TODO Replace form-actions with form__actions. see below |
| 192 | .form-actions { |
| 193 | width: 100%; |
| 194 | margin-top: 3rem; |
| 195 | padding-top: 1rem; |
| 196 | border-top: 1px solid $border-color-01; |
| 197 | |
| 198 | button { |
| 199 | display: block; |
| 200 | float: right; |
| 201 | margin: 0.5em 0 0 1em; |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * Use to wrap the cancel and submit buttons on |
| 207 | * a form to create the top border and white space |
| 208 | * Markup |
| 209 | <div class="form-actions"> |
| 210 | <button type="submit" class="btn-primary" ng-click="setPowerCap()"> |
| 211 | Save settings |
| 212 | </button> |
| 213 | <button type="button" class="btn btn-secondary" ng-click="refresh()"> |
| 214 | Cancel |
| 215 | </button> |
| 216 | </div> |
| 217 | */ |
| 218 | |
| 219 | .form__actions { |
| 220 | margin-top: 3rem; |
| 221 | padding-top: 1rem; |
| 222 | border-top: 1px solid $border-color-01; |
| 223 | display: flex; |
| 224 | justify-content: flex-end; |
| 225 | |
| 226 | button:first-of-type { |
| 227 | order: 1; |
| 228 | margin-left: 1rem; |
| 229 | } |
| 230 | } |
Yoshie Muranaka | fa56273 | 2019-07-17 11:23:15 -0500 | [diff] [blame^] | 231 | |
| 232 | .radio-option__input-field-group { |
| 233 | margin-left: 1.5em; |
| 234 | } |
| 235 | |
| 236 | .field-group-container { |
| 237 | margin-bottom: 30px; |
| 238 | position: relative; |
| 239 | &:last-child { |
| 240 | margin-bottom: 12px; |
| 241 | } |
| 242 | |
| 243 | input + .form__validation-message { |
| 244 | position: absolute; |
| 245 | } |
| 246 | } |