Skip to content

Commit

Permalink
fix: #478 improve touch interaction styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaUnknown committed Jul 11, 2024
1 parent 76f3140 commit 806633f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions common/components/cards/SmallCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
.first-check:first-child :global(.absolute-container) {
left: -48% !important
}
.first-check:hover {
z-index: 30;
/* fixes transform scaling on click causing z-index issues */
}
.title {
display: -webkit-box;
-webkit-line-clamp: 2;
Expand Down
9 changes: 9 additions & 0 deletions common/css.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
}
}

* {
-webkit-tap-highlight-color: transparent;
}

a[href]:active, button:not([disabled]):active, fieldset:not([disabled]):active, input:not([disabled]):active, optgroup:not([disabled]):active, option:not([disabled]):active, select:not([disabled]):active, textarea:not([disabled]):active, details:active, [tabindex]:not([tabindex="-1"]):active, [contenteditable]:active, [controls]:active {
transition: transform 0.1s ease-in-out;
transform: scale(0.95);
}

.btn-secondary {
--dm-button-secondary-bg-color: #fff !important;
--dm-button-secondary-bg-color-hover: #ddd !important;
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/components/PreviewCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}
</script>

<div class='position-absolute w-350 h-400 absolute-container top-0 bottom-0 m-auto bg-dark-light z-30 rounded overflow-hidden pointer'>
<div class='position-absolute w-350 h-400 absolute-container top-0 bottom-0 m-auto bg-dark-light rounded overflow-hidden pointer'>
<div class='banner position-relative bg-black'>
<img src={media.bannerImage || ' '} alt='banner' class='img-cover w-full h-full' loading='lazy' />
{#if media.trailer?.id}
Expand Down

0 comments on commit 806633f

Please sign in to comment.