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