| 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: #cc0000 !important; |
| 13 |
box-shadow: 0 0 0 1px #cc0000; |
| 14 |
} |
| 15 |
|
| 16 |
/* Adjust positioning of labels in relation to checkboxes/radio buttons */ |
| 17 |
#tablepress_import-import-form .column-2 label { |
| 18 |
margin-right: 24px; /* some margin on radio buttons */ |
| 19 |
} |
| 20 |
|
| 21 |
.file-upload-area { |
| 22 |
width: 100%; |
| 23 |
position: relative; |
| 24 |
|
| 25 |
.dropzone { |
| 26 |
background-color: #f5f5f5; |
| 27 |
border: 2px dashed #ddd; |
| 28 |
border-radius: 4px; |
| 29 |
font-size: 18px; |
| 30 |
box-sizing: border-box; |
| 31 |
padding: 20px; |
| 32 |
margin-bottom: 10px; |
| 33 |
transition: background 0.3s ease-in-out; |
| 34 |
width: 100%; |
| 35 |
min-height: 180px; |
| 36 |
display: flex; |
| 37 |
flex-direction: column; |
| 38 |
align-items: center; |
| 39 |
justify-content: center; |
| 40 |
text-align: center; |
| 41 |
|
| 42 |
/* Print selected file names in italics. */ |
| 43 |
span ~ span { |
| 44 |
font-style: italic; |
| 45 |
} |
| 46 |
} |
| 47 |
|
| 48 |
&:hover .dropzone { |
| 49 |
border: 2px dashed #cccccc; |
| 50 |
background: #ffffff; |
| 51 |
} |
| 52 |
|
| 53 |
.js & #tables-import-file-upload { |
| 54 |
position: absolute; |
| 55 |
width: 100%; |
| 56 |
height: 100%; |
| 57 |
top: 0; |
| 58 |
left: 0; |
| 59 |
right: 0; |
| 60 |
bottom: 0; |
| 61 |
opacity: 0; |
| 62 |
cursor: pointer; |
| 63 |
border: 1px solid transparent; |
| 64 |
border-radius: 4px; |
| 65 |
|
| 66 |
&:valid + .dropzone, |
| 67 |
+ .dropzone.dragover { |
| 68 |
border-color: rgba(0, 255, 0, 0.4); |
| 69 |
background-color: rgba(0, 255, 0, 0.1); |
| 70 |
} |
| 71 |
|
| 72 |
/* :focus style after :valid style to allow for both. */ |
| 73 |
&:focus + .dropzone { |
| 74 |
border-color: #2271b1; |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
.postbox:not(.no-validation-highlighting) & #tables-import-file-upload:invalid + .dropzone { |
| 79 |
border-color: #cc0000; |
| 80 |
} |
| 81 |
} |
| 82 |
|
| 83 |
/* Style the artificial dropdown like a WP Core select field. */ |
| 84 |
.jdropdown { |
| 85 |
width: 100%; |
| 86 |
|
| 87 |
/* Show the dropdown above WP Core UI elements on small screens (< 800px width). */ |
| 88 |
&.jdropdown-searchbar.jdropdown-focus { |
| 89 |
z-index: 100000; |
| 90 |
} |
| 91 |
|
| 92 |
.jdropdown-header { |
| 93 |
/* stylelint-disable-next-line function-url-quotes */ |
| 94 |
background: #ffffff url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 5px top 55%; |
| 95 |
background-size: 16px 16px; |
| 96 |
padding: 0 24px 0 8px; |
| 97 |
border-color: #8c8f94; |
| 98 |
border-radius: 3px; |
| 99 |
|
| 100 |
&:hover, |
| 101 |
&:hover::placeholder { |
| 102 |
color: #2271b1; |
| 103 |
} |
| 104 |
|
| 105 |
&:focus { |
| 106 |
border-color: #2271b1; |
| 107 |
color: #0a4b78; |
| 108 |
box-shadow: 0 0 0 1px #2271b1; |
| 109 |
} |
| 110 |
|
| 111 |
&:focus::placeholder { |
| 112 |
color: #0a4b78; |
| 113 |
} |
| 114 |
|
| 115 |
&:active { |
| 116 |
border-color: #8c8f94; |
| 117 |
box-shadow: none; |
| 118 |
} |
| 119 |
} |
| 120 |
|
| 121 |
/* Prevent overflowing of the expanded list of options. */ |
| 122 |
.jdropdown-container { |
| 123 |
max-width: 100%; |
| 124 |
} |
| 125 |
|
| 126 |
/* Style the disabled state via a class, as the artificial dropdown can not use :disabled. */ |
| 127 |
&.disabled { |
| 128 |
pointer-events: none; |
| 129 |
|
| 130 |
.jdropdown-header { |
| 131 |
color: #a7aaad; |
| 132 |
border-color: #dcdcde; |
| 133 |
background-color: #f6f7f7; |
| 134 |
/* The SVG is arrow-down-alt2 from Dashicons. */ |
| 135 |
/* stylelint-disable-next-line function-url-quotes */ |
| 136 |
background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23a0a5aa%22%2F%3E%3C%2Fsvg%3E"); |
| 137 |
box-shadow: none; |
| 138 |
text-shadow: 0 1px 0 #ffffff; |
| 139 |
cursor: default; |
| 140 |
transform: none; |
| 141 |
|
| 142 |
&::placeholder { |
| 143 |
color: #a7aaad; |
| 144 |
} |
| 145 |
} |
| 146 |
} |
| 147 |
} |
| 148 |
|