|
| 1 | +a:has(svg) { |
| 2 | + /* prettier-ignore */ |
| 3 | + --ease-spring-lazy: linear(0, 0.008 1.1%, 0.034 2.3%, 0.134 4.9%, 0.264 7.3%, 0.683 14.3%, 0.797 16.5%, 0.89 18.6%, 0.967 20.7%, 1.027 22.8%, 1.073 25%, 1.104 27.3%, 1.123 30.6%, 1.119 34.3%, 1.018 49.5%, 0.988 58.6%, 0.985 65.2%, 1 84.5%, 1); |
| 4 | + /* prettier-ignore */ |
| 5 | + --ease-spring-glide: linear(0, 0.012 0.9%, 0.05 2%, 0.411 9.2%, 0.517 11.8%, 0.611 14.6%, 0.694 17.7%, 0.765 21.1%, 0.824 24.8%, 0.872 28.9%, 0.91 33.4%, 0.939 38.4%, 0.977 50.9%, 0.994 68.4%, 1); |
| 6 | + --path-fill-color: white; |
| 7 | + --path-stroke-color: var(--bs-secondary); |
| 8 | + --sp2: 4px; |
| 9 | + |
| 10 | + display: flex; |
| 11 | + gap: var(--sp2); |
| 12 | + text-decoration: none; |
| 13 | + |
| 14 | + svg { |
| 15 | + /* Comment */ |
| 16 | + g.comment { |
| 17 | + path { |
| 18 | + transform-origin: bottom left; |
| 19 | + stroke-width: 1.5px; |
| 20 | + transition: stroke 200ms var(--ease-spring-glide); |
| 21 | + } |
| 22 | + } |
| 23 | + |
| 24 | + /* Reply */ |
| 25 | + g.reply { |
| 26 | + path { |
| 27 | + transform-origin: center right; |
| 28 | + stroke-width: 1.5px; |
| 29 | + transition: stroke 200ms var(--ease-spring-glide); |
| 30 | + } |
| 31 | + } |
| 32 | + |
| 33 | + /* Thumbs up */ |
| 34 | + g.thumbs-up { |
| 35 | + path { |
| 36 | + stroke-width: 1.5px; |
| 37 | + stroke: var(--bs-secondary); |
| 38 | + } |
| 39 | + |
| 40 | + path:first-of-type { |
| 41 | + transform-origin: center left; |
| 42 | + transition: fill 200ms var(--ease-spring-glide); |
| 43 | + } |
| 44 | + } |
| 45 | + } |
| 46 | + |
| 47 | + /* Hover on <a> */ |
| 48 | + &:hover { |
| 49 | + /* Comment hover */ |
| 50 | + g.comment { |
| 51 | + path { |
| 52 | + animation: pop 400ms var(--ease-spring-lazy); |
| 53 | + transition: fill 200ms 300ms var(--ease-spring-lazy); |
| 54 | + fill: var(--bs-primary); |
| 55 | + stroke: var(--bs-secondary); |
| 56 | + } |
| 57 | + } |
| 58 | + |
| 59 | + /* Reply hover */ |
| 60 | + g.reply { |
| 61 | + path { |
| 62 | + animation: stretchX 400ms var(--ease-spring-lazy); |
| 63 | + transition: fill 200ms 300ms var(--ease-spring-lazy); |
| 64 | + fill: var(--bs-primary); |
| 65 | + stroke: var(--bs-secondary); |
| 66 | + } |
| 67 | + } |
| 68 | + |
| 69 | + /* Thumbs-up hover */ |
| 70 | + g.thumbs-up { |
| 71 | + path:last-child { |
| 72 | + transition: fill 200ms 200ms var(--ease-spring-lazy); |
| 73 | + fill: var(--bs-primary); |
| 74 | + } |
| 75 | + path:first-of-type { |
| 76 | + transform: rotate(-3deg); |
| 77 | + transition: transform 200ms var(--ease-spring-lazy); |
| 78 | + } |
| 79 | + } |
| 80 | + } |
| 81 | +} |
| 82 | + |
| 83 | +/* Click on <a> with thumbs-up svg */ |
| 84 | +.liked a:has(svg) { |
| 85 | + g.thumbs-up { |
| 86 | + path:first-of-type { |
| 87 | + animation: rotatePop 500ms var(--ease-spring-lazy); |
| 88 | + } |
| 89 | + path:last-child { |
| 90 | + fill: var(--bs-primary); |
| 91 | + } |
| 92 | + } |
| 93 | +} |
| 94 | + |
| 95 | +/* Thumbs-up already set*/ |
| 96 | +.action-unflag a:has(svg) { |
| 97 | + g.thumbs-up { |
| 98 | + path:last-child { |
| 99 | + fill: var(--bs-primary); |
| 100 | + } |
| 101 | + } |
| 102 | +} |
0 commit comments