blob: 6fc75dcbc17c48a49ebc024102149d4691ddb99f [file] [log] [blame]
Akron7e5afce2020-08-25 15:50:19 +02001@import "lengths";
2@import "colors";
3
4/**
5 * Definition of form elements for Kalamar.
6 */
Akron59992122019-10-29 11:28:45 +01007
8.form-table {
9 display: block;
10 padding: 0;
11
12 fieldset {
13 border-width: 0;
14 padding: 0;
15 margin: 0;
Akron7e5afce2020-08-25 15:50:19 +020016 > div {
17 white-space: nowrap;
18 }
Akron59992122019-10-29 11:28:45 +010019 }
20
21 legend {
22 background-color: transparent;
23 margin-left: 0;
24 font-weight: bold;
25 border-radius: $standard-border-radius;
26 }
27
Akron7e5afce2020-08-25 15:50:19 +020028 label,
29 input[type=radio] {
Akron59992122019-10-29 11:28:45 +010030 font-size: 80%;
31 }
32
33 label[for] {
34 display: block;
35 text-align: left;
36 }
37
Akron7e5afce2020-08-25 15:50:19 +020038 label[for],
39 input[type=submit],
40 a.form-button {
Akron59992122019-10-29 11:28:45 +010041 margin-top: 2em;
42 }
43
Akron7e5afce2020-08-25 15:50:19 +020044 input,
45 textarea,
46 button,
47 a.form-button {
Akron59992122019-10-29 11:28:45 +010048 border-radius: $standard-border-radius;
49 }
50
Akron7e5afce2020-08-25 15:50:19 +020051 input,
52 textarea {
53 border-color: $ids-grey-2;
Akron59992122019-10-29 11:28:45 +010054 background-color: $nearly-white;
Akron7e5afce2020-08-25 15:50:19 +020055 border-style: solid;
Akron59992122019-10-29 11:28:45 +010056 }
57
Akron7e5afce2020-08-25 15:50:19 +020058 input,
59 textarea,
60 select,
61 a.form-button {
Akron1a9d5be2020-03-19 17:28:33 +010062 border-style: solid;
Akron7e5afce2020-08-25 15:50:19 +020063 display: inline-block;
64 width: 20%;
65 min-width: 20em;
66 padding: $base-padding;
Akron59992122019-10-29 11:28:45 +010067 }
68
69 input[type=radio] {
Akron7e5afce2020-08-25 15:50:19 +020070 display: inline;
71 text-aline: right;
Akron59992122019-10-29 11:28:45 +010072 background-color: red;
Akron7e5afce2020-08-25 15:50:19 +020073 width: auto;
74 min-width: auto;
Akron59992122019-10-29 11:28:45 +010075 }
76
Akron7e5afce2020-08-25 15:50:19 +020077 input[readonly=readonly],
78 textarea[readonly] {
79 background-color: $light-orange;
Akron59992122019-10-29 11:28:45 +010080 }
81
82 .field-with-error {
83 border-color: $ids-pink-1;
84 }
85
Akron1a9d5be2020-03-19 17:28:33 +010086 input[type=submit],
87 button,
88 a.form-button {
Akron7e5afce2020-08-25 15:50:19 +020089 display: inline-block;
90 cursor: pointer;
91 border-width: thin;
92 text-align: center;
Akron1a9d5be2020-03-19 17:28:33 +010093 background-color: $middle-green;
Akron7e5afce2020-08-25 15:50:19 +020094 border-color: $dark-green;
95 font-size: 8pt;
96 color: $dark-green;
Akron59992122019-10-29 11:28:45 +010097 }
98
Akron1a9d5be2020-03-19 17:28:33 +010099 a.form-button:hover {
100 color: default !important;
101 }
102
Akron59992122019-10-29 11:28:45 +0100103 label.field-required::after {
Akron7e5afce2020-08-25 15:50:19 +0200104 color: $ids-blue-1;
105 content: '*';
Akron59992122019-10-29 11:28:45 +0100106 }
Akron1a9d5be2020-03-19 17:28:33 +0100107}
108
109.button-abort {
110 background-color: $middle-orange !important;
Akron7e5afce2020-08-25 15:50:19 +0200111 color: $darkest-orange !important;
112 border-color: $darkest-orange !important;
113}
114
115button {
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 }
Akron1a9d5be2020-03-19 17:28:33 +0100198}