Skip to content

Commit f81fdb8

Browse files
committed
Revert "chore(util): add a utility function to create an interactive 3D effect"
This reverts commit 1f0f1d8.
1 parent 0d2c364 commit f81fdb8

File tree

2 files changed

+0
-246
lines changed

2 files changed

+0
-246
lines changed

src/style/mixins.scss

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -456,98 +456,3 @@ $clickable-normal-state-transitions: (
456456
clip-path: inset(50%);
457457
white-space: nowrap;
458458
}
459-
460-
// This mixin designed to enhance the visual effects,
461-
// when the `tiltFollowingTheCursor` utility function from `3d-tilt-hover-effect.ts`
462-
// is implemented in a component.
463-
// This adds styles to a `<div class"limel-3d-hover-effect-glow" />`, needed to create
464-
// a glow effect on a 3D element when the parent element is hovered.
465-
// when the `tiltFollowingTheCursor` utility function from `3d-tilt-hover-effect.ts`
466-
// Parts of these styles are controlled by the `titleFollowingTheCursor` function.
467-
@mixin limel-3d-hover-effect-glow($the3dElement, $border-radius) {
468-
.limel-3d-hover-effect-glow {
469-
transition:
470-
background 0.4s ease,
471-
opacity 0.4s ease;
472-
pointer-events: none;
473-
474-
position: absolute;
475-
inset: 0;
476-
border-radius: $border-radius;
477-
478-
opacity: 0.1;
479-
#{$the3dElement}:hover & {
480-
opacity: 0.5;
481-
}
482-
483-
background-image: radial-gradient(
484-
circle at var(--limel-3d-hover-effect-glow-position, 50% -20%),
485-
rgb(var(--color-white), 0.3),
486-
rgb(var(--color-white), 0)
487-
);
488-
489-
mix-blend-mode: plus-lighter;
490-
}
491-
}
492-
493-
// These mixins below are designed to apply the necessary visual effects,
494-
// when the `tiltFollowingTheCursor` utility function from `3d-tilt-hover-effect.ts`
495-
// is implemented in a component.
496-
@mixin parent-of-the-3d-element {
497-
isolation: isolate;
498-
transform-style: preserve-3d;
499-
perspective: 1000px;
500-
}
501-
502-
@mixin the-3d-element {
503-
position: relative;
504-
505-
transition-duration: 0.8s;
506-
transition-property: transform, box-shadow, background-color;
507-
transition-timing-function: ease-out;
508-
transform: scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);
509-
510-
&:hover,
511-
&:focus,
512-
&:focus-visible,
513-
&:focus-within {
514-
will-change: background-color, box-shadow, transform;
515-
}
516-
517-
&:hover,
518-
&:focus,
519-
&:focus-visible,
520-
&:active {
521-
transition-duration: 0.2s;
522-
}
523-
524-
&:hover,
525-
&:focus-visible {
526-
box-shadow: var(--button-shadow-hovered);
527-
}
528-
529-
&:hover {
530-
transform: scale3d(1.01, 1.01, 1.01)
531-
rotate3d(var(--limel-3d-hover-effect-rotate3d));
532-
}
533-
&:focus-visible {
534-
transform: scale3d(1.01, 1.01, 1.01);
535-
}
536-
}
537-
538-
@mixin the-3d-element--clickable {
539-
cursor: pointer;
540-
box-shadow: var(--button-shadow-normal);
541-
542-
&:active {
543-
transform: scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);
544-
box-shadow: var(--button-shadow-pressed);
545-
}
546-
547-
&:focus-visible {
548-
box-shadow: var(--button-shadow-hovered), var(--shadow-depth-8-focused);
549-
}
550-
&:focus-visible:active {
551-
box-shadow: var(--button-shadow-pressed), var(--shadow-depth-8-focused);
552-
}
553-
}

src/util/3d-tilt-hover-effect.ts

Lines changed: 0 additions & 151 deletions
This file was deleted.

0 commit comments

Comments
 (0)