今日已更新 295 条资讯 | 累计 26707 条内容
关于我们

Turn Off the Lights: a CSS-only Salvadoran Pupusa Table

Geordy Elian Reyes Mendoza 2026年08月01日 14:34 2 次阅读 来源:Dev.to

This is a submission for Frontend Challenge - Comfort Food Edition, CSS Art . Inspiration I'm from El Salvador, and here comfort food has one name: pupusas . Thick corn tortillas stuffed with cheese, beans and chicharrón, served with curtido (pickled cabbage slaw) and tomato salsa. It's our national dish, but more than that — it's the food you eat at a plastic table at night, under one warm light, with the comal hissing somewhere behind you. That last image is what I wanted to capture. Not just the plate: the moment . So the piece has a light switch. Demo Two things to try: "Bañar en salsa" — pours salsa over each pupusa with a staggered cascade. "Apagar la luz" — turns the whole scene into a night pupusería, lit only by a flickering candle (veladora). Journey Everything is CSS: gradients, border-radius , box-shadow and blend modes. No images, no SVG, no libraries. JavaScript is 15 lines — two class toggles. The tablecloth is the flex. The blue-and-white geometric mantel is five bands built entirely with repeating-conic-gradient and repeating-linear-gradient — chained diamonds, sawtooth rows, chevrons. Zero background images. This was the part I rewrote the most until the patterns locked together. The night is one single element. When you turn off the light, I'm not repainting anything. A single overlay div with mix-blend-mode: multiply holds two stacked radial gradients: near-white around the candle (multiplying by white changes nothing — so that IS the light), falling off to deep blue at the edges. The steam even turns moonlit-blue for free, because that's just what multiply does to white pixels. One div, one blend mode, full day/night mood shift. Corn kernels are two offset dot grids. The mazorca's kernels are two radial-gradient grids shifted by half a cell — which is exactly how kernels interlock on a real cob. That half-cell offset is the difference between "corn" and "polka dots". The curtido is seven crossed stripe layers. White and purple cabbage, carrot, c

本文内容来源于互联网,版权归原作者所有
查看原文