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