|
111 | 111 | } |
112 | 112 | } |
113 | 113 |
|
114 | | -.bottom-sticker, |
115 | | -#bottom-sticker { |
116 | | - position: sticky; |
117 | | - |
118 | | - // This has to be set to -1px so that IntersectionObserver can add the |
119 | | - // &--stuck class when the element is stuck to the bottom of the screen |
120 | | - // https://css-tricks.com/how-to-detect-when-a-sticky-element-gets-pinned/ |
121 | | - bottom: -1px; |
122 | | - margin-left: calc(var(--section-padding) * -1); |
123 | | - width: calc( |
124 | | - 100% + calc(var(--section-padding) * 2) |
125 | | - ); /* it needs to occupy the entire width or else the underlying content will see through */ |
| 114 | +$bottom-app-bar-padding: 0.875rem; |
126 | 115 |
|
127 | | - z-index: 998; /* behind top-sticker */ |
128 | | -} |
129 | | - |
130 | | -.bottom-sticker-inner { |
131 | | - position: relative; |
132 | | - padding: 1em var(--section-padding); |
133 | | - z-index: 0; |
| 116 | +.jenkins-bottom-app-bar__shadow { |
| 117 | + --semi-translucent: color-mix(in sRGB, var(--background) 75%, transparent); |
134 | 118 |
|
135 | | - &::before { |
136 | | - content: ""; |
137 | | - position: absolute; |
138 | | - inset: 0; |
139 | | - background: var(--background); |
140 | | - opacity: 0; |
141 | | - z-index: -1; |
142 | | - } |
| 119 | + position: sticky; |
| 120 | + height: calc( |
| 121 | + 2.375rem + ($bottom-app-bar-padding * 2) + 1px + var(--jenkins-border-width) |
| 122 | + ); |
| 123 | + bottom: -1px; |
| 124 | + margin-bottom: calc((2.375rem + $bottom-app-bar-padding) * -1); |
| 125 | + backdrop-filter: blur(20px); |
| 126 | + background: linear-gradient( |
| 127 | + to right, |
| 128 | + var(--background), |
| 129 | + var(--semi-translucent) 3rem, |
| 130 | + var(--semi-translucent) calc(100% - 3rem), |
| 131 | + var(--background) |
| 132 | + ); |
| 133 | + border-top: var(--jenkins-border-width) solid var(--jenkins-border-color); |
| 134 | + z-index: 997; |
143 | 135 |
|
144 | 136 | &::after { |
145 | 137 | content: ""; |
146 | 138 | position: absolute; |
147 | | - top: -30px; |
148 | 139 | left: 0; |
149 | 140 | right: 0; |
150 | | - background: linear-gradient(transparent, var(--bottom-app-bar-shadow) 110%); |
151 | | - max-width: 100%; |
152 | | - height: 30px; |
153 | | - opacity: 0; |
154 | | - transition: var(--standard-transition); |
| 141 | + transition: opacity var(--standard-transition); |
| 142 | + top: calc((2rem + var(--jenkins-border-width)) * -1); |
| 143 | + height: 2rem; |
| 144 | + pointer-events: none; |
| 145 | + background: linear-gradient(transparent, var(--bottom-app-bar-shadow)); |
155 | 146 | mask-image: linear-gradient( |
156 | 147 | to right, |
157 | 148 | transparent, |
158 | 149 | white var(--section-padding), |
159 | 150 | white calc(100% - var(--section-padding)), |
160 | 151 | transparent |
161 | 152 | ); |
162 | | - pointer-events: none; |
| 153 | + opacity: 0; |
163 | 154 | } |
164 | 155 |
|
165 | 156 | &--stuck { |
166 | | - .bottom-sticker-inner { |
167 | | - backdrop-filter: blur(15px); |
168 | | - |
169 | | - &::before { |
170 | | - opacity: 0.75 !important; |
171 | | - |
172 | | - @supports not (backdrop-filter: blur(15px)) { |
173 | | - opacity: 1 !important; |
174 | | - } |
175 | | - } |
176 | | - |
177 | | - &::after { |
178 | | - opacity: 1 !important; |
179 | | - } |
| 157 | + &::after { |
| 158 | + opacity: 1 !important; |
180 | 159 | } |
181 | 160 | } |
182 | 161 | } |
| 162 | + |
| 163 | +.bottom-sticker, |
| 164 | +#bottom-sticker { |
| 165 | + position: sticky; |
| 166 | + bottom: 0; |
| 167 | + z-index: 998; |
| 168 | +} |
| 169 | + |
| 170 | +.bottom-sticker-inner { |
| 171 | + position: relative; |
| 172 | + padding: $bottom-app-bar-padding 0; |
| 173 | +} |
0 commit comments