🔥 Huge style refactoring by using SvelteKit built-in style tag
It's been tricky but got there finally! Hello `:global` - Avoid using one global CSS file containing everything - Import the component SCSS file in a script tag from the component file to allow style scoping and including it only when used
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
}
|
||||
|
||||
// Poster image
|
||||
img {
|
||||
:global(img) {
|
||||
pointer-events: auto;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
@@ -49,7 +49,7 @@
|
||||
transition: transform 0.8s var(--ease-quart);
|
||||
}
|
||||
|
||||
& > * {
|
||||
& > :global(*) {
|
||||
background: none;
|
||||
font-size: rem(14px);
|
||||
font-weight: 300;
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
// Hover effect
|
||||
&:hover {
|
||||
img {
|
||||
:global(img) {
|
||||
@include bp (md) {
|
||||
transform: scale(0.8) translate3d(0, -5%, 0);
|
||||
border-radius: 8px;
|
||||
|
||||
Reference in New Issue
Block a user