|
15 | 15 | // margin-right: 21px; |
16 | 16 | color: #e4e4e6; |
17 | 17 | background: #343e4d; |
| 18 | + // background: var(--cider-surface-border); |
| 19 | + // color: var(--cider-text-color); |
18 | 20 | border-radius: 10px; |
19 | 21 | border-width: 0; |
20 | 22 |
|
|
23 | 25 | } |
24 | 26 |
|
25 | 27 | &.project-button { |
| 28 | + position: relative; // Ensure absolute children are relative to this button |
| 29 | + overflow: hidden; // Ensure bubbles don't spill out |
26 | 30 | animation: gradient 5s ease infinite; |
27 | 31 |
|
28 | 32 | &::after, |
|
49 | 53 | animation: liquid 10s linear infinite; |
50 | 54 | } |
51 | 55 |
|
| 56 | + .project-label { |
| 57 | + position: relative; |
| 58 | + z-index: 10; |
| 59 | + } |
| 60 | + |
| 61 | + .bubbles-container { |
| 62 | + position: absolute; |
| 63 | + top: 0; |
| 64 | + left: 0; |
| 65 | + width: 100%; |
| 66 | + height: 100%; |
| 67 | + overflow: hidden; |
| 68 | + pointer-events: none; |
| 69 | + border-radius: 10px; // Match button radius |
| 70 | + // z-index: 5; // Removed to let it sit between ::before and ::after naturally |
| 71 | + // Button background is on main element. |
| 72 | + // ::before/::after are pseudo elements. |
| 73 | + // If ::before/after z-index is auto (0), then bubbles (z-index 5) will be ON TOP of liquid? |
| 74 | + // The liquid pseudo elements are at z-index auto in same stacking context. |
| 75 | + // If they appear after content in DOM (pseudo elements are children), they might sit on top if z-index is same. |
| 76 | + // But specifically: |
| 77 | + // Stacking order: |
| 78 | + // 1. Background/Borders of root element |
| 79 | + // 2. Negative z-index children |
| 80 | + // 3. Block level non-positioned children |
| 81 | + // 4. Floats |
| 82 | + // 5. Inline non-positioned children |
| 83 | + // 6. z-index: auto or 0 positioned children (including pseudo elements if positioned) |
| 84 | + // 7. Positive z-index children |
| 85 | + |
| 86 | + // If bubbles are z-index: 5, they will be ABOVE z-index: auto pseudo elements. |
| 87 | + // Depending on the desired effect: |
| 88 | + // If "liquid" is the pseudo-elements, bubbles should be inside/below them? |
| 89 | + // But the pseudo elements rotate and cover existing background. |
| 90 | + // If bubbles are *under* the pseudo elements, they might be obscured by the semi-transparent dark liquid. |
| 91 | + // This gives a "deep" look. |
| 92 | + // If they are on top, they look like they are on the surface or in front of the turbulence. |
| 93 | + // I think z-index 0 or 1 might be safer to be under the text (10). |
| 94 | + // Let's try z-index: 0 for bubbles container. |
| 95 | + // And since it's positioned absolute, it competes with pseudo elements (also positioned absolute). |
| 96 | + // If both are z-index 0/auto, DOM order matters. |
| 97 | + // Pseudo elements usually come *before* or *after* content. `::before` is before, `::after` is after. |
| 98 | + // So order: `::before` -> content -> `::after`. |
| 99 | + // So bubbles will be above `::before` but below `::after`? |
| 100 | + // This puts them "sandwiched" which creates a nice depth effect naturally! |
| 101 | + } |
| 102 | + |
| 103 | + .bubble { |
| 104 | + position: absolute; |
| 105 | + bottom: -20px; |
| 106 | + background: rgba(255, 255, 255, 0.4); // Increased opacity for visibility |
| 107 | + border-radius: 50%; |
| 108 | + z-index: 1; // Try to force it above background layers slightly |
| 109 | + z-index: 1; // Try to force it above background layers slightly |
| 110 | + pointer-events: none; |
| 111 | + animation-name: rise; |
| 112 | + animation-timing-function: ease-in; |
| 113 | + animation-iteration-count: infinite; |
| 114 | + |
| 115 | + |
| 116 | + } |
| 117 | + |
52 | 118 | &:hover::after, |
53 | 119 | &:hover::before { |
54 | 120 | top: -50px; |
|
81 | 147 | } |
82 | 148 | } |
83 | 149 |
|
| 150 | +@keyframes rise { |
| 151 | + 0% { |
| 152 | + bottom: -10px; |
| 153 | + transform: translateX(0) scale(1); |
| 154 | + opacity: 0; |
| 155 | + } |
| 156 | + |
| 157 | + 50% { |
| 158 | + opacity: 1; |
| 159 | + transform: translateX(-5px) scale(1); |
| 160 | + } |
| 161 | + |
| 162 | + 75% { |
| 163 | + transform: translateX(-8px) scale(1); |
| 164 | + } |
| 165 | + |
| 166 | + 100% { |
| 167 | + bottom: 110%; |
| 168 | + transform: translateX(-10px) scale(0); |
| 169 | + opacity: 0; |
| 170 | + } |
| 171 | +} |
| 172 | + |
84 | 173 | :host ::ng-deep app-page-header .p-card { |
85 | 174 | margin-left: 0; |
86 | 175 | } |
|
0 commit comments