Progressive Blur Skill
Workflow
- Confirm placement (top or bottom), height, and z-index relative to UI.
- Provide the matching snippet and a short usage checklist.
- Offer only targeted tweaks (height, blur steps, direction, opacity stops).
Usage checklist
- Insert the HTML inside
<body>.
- Keep the
.gradient-blur element near the top of the DOM.
- Ensure the background behind it exists (backdrop-filter blurs what is behind).
- Adjust
z-index to sit above content but below modals.
Top blur (from top)
<div class="gradient-blur">
<div></div><div></div><div></div><div></div><div></div><div></div>
</div>
<style>
.gradient-blur {
position: fixed;
z-index: 5;
inset: 0 0 auto 0;
height: 12%;
pointer-events: none;
}
.gradient-blur > div,
.gradient-blur::before,
.gradient-blur::after {
position: absolute;
inset: 0;
}
.gradient-blur::before {
content: "";
z-index: 1;
backdrop-filter: blur(0.5px);
mask: linear-gradient(to top,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 1) 12.5%,
rgba(0, 0, 0, 1) 25%,
rgba(0, 0, 0, 0) 37.5%);
}
.gradient-blur > div:nth-of-type(1) {
z-index: 2;
backdrop-filter: blur(1px);
mask: linear-gradient(to top,
rgba(0, 0, 0, 0) 12.5%,
rgba(0, 0, 0, 1) 25%,
rgba(0, 0, 0, 1) 37.5%,
rgba(0, 0, 0, 0) 50%);
}
.gradient-blur > div:nth-of-type(2) {
z-index: 3;
backdrop-filter: blur(2px);
mask: linear-gradient(to top,
rgba(0, 0, 0, 0) 25%,
rgba(0, 0, 0, 1) 37.5%,
rgba(0, 0, 0, 1) 50%,
rgba(0, 0, 0, 0) 62.5%);
}
.gradient-blur > div:nth-of-type(3) {
z-index: 4;
backdrop-filter: blur(4px);
mask: linear-gradient(to top,
rgba(0, 0, 0, 0) 37.5%,
rgba(0, 0, 0, 1) 50%,
rgba(0, 0, 0, 1) 62.5%,
rgba(0, 0, 0, 0) 75%);
}
.gradient-blur > div:nth-of-type(4) {
z-index: 5;
backdrop-filter: blur(8px);
mask: linear-gradient(to top,
rgba(0, 0, 0, 0) 50%,
rgba(0, 0, 0, 1) 62.5%,
rgba(0, 0, 0, 1) 75%,
rgba(0, 0, 0, 0) 87.5%);
}
.gradient-blur > div:nth-of-type(5) {
z-index: 6;
backdrop-filter: blur(16px);
mask: linear-gradient(to top,
rgba(0, 0, 0, 0) 62.5%,
rgba(0, 0, 0, 1) 75%,
rgba(0, 0, 0, 1) 87.5%,
rgba(0, 0, 0, 0) 100%);
}
.gradient-blur > div:nth-of-type(6) {
z-index: 7;
backdrop-filter: blur(32px);
mask: linear-gradient(to top,
rgba(0, 0, 0, 0) 75%,
rgba(0, 0, 0, 1) 87.5%,
rgba(0, 0, 0, 1) 100%);
}
.gradient-blur::after {
content: "";
z-index: 8;
backdrop-filter: blur(64px);
mask: linear-gradient(to top,
rgba(0, 0, 0, 0) 87.5%,
rgba(0, 0, 0, 1) 100%);
}
</style>
Bottom blur (from bottom)
<div class="gradient-blur">
<div></div><div></div><div></div><div></div><div></div><div></div>
</div>
<style>
.gradient-blur {
position: fixed;
z-index: 5;
inset: auto 0 0 0;
height: 65%;
pointer-events: none;
}
.gradient-blur > div,
.gradient-blur::before,
.gradient-blur::after {
position: absolute;
inset: 0;
}
.gradient-blur::before {
content: "";
z-index: 1;
backdrop-filter: blur(0.5px);
mask: linear-gradient(to bottom,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 1) 12.5%,
rgba(0, 0, 0, 1) 25%,
rgba(0, 0, 0, 0) 37.5%);
}
.gradient-blur > div:nth-of-type(1) {
z-index: 2;
backdrop-filter: blur(1px);
mask: linear-gradient(to bottom,
rgba(0, 0, 0, 0) 12.5%,
rgba(0, 0, 0, 1) 25%,
rgba(0, 0, 0, 1) 37.5%,
rgba(0, 0, 0, 0) 50%);
}
.gradient-blur > div:nth-of-type(2) {
z-index: 3;
backdrop-filter: blur(2px);
mask: linear-gradient(to bottom,
rgba(0, 0, 0, 0) 25%,
rgba(0, 0, 0, 1) 37.5%,
rgba(0, 0, 0, 1) 50%,
rgba(0, 0, 0, 0) 62.5%);
}
.gradient-blur > div:nth-of-type(3) {
z-index: 4;
backdrop-filter: blur(4px);
mask: linear-gradient(to bottom,
rgba(0, 0, 0, 0) 37.5%,
rgba(0, 0, 0, 1) 50%,
rgba(0, 0, 0, 1) 62.5%,
rgba(0, 0, 0, 0) 75%);
}
.gradient-blur > div:nth-of-type(4) {
z-index: 5;
backdrop-filter: blur(8px);
mask: linear-gradient(to bottom,
rgba(0, 0, 0, 0) 50%,
rgba(0, 0, 0, 1) 62.5%,
rgba(0, 0, 0, 1) 75%,
rgba(0, 0, 0, 0) 87.5%);
}
.gradient-blur > div:nth-of-type(5) {
z-index: 6;
backdrop-filter: blur(16px);
mask: linear-gradient(to bottom,
rgba(0, 0, 0, 0) 62.5%,
rgba(0, 0, 0, 1) 75%,
rgba(0, 0, 0, 1) 87.5%,
rgba(0, 0, 0, 0) 100%);
}
.gradient-blur > div:nth-of-type(6) {
z-index: 7;
backdrop-filter: blur(32px);
mask: linear-gradient(to bottom,
rgba(0, 0, 0, 0) 75%,
rgba(0, 0, 0, 1) 87.5%,
rgba(0, 0, 0, 1) 100%);
}
.gradient-blur::after {
content: "";
z-index: 8;
backdrop-filter: blur(64px);
mask: linear-gradient(to bottom,
rgba(0, 0, 0, 0) 87.5%,
rgba(0, 0, 0, 1) 100%);
}
</style>
Customization knobs
- Direction: flip
to top ↔ to bottom.
- Height: adjust
.gradient-blur height percentage.
- Strength: change blur values (0.5px → 64px).
- Steps: add/remove layers to control smoothness.
Common pitfalls
backdrop-filter needs content behind it; it will not blur a flat background.
- High blur values are GPU-heavy; reduce steps on low-end devices.
- Ensure
pointer-events: none stays to avoid blocking clicks.
Questions to ask when specs are missing
- Should the blur start from the top or bottom?
- How tall should the blur area be?
- Is performance a concern on lower-end devices?
1---2name: progressive-blur3description: Create a layered CSS progressive blur (top or bottom) using multiple backdrop-filter masks for depth and softness. Use when asked for “progressive blur”, “gradient blur overlay”, or stepped blur masks that fade from an edge of the viewport.4metadata:5 source: https://skillmd.com/skills/mengto/progressive-blur6---78# Progressive Blur Skill910## Workflow111. Confirm placement (top or bottom), height, and z-index relative to UI.122. Provide the matching snippet and a short usage checklist.133. Offer only targeted tweaks (height, blur steps, direction, opacity stops).1415## Usage checklist16- Insert the HTML inside `<body>`.17- Keep the `.gradient-blur` element near the top of the DOM.18- Ensure the background behind it exists (backdrop-filter blurs what is behind).19- Adjust `z-index` to sit above content but below modals.2021## Top blur (from top)22```html23<div class="gradient-blur">24 <div></div><div></div><div></div><div></div><div></div><div></div>25</div>26<style>27 .gradient-blur {28 position: fixed;29 z-index: 5;30 inset: 0 0 auto 0;31 height: 12%;32 pointer-events: none;33 }3435 .gradient-blur > div,36 .gradient-blur::before,37 .gradient-blur::after {38 position: absolute;39 inset: 0;40 }4142 .gradient-blur::before {43 content: "";44 z-index: 1;45 backdrop-filter: blur(0.5px);46 mask: linear-gradient(to top,47 rgba(0, 0, 0, 0) 0%,48 rgba(0, 0, 0, 1) 12.5%,49 rgba(0, 0, 0, 1) 25%,50 rgba(0, 0, 0, 0) 37.5%);51 }5253 .gradient-blur > div:nth-of-type(1) {54 z-index: 2;55 backdrop-filter: blur(1px);56 mask: linear-gradient(to top,57 rgba(0, 0, 0, 0) 12.5%,58 rgba(0, 0, 0, 1) 25%,59 rgba(0, 0, 0, 1) 37.5%,60 rgba(0, 0, 0, 0) 50%);61 }6263 .gradient-blur > div:nth-of-type(2) {64 z-index: 3;65 backdrop-filter: blur(2px);66 mask: linear-gradient(to top,67 rgba(0, 0, 0, 0) 25%,68 rgba(0, 0, 0, 1) 37.5%,69 rgba(0, 0, 0, 1) 50%,70 rgba(0, 0, 0, 0) 62.5%);71 }7273 .gradient-blur > div:nth-of-type(3) {74 z-index: 4;75 backdrop-filter: blur(4px);76 mask: linear-gradient(to top,77 rgba(0, 0, 0, 0) 37.5%,78 rgba(0, 0, 0, 1) 50%,79 rgba(0, 0, 0, 1) 62.5%,80 rgba(0, 0, 0, 0) 75%);81 }8283 .gradient-blur > div:nth-of-type(4) {84 z-index: 5;85 backdrop-filter: blur(8px);86 mask: linear-gradient(to top,87 rgba(0, 0, 0, 0) 50%,88 rgba(0, 0, 0, 1) 62.5%,89 rgba(0, 0, 0, 1) 75%,90 rgba(0, 0, 0, 0) 87.5%);91 }9293 .gradient-blur > div:nth-of-type(5) {94 z-index: 6;95 backdrop-filter: blur(16px);96 mask: linear-gradient(to top,97 rgba(0, 0, 0, 0) 62.5%,98 rgba(0, 0, 0, 1) 75%,99 rgba(0, 0, 0, 1) 87.5%,100 rgba(0, 0, 0, 0) 100%);101 }102103 .gradient-blur > div:nth-of-type(6) {104 z-index: 7;105 backdrop-filter: blur(32px);106 mask: linear-gradient(to top,107 rgba(0, 0, 0, 0) 75%,108 rgba(0, 0, 0, 1) 87.5%,109 rgba(0, 0, 0, 1) 100%);110 }111112 .gradient-blur::after {113 content: "";114 z-index: 8;115 backdrop-filter: blur(64px);116 mask: linear-gradient(to top,117 rgba(0, 0, 0, 0) 87.5%,118 rgba(0, 0, 0, 1) 100%);119 }120</style>121```122123## Bottom blur (from bottom)124```html125<div class="gradient-blur">126 <div></div><div></div><div></div><div></div><div></div><div></div>127</div>128<style>129 .gradient-blur {130 position: fixed;131 z-index: 5;132 inset: auto 0 0 0;133 height: 65%;134 pointer-events: none;135 }136137 .gradient-blur > div,138 .gradient-blur::before,139 .gradient-blur::after {140 position: absolute;141 inset: 0;142 }143144 .gradient-blur::before {145 content: "";146 z-index: 1;147 backdrop-filter: blur(0.5px);148 mask: linear-gradient(to bottom,149 rgba(0, 0, 0, 0) 0%,150 rgba(0, 0, 0, 1) 12.5%,151 rgba(0, 0, 0, 1) 25%,152 rgba(0, 0, 0, 0) 37.5%);153 }154155 .gradient-blur > div:nth-of-type(1) {156 z-index: 2;157 backdrop-filter: blur(1px);158 mask: linear-gradient(to bottom,159 rgba(0, 0, 0, 0) 12.5%,160 rgba(0, 0, 0, 1) 25%,161 rgba(0, 0, 0, 1) 37.5%,162 rgba(0, 0, 0, 0) 50%);163 }164165 .gradient-blur > div:nth-of-type(2) {166 z-index: 3;167 backdrop-filter: blur(2px);168 mask: linear-gradient(to bottom,169 rgba(0, 0, 0, 0) 25%,170 rgba(0, 0, 0, 1) 37.5%,171 rgba(0, 0, 0, 1) 50%,172 rgba(0, 0, 0, 0) 62.5%);173 }174175 .gradient-blur > div:nth-of-type(3) {176 z-index: 4;177 backdrop-filter: blur(4px);178 mask: linear-gradient(to bottom,179 rgba(0, 0, 0, 0) 37.5%,180 rgba(0, 0, 0, 1) 50%,181 rgba(0, 0, 0, 1) 62.5%,182 rgba(0, 0, 0, 0) 75%);183 }184185 .gradient-blur > div:nth-of-type(4) {186 z-index: 5;187 backdrop-filter: blur(8px);188 mask: linear-gradient(to bottom,189 rgba(0, 0, 0, 0) 50%,190 rgba(0, 0, 0, 1) 62.5%,191 rgba(0, 0, 0, 1) 75%,192 rgba(0, 0, 0, 0) 87.5%);193 }194195 .gradient-blur > div:nth-of-type(5) {196 z-index: 6;197 backdrop-filter: blur(16px);198 mask: linear-gradient(to bottom,199 rgba(0, 0, 0, 0) 62.5%,200 rgba(0, 0, 0, 1) 75%,201 rgba(0, 0, 0, 1) 87.5%,202 rgba(0, 0, 0, 0) 100%);203 }204205 .gradient-blur > div:nth-of-type(6) {206 z-index: 7;207 backdrop-filter: blur(32px);208 mask: linear-gradient(to bottom,209 rgba(0, 0, 0, 0) 75%,210 rgba(0, 0, 0, 1) 87.5%,211 rgba(0, 0, 0, 1) 100%);212 }213214 .gradient-blur::after {215 content: "";216 z-index: 8;217 backdrop-filter: blur(64px);218 mask: linear-gradient(to bottom,219 rgba(0, 0, 0, 0) 87.5%,220 rgba(0, 0, 0, 1) 100%);221 }222</style>223```224225## Customization knobs226- Direction: flip `to top` ↔ `to bottom`.227- Height: adjust `.gradient-blur` height percentage.228- Strength: change blur values (0.5px → 64px).229- Steps: add/remove layers to control smoothness.230231## Common pitfalls232- `backdrop-filter` needs content behind it; it will not blur a flat background.233- High blur values are GPU-heavy; reduce steps on low-end devices.234- Ensure `pointer-events: none` stays to avoid blocking clicks.235236## Questions to ask when specs are missing237- Should the blur start from the top or bottom?238- How tall should the blur area be?239- Is performance a concern on lower-end devices?