Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 1 | @import "lengths"; |
| 2 | @import "colors"; |
| 3 | |
| 4 | /** |
| 5 | * Definition of form elements for Kalamar. |
| 6 | */ |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 7 | |
| 8 | .form-table { |
| 9 | display: block; |
| 10 | padding: 0; |
Akron | 0be894f | 2020-09-21 12:20:08 +0200 | [diff] [blame] | 11 | font-size: 80%; |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 12 | |
Akron | 0be894f | 2020-09-21 12:20:08 +0200 | [diff] [blame] | 13 | > fieldset { |
| 14 | margin-top: 0; |
| 15 | } |
| 16 | |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 17 | fieldset { |
| 18 | border-width: 0; |
| 19 | padding: 0; |
Akron | 0be894f | 2020-09-21 12:20:08 +0200 | [diff] [blame] | 20 | margin-top: 1em; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 21 | > div { |
| 22 | white-space: nowrap; |
| 23 | } |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | legend { |
| 27 | background-color: transparent; |
| 28 | margin-left: 0; |
| 29 | font-weight: bold; |
| 30 | border-radius: $standard-border-radius; |
| 31 | } |
| 32 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 33 | label, |
| 34 | input[type=radio] { |
Akron | 0be894f | 2020-09-21 12:20:08 +0200 | [diff] [blame] | 35 | // font-size: 80%; |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | label[for] { |
| 39 | display: block; |
| 40 | text-align: left; |
| 41 | } |
| 42 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 43 | label[for], |
| 44 | input[type=submit], |
| 45 | a.form-button { |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 46 | margin-top: 2em; |
| 47 | } |
| 48 | |
Akron | 0be894f | 2020-09-21 12:20:08 +0200 | [diff] [blame] | 49 | fieldset.form-line { |
| 50 | legend { |
| 51 | // float: left; |
| 52 | font-size: 100%; |
| 53 | display: inline-block; |
| 54 | } |
| 55 | legend::after { |
| 56 | content: ':'; |
| 57 | color: $ids-green-2; |
| 58 | } |
| 59 | input, label[for] { |
| 60 | display: inline-block; |
| 61 | margin: 0; |
| 62 | } |
| 63 | input { |
| 64 | vertical-align: bottom; |
| 65 | } |
| 66 | label[for] { |
| 67 | margin-right: 2em; |
| 68 | } |
| 69 | } |
| 70 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 71 | input, |
| 72 | textarea, |
| 73 | button, |
| 74 | a.form-button { |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 75 | border-radius: $standard-border-radius; |
| 76 | } |
| 77 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 78 | input, |
| 79 | textarea { |
| 80 | border-color: $ids-grey-2; |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 81 | background-color: $nearly-white; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 82 | border-style: solid; |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 83 | } |
| 84 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 85 | input, |
| 86 | textarea, |
| 87 | select, |
| 88 | a.form-button { |
Akron | 1a9d5be | 2020-03-19 17:28:33 +0100 | [diff] [blame] | 89 | border-style: solid; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 90 | display: inline-block; |
| 91 | width: 20%; |
| 92 | min-width: 20em; |
| 93 | padding: $base-padding; |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 94 | } |
| 95 | |
| 96 | input[type=radio] { |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 97 | display: inline; |
Akron | 548ee67 | 2020-10-19 17:41:20 +0200 | [diff] [blame] | 98 | text-align: right; |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 99 | background-color: red; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 100 | width: auto; |
| 101 | min-width: auto; |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 102 | } |
| 103 | |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 104 | input[readonly=readonly], |
| 105 | textarea[readonly] { |
| 106 | background-color: $light-orange; |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | .field-with-error { |
| 110 | border-color: $ids-pink-1; |
| 111 | } |
| 112 | |
Akron | 1a9d5be | 2020-03-19 17:28:33 +0100 | [diff] [blame] | 113 | input[type=submit], |
| 114 | button, |
| 115 | a.form-button { |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 116 | display: inline-block; |
| 117 | cursor: pointer; |
| 118 | border-width: thin; |
| 119 | text-align: center; |
Akron | 1a9d5be | 2020-03-19 17:28:33 +0100 | [diff] [blame] | 120 | background-color: $middle-green; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 121 | border-color: $dark-green; |
Akron | 0be894f | 2020-09-21 12:20:08 +0200 | [diff] [blame] | 122 | // font-size: 8pt; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 123 | color: $dark-green; |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 124 | } |
| 125 | |
Akron | 1a9d5be | 2020-03-19 17:28:33 +0100 | [diff] [blame] | 126 | a.form-button:hover { |
Akron | 548ee67 | 2020-10-19 17:41:20 +0200 | [diff] [blame] | 127 | color: inherit !important; |
Akron | 1a9d5be | 2020-03-19 17:28:33 +0100 | [diff] [blame] | 128 | } |
| 129 | |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 130 | label.field-required::after { |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 131 | color: $ids-blue-1; |
| 132 | content: '*'; |
Akron | 5999212 | 2019-10-29 11:28:45 +0100 | [diff] [blame] | 133 | } |
Akron | 1a9d5be | 2020-03-19 17:28:33 +0100 | [diff] [blame] | 134 | } |
| 135 | |
| 136 | .button-abort { |
| 137 | background-color: $middle-orange !important; |
Akron | 7e5afce | 2020-08-25 15:50:19 +0200 | [diff] [blame] | 138 | color: $darkest-orange !important; |
| 139 | border-color: $darkest-orange !important; |
| 140 | } |
| 141 | |
| 142 | button { |
| 143 | cursor: pointer; |
| 144 | |
| 145 | + button { |
| 146 | right: 0; |
| 147 | } |
| 148 | |
| 149 | &[type=submit] { |
| 150 | @include choose-item; |
| 151 | font-weight: normal; |
| 152 | padding: 0; |
| 153 | height: 100%; |
| 154 | top: 0; |
| 155 | width: $button-width; |
| 156 | |
| 157 | > span:nth-of-type(1) { |
| 158 | @include blind; |
| 159 | } |
| 160 | |
| 161 | &::after { |
| 162 | font-family: "FontAwesome"; |
| 163 | } |
| 164 | |
| 165 | border: $border-size solid $nearly-white; |
| 166 | |
| 167 | &:hover, |
| 168 | &:focus { |
| 169 | @include choose-hover; |
| 170 | } |
| 171 | |
| 172 | &::-moz-focus-inner { |
| 173 | border: none; |
| 174 | } |
| 175 | |
| 176 | &:active { |
| 177 | @include choose-active; |
| 178 | } |
| 179 | |
| 180 | /* |
| 181 | * This is just for styling the last button, |
| 182 | * in case there are more than one buttons. |
| 183 | */ |
| 184 | &:last-of-type { |
| 185 | border: { |
| 186 | right-width: $border-size; |
| 187 | right-style: solid; |
| 188 | top-right-radius: $standard-border-radius; |
| 189 | bottom-right-radius: $standard-border-radius; |
| 190 | } |
| 191 | } |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | /** |
| 196 | * Checkbox styling |
| 197 | * http://stackoverflow.com/questions/4148499/how-to-style-checkbox-using-css |
| 198 | */ |
| 199 | .checkbox { |
| 200 | display: none; |
| 201 | |
| 202 | + label { |
| 203 | cursor: pointer; |
| 204 | |
| 205 | span { |
| 206 | display: inline-block; |
| 207 | border-radius: 4px; |
| 208 | width: 1em; |
| 209 | height: 1em; |
| 210 | line-height: 1em; |
| 211 | vertical-align: middle; |
| 212 | padding: 0; |
| 213 | margin-right: .2em; |
| 214 | |
| 215 | &::after { |
| 216 | @include icon-font; |
| 217 | content: $fa-check; |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | &:checked + label span::after { |
| 223 | content: $fa-checked; |
| 224 | } |
Akron | 1a9d5be | 2020-03-19 17:28:33 +0100 | [diff] [blame] | 225 | } |