| 1 |
/** |
| 2 |
* CSS code for the "Import" screen. |
| 3 |
* |
| 4 |
* @package TablePress |
| 5 |
* @subpackage Views CSS |
| 6 |
* @author Tobias Bäthge |
| 7 |
* @since 1.0.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
/* Red border for form fields that have invalid values */ |
| 11 |
#tablepress-page form .postbox:not(.no-validation-highlighting) :invalid { |
| 12 |
border-color: #d63638 !important; |
| 13 |
box-shadow: 0 0 0 1px #d63638; |
| 14 |
} |
| 15 |
|
| 16 |
#tablepress_import-import-form { |
| 17 |
/* Show RadioButtons next to each other (by default the component uses VStack). */ |
| 18 |
.components-radio-control__group-wrapper, |
| 19 |
.components-radio-control > div > .components-v-stack { /* WP < 6.7 */ |
| 20 |
flex-direction: row; |
| 21 |
justify-content: flex-start; |
| 22 |
gap: 20px; |
| 23 |
} |
| 24 |
|
| 25 |
/* ComboboxControl can only be disabled artificially. */ |
| 26 |
.components-disabled .components-combobox-control { |
| 27 |
opacity: 0.7; |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
.file-upload-area { |
| 32 |
width: 100%; |
| 33 |
position: relative; |
| 34 |
margin-bottom: -8px; |
| 35 |
|
| 36 |
.dropzone { |
| 37 |
background-color: #f5f5f5; |
| 38 |
border: 2px dashed #ddd; |
| 39 |
border-radius: 2px; |
| 40 |
font-size: 18px; |
| 41 |
box-sizing: border-box; |
| 42 |
padding: 20px; |
| 43 |
margin-bottom: 10px; |
| 44 |
transition: background-color 0.3s ease-in-out; |
| 45 |
width: 100%; |
| 46 |
min-height: 180px; |
| 47 |
display: flex; |
| 48 |
flex-direction: column; |
| 49 |
align-items: center; |
| 50 |
justify-content: center; |
| 51 |
text-align: center; |
| 52 |
|
| 53 |
/* Print selected file names in italics. */ |
| 54 |
span ~ span { |
| 55 |
font-style: italic; |
| 56 |
} |
| 57 |
} |
| 58 |
|
| 59 |
&:hover .dropzone { |
| 60 |
border: 2px dashed #cccccc; |
| 61 |
background: #ffffff; |
| 62 |
} |
| 63 |
|
| 64 |
#tables-import-file-upload { |
| 65 |
position: absolute; |
| 66 |
width: 100%; |
| 67 |
height: 100%; |
| 68 |
top: 0; |
| 69 |
left: 0; |
| 70 |
right: 0; |
| 71 |
bottom: 0; |
| 72 |
opacity: 0; |
| 73 |
cursor: pointer; |
| 74 |
border: 1px solid transparent; |
| 75 |
border-radius: 2px; |
| 76 |
|
| 77 |
&:valid + .dropzone, |
| 78 |
+ .dropzone.dragover { |
| 79 |
border-color: rgba(0, 255, 0, 0.4); |
| 80 |
background-color: rgba(0, 255, 0, 0.1); |
| 81 |
} |
| 82 |
|
| 83 |
/* :focus style after :valid style to allow for both. */ |
| 84 |
&:focus + .dropzone { |
| 85 |
border-color: var(--wp-admin-theme-color); |
| 86 |
outline: 2px solid #00000000; |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
.postbox:not(.no-validation-highlighting) & #tables-import-file-upload:invalid + .dropzone { |
| 91 |
border-color: #d63638; |
| 92 |
} |
| 93 |
} |
| 94 |
|