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