|
1 |
| -<style scoped> |
2 |
| - /* Custom-file focus styling: These can be removed once BSV4.beta.3 is released */ |
| 1 | +<style> |
| 2 | + /* Custom-file focus styling: These can possibly be removed once BSV4.beta.3 is released */ |
| 3 | + /* Although the focus handling/style will still be needed for Firefox keyboard-only users */ |
| 4 | +
|
3 | 5 | /* Regular focus styling */
|
4 |
| - .custom-file-input.focus ~ .custom-file-control, |
5 |
| - .custom-file-input:focus ~ .custom-file-control { |
| 6 | + .b-form-file.custom-file .custom-file-input.focus ~ .custom-file-control, |
| 7 | + .b-form-file.custom-file .custom-file-input:focus ~ .custom-file-control { |
6 | 8 | color: #495057;
|
7 | 9 | background-color: #fff;
|
8 | 10 | border-color: #80bdff;
|
9 | 11 | box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
|
10 | 12 | outline: none;
|
11 | 13 | }
|
12 | 14 | /* Invalid focus styling */
|
13 |
| - .custom-file-input.is-invalid.focus ~ .custom-file-control, |
14 |
| - .custom-file-input.is-invalid:focus ~ .custom-file-control, |
15 |
| - .was-validated .custom-file-input:invalid.focus ~ .custom-file-control, |
16 |
| - .was-validated .custom-file-input:invalid:focus ~ .custom-file-control { |
| 15 | + .b-form-file.custom-file .custom-file-input.is-invalid.focus ~ .custom-file-control, |
| 16 | + .b-form-file.custom-file .custom-file-input.is-invalid:focus ~ .custom-file-control, |
| 17 | + .was-validated .b-form-file.custom-file .custom-file-input:invalid.focus ~ .custom-file-control, |
| 18 | + .was-validated .b-form-file.custom-file .custom-file-input:invalid:focus ~ .custom-file-control { |
17 | 19 | box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
|
18 | 20 | border-color: #dc3545;
|
19 | 21 | }
|
20 | 22 | /* valid focus styling */
|
21 |
| - .custom-file-input.is-valid.focus ~ .custom-file-control, |
22 |
| - .custom-file-input.is-valid:focus ~ .custom-file-control, |
23 |
| - .was-validated .custom-file-input:valid.focus ~ .custom-file-control, |
24 |
| - .was-validated .custom-file-input:valid:focus ~ .custom-file-control { |
| 23 | + .b-form-file.custom-file .custom-file-input.is-valid.focus ~ .custom-file-control, |
| 24 | + .b-form-file.custom-file .custom-file-input.is-valid:focus ~ .custom-file-control, |
| 25 | + .was-validated .b-form-file.custom-file .custom-file-input:valid.focus ~ .custom-file-control, |
| 26 | + .was-validated .b-form-file.custom-file .custom-file-input:valid:focus ~ .custom-file-control { |
25 | 27 | box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
|
26 | 28 | border-color: #28a745;
|
27 | 29 | }
|
28 | 30 |
|
29 | 31 | /* Drag/Drop and filenames/prompts handling */
|
30 |
| - .custom-file-control { |
| 32 | + .b-form-file.custom-file .custom-file-control { |
31 | 33 | overflow: hidden;
|
32 | 34 | }
|
33 |
| - .custom-file-control { |
| 35 | + .b-form-file.custom-file .custom-file-control { |
34 | 36 | overflow: hidden;
|
35 | 37 | }
|
36 |
| - .custom-file-control.dragging { |
| 38 | + .b-form-file.custom-file .custom-file-control.dragging { |
37 | 39 | overflow: hidden;
|
38 | 40 | filter: blur(3px);
|
39 | 41 | }
|
40 |
| - .custom-file-control[data-selected]::after { |
| 42 | + .b-form-file.custom-file .custom-file-control[data-selected]::after { |
41 | 43 | content: attr(data-selected);
|
42 | 44 | }
|
43 |
| - .custom-file-control[data-choose]::before { |
| 45 | + .b-form-file.custom-file .custom-file-control[data-choose]::before { |
44 | 46 | content: attr(data-choose);
|
45 | 47 | }
|
46 |
| - .custom-file .drop-here { |
| 48 | + .b-form-file.custom-file .drop-here { |
47 | 49 | position: absolute;
|
48 | 50 | left: 0;
|
49 | 51 | right: 0;
|
|
56 | 58 | justify-content: center;
|
57 | 59 | align-items: center;
|
58 | 60 | }
|
59 |
| - .custom-file .drop-here::before { |
| 61 | + .b-form-file.custom-file .drop-here::before { |
60 | 62 | color: white;
|
61 | 63 | content: attr(data-drop);
|
62 | 64 | }
|
|
134 | 136 |
|
135 | 137 | // Return rendered custom file input
|
136 | 138 | return h(
|
137 |
| - 'div', |
| 139 | + 'label', |
138 | 140 | {
|
139 |
| - class: [ 'custom-file', 'w-100', t.stateClass ], |
| 141 | + class: [ 'custom-file', 'b-form-file', 'w-100', t.stateClass ], |
140 | 142 | attrs: { id: t.safeId('_BV_file_outer_') },
|
141 | 143 | on: { dragover: t.dragover }
|
142 | 144 | },
|
|
0 commit comments