aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/sass/primeng-custom.scss
diff options
context:
space:
mode:
authorKim <1877318+kimsible@users.noreply.github.com>2020-05-01 10:45:07 +0200
committerGitHub <noreply@github.com>2020-05-01 10:45:07 +0200
commit165ee2929bc76fc7f9985ae81cc33736820c7865 (patch)
treeaf89ec858c1a2177c36eef3bc12726eab2722ff1 /client/src/sass/primeng-custom.scss
parent7a03209d28f3f31d706dee08ae487d2ca1926893 (diff)
downloadPeerTube-165ee2929bc76fc7f9985ae81cc33736820c7865.tar.gz
PeerTube-165ee2929bc76fc7f9985ae81cc33736820c7865.tar.zst
PeerTube-165ee2929bc76fc7f9985ae81cc33736820c7865.zip
Fix tables width, paginators, button on mobile / touchscreens (#2695)
Diffstat (limited to 'client/src/sass/primeng-custom.scss')
-rw-r--r--client/src/sass/primeng-custom.scss45
1 files changed, 39 insertions, 6 deletions
diff --git a/client/src/sass/primeng-custom.scss b/client/src/sass/primeng-custom.scss
index 8444f9357..b8e685aba 100644
--- a/client/src/sass/primeng-custom.scss
+++ b/client/src/sass/primeng-custom.scss
@@ -80,7 +80,7 @@ p-table {
80 my-edit-button, 80 my-edit-button,
81 my-delete-button, 81 my-delete-button,
82 my-button { 82 my-button {
83 display: block !important; 83 display: inline-block !important;
84 } 84 }
85 } 85 }
86 } 86 }
@@ -160,14 +160,20 @@ p-table {
160 my-delete-button, 160 my-delete-button,
161 my-button { 161 my-button {
162 display: none !important; 162 display: none !important;
163 margin-left: 5px;
163 164
164 &.show { 165 &.show {
165 display: block !important; 166 display: inline-block !important;
166 } 167 }
167 }
168 168
169 my-edit-button + my-delete-button { 169 // keep displaying on touchscreen
170 margin-left: 5px; 170 @media not all and (hover: hover) and (pointer: fine) {
171 display: inline-block !important;
172 }
173
174 :first-child {
175 margin-left: 0
176 }
171 } 177 }
172 } 178 }
173 179
@@ -241,7 +247,7 @@ p-table {
241 &.focus-within, 247 &.focus-within,
242 &:focus { 248 &:focus {
243 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest) !important; 249 box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest) !important;
244 } 250 }
245 } 251 }
246 252
247 a { 253 a {
@@ -266,6 +272,33 @@ p-table {
266 } 272 }
267} 273}
268 274
275// overflow data table
276@mixin overflow-datatable ($table-min-width, $horizontal-margins) {
277 p-table {
278 .ui-table-wrapper {
279 overflow-x: auto;
280 max-width: calc(100vw - #{$horizontal-margins * 2});
281
282 table {
283 min-width: $table-min-width;
284 }
285 }
286
287 p-paginator .ui-paginator-bottom {
288 display: block;
289
290 .ui-paginator-current {
291 position: relative;
292 display: block;
293 }
294
295 a, .ui-paginator-pages {
296 vertical-align: middle;
297 }
298 }
299 }
300}
301
269// multiselect customizations 302// multiselect customizations
270p-multiselect { 303p-multiselect {
271 .ui-multiselect { 304 .ui-multiselect {