<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Alvaro Montoro</title>
    <description>The latest articles on Forem by Alvaro Montoro (@alvaromontoro).</description>
    <link>https://forem.com/alvaromontoro</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F161327%2F2ff05281-db58-4dcb-946a-4b679e4a266b.jpeg</url>
      <title>Forem: Alvaro Montoro</title>
      <link>https://forem.com/alvaromontoro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/alvaromontoro"/>
    <language>en</language>
    <item>
      <title>Sharing CodePen 2.0 demos on DEV</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Tue, 07 Apr 2026 01:39:10 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/sharing-codepen-20-demos-on-dev-273</link>
      <guid>https://forem.com/alvaromontoro/sharing-codepen-20-demos-on-dev-273</guid>
      <description>&lt;p&gt;If you've tried the new CodePen 2.0 editor, you may have noticed that the URL format has changed. And if you've tried sharing one of these demos here on DEV, you've probably also noticed that it doesn't work with the standard CodePen embed code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{% codepen https://codepen.io/editor/alvaromontoro/pen/019d657e-d7bc-746a-9bc3-4df2244c97cc/24ac30a5aad27b2b927702d3557c6e70 %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you try adding that code to a DEV article, you'll get this error:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsw6iue79ihieveuheyjz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsw6iue79ihieveuheyjz.png" alt="Whoops! Something went wrong: Invalid CodePen code" width="800" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, the new URL doesn't work yet... but what if you still want to include it in a DEV article? Good news: you can! You just need to use the hash for the CodePen demo instead. Here's how to find it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on the &lt;strong&gt;Share icon&lt;/strong&gt; in the top-right corner&lt;/li&gt;
&lt;li&gt;Select "&lt;strong&gt;Embed&lt;/strong&gt;"&lt;/li&gt;
&lt;li&gt;A modal will open, make sure "&lt;strong&gt;HTML (recommended)&lt;/strong&gt;" is selected&lt;/li&gt;
&lt;li&gt;In the code, look for &lt;code&gt;data-slug-hash&lt;/code&gt; and &lt;code&gt;data-user&lt;/code&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0nv72myr2yya6f0ssa1f.png" alt="Screenshot of CodePen share modal with the data-slug-hash attribute and data-user highlighted" width="800" height="556"&gt;
&lt;/li&gt;
&lt;li&gt;Copy those values.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use them to generate a classic CodePen URL in the embed tag:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{% codepen https://codepen.io/[USER]/pen/[SLUGH_HASH] %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;That's it!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the screenshot above, the hash is "MYjBBrm" and the user is "alvaromontoro", that makes the URL &lt;a href="https://codepen.io/alvaromontoro/pen/MYjBBrm" rel="noopener noreferrer"&gt;https://codepen.io/alvaromontoro/pen/MYjBBrm&lt;/a&gt;, so the embed tag becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{% codepen https://codepen.io/alvaromontoro/pen/MYjBBrm %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which works just fine (it will only show the preview, not the code):&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/MYjBBrm?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;p&gt;To be fair, I expect the DEV team to fix this soon. But in the meantime, this is a simple workaround for sharing CodePen 2.0 demos.&lt;/p&gt;

</description>
      <category>meta</category>
      <category>dev</category>
    </item>
    <item>
      <title>10 Cool CodePen Demos (March 2026)</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Sat, 04 Apr 2026 00:43:42 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/10-cool-codepen-demos-march-2026-2gci</link>
      <guid>https://forem.com/alvaromontoro/10-cool-codepen-demos-march-2026-2gci</guid>
      <description>&lt;h2&gt;
  
  
  2026 F1 Drivers Custom Select using appearance: base-select
&lt;/h2&gt;

&lt;p&gt;Chris Bolson crafted one of the most impressive custom selects that I have seen so far (and by far). It doesn't even look like a native HTML select. The whole UX is so smooth and clean... you have to try it!&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/cbolson/embed/VYKaxqZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Select your Fruit!
&lt;/h2&gt;

&lt;p&gt;Another custom select, this time coded by Temani Afif. It also doesn't look like your typical select control (far from it), but this one falls in a more playful and fun side. Shoot the fruit to explode it make your selection. A nice experiment and a must try, too.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/t_afif/embed/PwGPJOB?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Demo of lighter operator in SVGFECompositeElement
&lt;/h2&gt;

&lt;p&gt;Safari has a great team coding the browser and sharing updates with the new features. Recently, Safari included support for the feComposite element and Jen Simmons created this demo to showcase how it works. (Without that property, there wouldn't be a glow around the circles.)&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/jensimmons/embed/jEMaMLV?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Neon Iridescent Ribbon using P5
&lt;/h2&gt;

&lt;p&gt;A relaxing animation with a colorful ribbon or lace moving around the screen. Margarita did a nice job with this demo that can be helpful to learn P5.js: update the different settings on top and check how the demo changes.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Margarita-the-solid/embed/OPROoZP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Untitled
&lt;/h2&gt;

&lt;p&gt;As part of the "opposite directions" CodePen challenge, Shivani coded this entertaining animation. Two teams of figures (Cyan and Magenta) clash in the center as they try to reach the opposite corner. It was fun looking at the characters move and try to guess which team would win each time.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/shivani0805/embed/EagbPxw?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  CSS &lt;code&gt;position: sticky&lt;/code&gt; for Single Axis Scroll Containers
&lt;/h2&gt;

&lt;p&gt;If you have ever worked with large data tables, you may know what a pain in the neck it is to keep header or columns sticky to help visualize the information. Luckily that may change soon! Bramus showcases a new feature that has landed on Chrome Canary that simplifies that experience in large tables.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/bramus/embed/VYKQwmK?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  CodePen TV - 100% Pure CSS
&lt;/h2&gt;

&lt;p&gt;Every time that Ben Evans shares CSS Art, you know it is going to be amazing. And he didn't disappoint with this TV set coded exclusively with HTML and CSS. The illustration is interactive, so go ahead, explore it, and play with all the buttons!&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/ivorjetski/embed/qEaRjBw?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  using &lt;code&gt;sibling-index()&lt;/code&gt; to hue-shift / increment &lt;code&gt;opacity&lt;/code&gt; in &lt;code&gt;svg&lt;/code&gt; &lt;code&gt;path&lt;/code&gt;s
&lt;/h2&gt;

&lt;p&gt;The title is really descriptive in this illustration by Many Nicole. The colors in the SVG changing by using relative colors and the new sibling-index() function to update the hue of the different lines that form this blob.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/mandynicole/embed/vEXRdMB?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  The CSS if() Function
&lt;/h2&gt;

&lt;p&gt;Rob created a tutorial about the if() function in CSS that allows to create inline conditional in a website styles. Learn, see the demos, and the test your knowledge at the end. A great resource to learn about CSS.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Sensiblemnd/embed/MYjmMBO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Gekke zoom dingen
&lt;/h2&gt;

&lt;p&gt;As the title indicates, this is a "crazy" zoom demo by Cyd Stumpel. Combining scroll-driven animations with zoom with scale, the effect is really nice and looks cool like a parallax, but different. A great idea, that I may steal borrow for some projects.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/Sidstumple/embed/yyaVveM?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




</description>
      <category>html</category>
      <category>css</category>
      <category>showdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>CSS in City</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Tue, 31 Mar 2026 13:25:41 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/css-in-city-23fb</link>
      <guid>https://forem.com/alvaromontoro/css-in-city-23fb</guid>
      <description>&lt;p&gt;The illustration of the city above is all CSS. There are no images, no SVG, no JavaScript... there isn’t even any HTML!*&lt;/p&gt;

&lt;p&gt;Here’s the source code on CodePen:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/mdZKxEr?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;(Click on the 1x, 0.5x, and 0.25x buttons to zoom in or out and see more of the illustration. Alternatively, you can also visit the &lt;a href="https://codepen.io/alvaromontoro/details/mdZKxEr" rel="noopener noreferrer"&gt;CodePen details page&lt;/a&gt;, where you can zoom in/out and resize the window for better results)&lt;/p&gt;

&lt;p&gt;You may ask “how did you do it?” And the answer will be “with a lot of patience.” I started this CSS Art two years ago, and worked adding small things little by little: a building here, some tree there, a bus stop close by... But, due to personal and professional reasons, I stopped adding things around a year ago, and haven’t touched the code since. I’d love to expand it into a full city someday.&lt;/p&gt;

&lt;p&gt;Basically, it is all a big collection of CSS gradients: radial, linear, conic... I event used the repeating ones. All of them sized and positioned so they fit within a particular spot in the illustration.&lt;/p&gt;

&lt;p&gt;This drawing is different from other CSS Art I usually do. I tend to do small things that are responsive, but this is an infinite drawing and it uses absolute units.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqeqlgmcfrshcpgwchph8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqeqlgmcfrshcpgwchph8.png" alt="Detail of the fountain" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is infinite because it doesn’t matter how much you resize, the illustration just goes on and on. This was achieved by playing with background sizes and positioning, so the same elements repeat &lt;em&gt;ad infinitum&lt;/em&gt;. Examples of these elements are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The bricks on the wall&lt;/li&gt;
&lt;li&gt;The tree tops behind the wall&lt;/li&gt;
&lt;li&gt;The grayed buildings in the very background&lt;/li&gt;
&lt;li&gt;The park houses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The absolute units are pixels, and I used that instead of &lt;code&gt;vmin&lt;/code&gt; or &lt;code&gt;em&lt;/code&gt;, to make sure that all the things will fall exactly in the place I wanted them to be. When using relative units, sometimes something will fall in a half a pixel position and the result looks off.&lt;/p&gt;

&lt;p&gt;When drawing and adding elements, I started from the bottom center of the image, and position everything based on that point, growing from there upwards and sideways.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq116lejkap411gzqszf3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq116lejkap411gzqszf3.png" alt="detail of the city" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I added some basic animations (but commented them for performance while coding, you can uncomment the code, but it’s not much), so the traffic light actually works, the water in the fountain flows (poorly) or some of the lights flicker. I considered adding a car that stops at the traffic light and an UFO that flies above the city –that won’t be seen unless you zoom out considerably or have a large/tall screen.&lt;/p&gt;

&lt;p&gt;And all this using just the :root element. I could still use the &lt;code&gt;::before&lt;/code&gt; or &lt;code&gt;::after&lt;/code&gt; pseudo-elements to do add more things. In particular, animated things. But I dropped the idea because adding them caused the performance to drop considerably. Still, I would like to continue adding more things when I have time.&lt;/p&gt;

&lt;p&gt;What do you think? Have you ever done a single div CSS Art?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxi50la2vc1ob37fbqnev.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxi50la2vc1ob37fbqnev.png" alt="Illustration of a city" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;*The CodePen demo may not show any HTML, but it automatically adds a structure that is hidden from view but can be seen reviewing the source code. There is a way to run CSS on the browser without the need to import it from HTML. Unfortunately, it requires updating some settings in the web server, and only one browser supported it last time I checked (Firefox). If we did this, the illustration would be completely CSS only.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>10 Cool CodePen Demos (February 2026)</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Sun, 01 Mar 2026 18:50:34 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/10-cool-codepen-demos-february-2026-59nf</link>
      <guid>https://forem.com/alvaromontoro/10-cool-codepen-demos-february-2026-59nf</guid>
      <description>&lt;h2&gt;
  
  
  Color Fan Deck
&lt;/h2&gt;

&lt;p&gt;As part of the colors CodePen challenge, Mads Stoumann, created some HTML+CSS color swatches, showcasing different shades and formats. This demo looks better in larger screens, click on the color name at the top to highlight each swatch. &lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/stoumann/embed/zxByRmP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  double-helix doodle 3
&lt;/h2&gt;

&lt;p&gt;One of Scott R McGann's pens with shaders and 3D effects. An object at the center of the scene, surrounded by an image wrapped in a way that provides a 360 degree illusion. Really impressive. I could see something like it being used for product demos.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/cantelope/embed/raLqoPj?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Scroll Driven Tri-Gyro
&lt;/h2&gt;

&lt;p&gt;Adam Argyle shared this gyroscope that spins in different angles and spaces, and changes size as you scroll the page. The smaller color triangles at the top help helps keep track of each triangle... and all in CSS with really clean HTML. Great for learning. This demo will not work on Firefox.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/argyleink/embed/gbwbzpR?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Birds Follow Cursor with 3D Sound - Three.js
&lt;/h2&gt;

&lt;p&gt;This flock of birds will follow your mouse around the screen. Maybe something you've seen many times, but Sabo Sugi's code is well organized and commented, and it can be illustrating (and fun) playing with the setting values and see how the particles change.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/sabosugi/embed/zxBgBMq?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  My type? Someone who doesn�t disappear after the first commit.
&lt;/h2&gt;

&lt;p&gt;February is the Valentine's Day month, and NANOUU created a web game perfect for the occasion... or kind of. Use the keyboard arrows to move left and right, avoid the hearts, aim for the computers, and find your couple by committing your code. The game doesn't use images, only emojis and text.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/antoniasymeonidou/embed/dPXQqLJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Winter Olympics Blizzard
&lt;/h2&gt;

&lt;p&gt;Inspired by a Jon Kantner's demo, and in preparation for the Winter Olympics, Holland Blumer created this particle animation, where the snowflakes accumulate to form the Olympic Rings. A cool and smooth effect.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/hollandblumer/embed/QwEZVYw?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Glass Panel Wave (OKLCH + 3D)
&lt;/h2&gt;

&lt;p&gt;Eric Van Holtz creates this interactive animation with warm discs and cool semitransparent panels that float smoothly like waves. Move the mouse around (or tap if on mobile) and see how the animation slides and rotates swiftly. And all in vanilla JS, HTML, and CSS.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/vanholtzco/embed/jErgqez?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Chicky (Voxel by HTML and CSS)
&lt;/h2&gt;

&lt;p&gt;Takane Ichinose coded this cute chick using cubes in HTML and 3D CSS. No JS, WebGL, or Three.js. If you uncomment the JS code, you'll be able to spin the chick and see it from different angles. &lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/takaneichinose/embed/zxBerNV?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Graph Theory (Chrome Only)
&lt;/h2&gt;

&lt;p&gt;Temani Afif creates so many amazing demos that it's tough to pick one, but this one goes beyond it. With minimal JavaScript to allow moving elements, Temani uses CSS anchors, style queries, animations and more to calculate distances and paths. Chrome only, but mind-blowing all around.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/t_afif/embed/YPWMmOP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Flood Above the Floor
&lt;/h2&gt;

&lt;p&gt;Wakana Y.K. coded this interactive 3D Web graphics demo built with Three.js. The water on the floor looks realistic reflecting the light and background images in a way that looks really natural. Beautiful effect.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/wakana-k/embed/Eayqjwr?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




</description>
      <category>html</category>
      <category>css</category>
      <category>showdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Native Random Values in CSS</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Thu, 26 Feb 2026 17:07:20 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/native-random-values-in-css-a7e</link>
      <guid>https://forem.com/alvaromontoro/native-random-values-in-css-a7e</guid>
      <description>&lt;p&gt;CSS has always been a deterministic language: given the same input, you get the same output. Every time. But that's about to change with the introduction of two new random functions in CSS.&lt;/p&gt;

&lt;p&gt;This article dives straight into the feature. For a more thorough review —including the history of randomization in CSS, how the feature works, and what it means for CSS as a language—, check out my upcoming article, which complements a conference talk I gave recently.&lt;/p&gt;

&lt;p&gt;At the time of writing this article, support for this feature is not widespread (only Safari offers partial support for the &lt;code&gt;random()&lt;/code&gt; function from version 26.2). This is a review of the specification and the features that are coming.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz67pheqjlqns4gupuau1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz67pheqjlqns4gupuau1.png" alt="Suport for random functions in CSS. random() only supported by Safari from version 26.2; random-item() is not supported by any browser" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's explore the new functions!&lt;/p&gt;

&lt;h2&gt;
  
  
  random()
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;random()&lt;/code&gt; returns a random value within a specified range. Its simplest form takes two parameters —a minimum and a maximum value—, and produces a result anywhere within that interval.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;500px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*
Possible outputs:
- width: 230px;
- width: 417px;
- width: 308.342px;
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice how the resulting values aren't limited to whole numbers. Anything within the range is valid, including decimals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Incremental Random
&lt;/h3&gt;

&lt;p&gt;But sometimes we don't want decimals (who enjoys dealing with half‑pixels in a layout?), and the good news is that the function accepts an optional third parameter to define the step or increment applied to the random value.&lt;/p&gt;

&lt;p&gt;To do that, we can add a third value at the end of the function. This value indicates the increment steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;180deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;10deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*
Possible outputs:
- rotate: 120deg;
- rotate: 40deg;
- rotate: 180deg;

Not possible:
- rotate: 5deg;
- rotate: 134deg;
- rotate: 89deg;
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The increments will start counting from the min value, which means that sometimes the max value may not be an option. For example, &lt;code&gt;random(100, 200, 30)&lt;/code&gt; will return 100, 130, 160, or 190; but not 200 (it cannot be reached in increments of 30 from 100) or 210 (out of bounds).&lt;/p&gt;

&lt;h3&gt;
  
  
  Sharing Options
&lt;/h3&gt;

&lt;p&gt;Each instance of the &lt;code&gt;random()&lt;/code&gt; function will return a different value. But there are situations in which we don't want that to happen. For example, let's pretend &lt;code&gt;aspect-ratio&lt;/code&gt; doesn't exist, and we want to create a square by setting a random width and height.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10em&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;30em&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10em&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;30em&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*
Possible outputs:
- width: 14em; height: 15em;
- width: 21em; height: 11em;
- width: 17em; height: 27em;
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is a way to share random values within the same rule, element, or even globally. This would be done by adding a new parameter passed as the first in the list that allows value sharing.&lt;/p&gt;

&lt;p&gt;It can have different values:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;auto&lt;/code&gt;: the default, it will generate different values for each instance of the &lt;code&gt;random()&lt;/code&gt; function. It can be omitted.&lt;br&gt; &lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*
Using auto: this would be equivalent to calling random() 
without a sharing option.

Possible result:
- div.div1 --&amp;gt; width: 125px; height: 198px;
- div.div2 --&amp;gt; width: 142px; height: 101px;
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;br&gt; &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;a dashed identifier (e.g. &lt;code&gt;--w&lt;/code&gt;): the value will be shared by the properties within the rule.&lt;br&gt; &lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*
Using a dashed identifier: All the divs will be squared, because 
the  generated value is shared by the properties (per element.)

Possible result:
- div.div1 --&amp;gt; width: 150px; height: 150px;
- div.div2 --&amp;gt; width: 134px; height: 134px;
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;br&gt; &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;the &lt;code&gt;element-shared&lt;/code&gt; keyword: it can go by itself or with a dashed identifier, the value will not be shared by the properties within the rule, but it will be shared through elements.&lt;br&gt; &lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;element-shared&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;element-shared&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*
Using element-shared by itself: the generated value will be shared
by the elments but not by the properties within the element.

Possible result:
- div.div1 --&amp;gt; width: 150px; height: 134px;
- div.div2 --&amp;gt; width: 150px; height: 134px;
*/&lt;/span&gt;

&lt;span class="c"&gt;/*--------------------*/&lt;/span&gt;

&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--v&lt;/span&gt; &lt;span class="n"&gt;element-shared&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--v&lt;/span&gt; &lt;span class="n"&gt;element-shared&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*
Using element-shared along a dashed identifier: the generated value 
will be shared by properties and elements (same value for all)

Possible result:
- div.div1 --&amp;gt; width: 128px; height: 128px;
- div.div2 --&amp;gt; width: 128px; height: 128px;
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;br&gt; &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;the &lt;code&gt;fixed&lt;/code&gt; keyword with a number id: it specifies a fixed global random identifier. So the value is shared globally.&lt;br&gt; &lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;fixed&lt;/span&gt; &lt;span class="m"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;fixed&lt;/span&gt; &lt;span class="m"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*
Using fixed: the generated value is shared by the properties 
across all elements.

Possible result:
- div.div1 --&amp;gt; width: 167px; height: 167px;
- div.div2 --&amp;gt; width: 167px; height: 167px;
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;With this, we have reviewed the different syntax forms and options of the &lt;code&gt;random()&lt;/code&gt; function. Next, let's explore the second function introduced as part of the latest draft of the &lt;a href="https://drafts.csswg.org/css-values-5/" rel="noopener noreferrer"&gt;CSS Values and Units Module Level 5&lt;/a&gt; specification.&lt;/p&gt;

&lt;h2&gt;
  
  
  random-item()
&lt;/h2&gt;

&lt;p&gt;CSS includes properties with discrete values that cannot be expressed as a range. In those cases, &lt;code&gt;random()&lt;/code&gt; is not particularly helpful. Instead, we need a function that takes a list of possible values and randomly selects one... and that is exactly what &lt;code&gt;random-item()&lt;/code&gt; does.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;random-item()&lt;/code&gt; function takes a sharing option and a series of values as parameters, then randomly selects and returns one value from the list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random-item&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--d&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random-item&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--o&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.75&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random-item&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#00f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;conic-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;#fff&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*
Possible outputs:
- display: block; opacity: 0.9; background: #00f;
- display: grid; opacity: 0.6; background: red;
- display: flex; opacity: 0.75; background: red;
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One important detail: &lt;strong&gt;in &lt;code&gt;random-item()&lt;/code&gt;, the sharing variable is not optional, it is required&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;As a small curiosity, something some readers may already know, but that I discovered while reviewing this specification (though it likely originates from a different one): CSS allows the use of curly braces (&lt;code&gt;{}&lt;/code&gt;) to delimit a list of comma-separated values when that list is used as a single value within a comma-separated list of parameters. Basically, this is only necessary when passing nested lists as parameters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt; &lt;span class="n"&gt;Times&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;serif&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="err"&gt;Arial,&lt;/span&gt; &lt;span class="err"&gt;sans-serif&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;monospace&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/*
Potential outputs:
- Times, serif 
- Arial, sans-serif
- monospace
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope this article was insightful and that you learned about the upcoming &lt;code&gt;random()&lt;/code&gt; and &lt;code&gt;random-item()&lt;/code&gt; functions in CSS (already here if you are using Safari). It ended up being longer than expected, but I think it was worth covering all the options and explaining them in detail with examples.&lt;/p&gt;

&lt;p&gt;Remember to consider browser support in CSS, caching, sharing, and performance implications when applying these functions in production. Also, think about practical use cases such as random colors, rotations, or spacing, which can enhance the visual experience without JavaScript.&lt;/p&gt;

&lt;p&gt;Some may question if adding these functions at this level is a good idea at all. From an architectural point of view, they make sense: this is a layout concern, and it should be handled in the layout layer (CSS) rather than the logic layer (JavaScript), as has been the case so far.&lt;/p&gt;

&lt;p&gt;...But more on that in the longer article coming up soon!&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>html</category>
      <category>javascript</category>
    </item>
    <item>
      <title>10 Cool CodePen Demos (January 2026)</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Thu, 12 Feb 2026 03:12:07 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/10-cool-codepen-demos-january-2026-406n</link>
      <guid>https://forem.com/alvaromontoro/10-cool-codepen-demos-january-2026-406n</guid>
      <description>&lt;h2&gt;
  
  
  border-shape chevron nav styled
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://codepen.io/una/" rel="external nofollow noopener noreferrer"&gt;Una Kravets&lt;/a&gt; showcases the &lt;code&gt;border-shape&lt;/code&gt; and uses it to create a breadcrumb-style navigation with triangular sides. Simple and easy to code. Note: this demo requires Chrome Canary to work.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/una/embed/ByzYMVb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Responsive Grid of hexagon without media queries
&lt;/h2&gt;

&lt;p&gt;In a series of experiments, &lt;a href="https://codepen.io/t_afif" rel="external nofollow noopener noreferrer"&gt;Temani Afif&lt;/a&gt; shows what can be achieved using the &lt;code&gt;corner-shape&lt;/code&gt; property. This hexagon grid is a great demo, unfortunately, it will only work on Chrome at the moment.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/t_afif/embed/vEKXbPv?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Poll graphic
&lt;/h2&gt;

&lt;p&gt;This demo is not to showcase a current feature, but to ask people for their opinion about a feature to come: multiple borders and outlines. &lt;a href="https://codepen.io/leaverou/" rel="noopener noreferrer"&gt;Lea Verou&lt;/a&gt; shared it on social media asking for feedback from developers about which option they thought was better.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/leaverou/embed/jErYKxb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  genuary day 12
&lt;/h2&gt;

&lt;p&gt;As part of Genuary, developers and artists code generative art. &lt;a href="https://codepen.io/fractalkitty/" rel="external nofollow noopener noreferrer"&gt;Sophia (Fractal Kitty)&lt;/a&gt; created these animated spinning boxes with P5.js. They change every time you click on the drawing.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/fractalkitty/embed/pvbNJwv?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Genuary 1: One color, one shape
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://codepen.io/lekzd/" rel="external nofollow noopener noreferrer"&gt;Alexander Korotaev&lt;/a&gt;'s entry for the first day of Genuary (more generative art coming up too). This animated star created with vanilla JS and canvas will change every time the page is reloaded.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/lekzd/embed/pvbjdRB?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Generative Ink Blobs
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://codepen.io/hollandblumer/" rel="external nofollow noopener noreferrer"&gt;Holland Blumer&lt;/a&gt; coded this generative art that reminds of oil colors mixing. It will regenerate into a new random shape every time the page is reloaded or resized (it may take a second to generate, but it's worth it.) Great work. &lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/hollandblumer/embed/ZYOJYre?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Untitled
&lt;/h2&gt;

&lt;p&gt;Another generative art piece, this time by &lt;a href="https://codepen.io/Alca/" rel="external nofollow noopener noreferrer"&gt;Jacob Foster&lt;/a&gt;. These groups of particles move randomly around the screen leaving a trace of color and light after them. They are kind of hypnotic.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/Alca/embed/Eaygrew?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Lotus
&lt;/h2&gt;

&lt;p&gt;This neon-looking lotus coded by &lt;a href="https://codepen.io/shivani0805/" rel="external nofollow noopener noreferrer"&gt;Shivani&lt;/a&gt; can be slightly animated by clicking on it or pressing on the space button. Open or close, it is relaxing looking at the flower spin slowly.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/shivani0805/embed/gbMaxjY?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Rigged Stick Walk
&lt;/h2&gt;

&lt;p&gt;Another demo by &lt;a href="https://codepen.io/shivani0805/" rel="external nofollow noopener noreferrer"&gt;Shivani&lt;/a&gt;. This time it is a study of a sticky figure walking, and the movement can be adjusted using some input ranges. Adjust the elbows, arms, hips, body... I miss an option for the knees, but it is a sticky figure after all.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/shivani0805/embed/ByzwdpG?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Three.js: Start / Pause Animation
&lt;/h2&gt;

&lt;p&gt;This animation by &lt;a href="https://codepen.io/Diana-Moretti" rel="external nofollow noopener noreferrer"&gt;Diana Moretti&lt;/a&gt; was created for the Start button CodePen Challenge. It includes a Start/Pause button that starts and pauses the animation (thus the name). But the more interesting part is not the button in itself but the infinite loop that spins and can be animated using Three.Js.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/Diana-Moretti/embed/ByzzLrG?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




</description>
      <category>html</category>
      <category>css</category>
      <category>showdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>CSS Art: Cat on the Moon</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Sun, 01 Feb 2026 18:41:51 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/css-art-cat-on-the-moon-595p</link>
      <guid>https://forem.com/alvaromontoro/css-art-cat-on-the-moon-595p</guid>
      <description>&lt;p&gt;I built a small CSS Art scene: a cat astronaut standing on the moon.&lt;/p&gt;

&lt;p&gt;The whole illustration is HTML + CSS: using gradients for lighting, border-radius for shapes, and shadows to create light (the irony). No SVG, no canvas.&lt;/p&gt;

&lt;p&gt;The source code on &lt;a href="https://codepen.io/alvaromontoro/pen/MYeVvgr" rel="noopener noreferrer"&gt;CodePen&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/MYeVvgr?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;I had already done the cat for a &lt;a href="https://codepen.io/alvaromontoro/pen/zxvxbBv" rel="noopener noreferrer"&gt;previous CSS Art&lt;/a&gt;, I adapted some shapes slightly, moving things around (especially in the face), changing colors (easy as I was already using CSS custom properties), and updating some sizes.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>showdev</category>
      <category>html</category>
    </item>
    <item>
      <title>CSS Optical Illusions: 50+ Visual Illusions Built with Pure CSS and HTML</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Thu, 22 Jan 2026 15:36:32 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/css-optical-illusions-50-visual-illusions-built-with-pure-css-and-html-13o9</link>
      <guid>https://forem.com/alvaromontoro/css-optical-illusions-50-visual-illusions-built-with-pure-css-and-html-13o9</guid>
      <description>&lt;p&gt;You can find a collection with &lt;a href="https://codepen.io/collection/GpWqKk" rel="noopener noreferrer"&gt;all the optical illusions in this article (and more!) on CodePen&lt;/a&gt; (&lt;a href="https://github.com/alvaromontoro/CSS-Optical-Illusions" rel="noopener noreferrer"&gt;also on GitHub&lt;/a&gt;!). You can move your mouse over many of the demos below to reveal the effect or stop the animations.&lt;/p&gt;

&lt;h2&gt;
  
  
  1 - Poggendorff Illusions
&lt;/h2&gt;

&lt;p&gt;The Poggendorff illusion is an optical illusion in which a diagonal line interrupted by a vertical bar appears misaligned, even when both segments are actually continuous.&lt;/p&gt;

&lt;p&gt;A simple version of this effect can be seen in the following demo. I used the &lt;code&gt;::before&lt;/code&gt; and &lt;code&gt;::after&lt;/code&gt; pseudo-elements to create the diagonal line and the vertical bar, respectively.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/JoKJjZJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;The effect can also be seen in a more elaborate version with multiple diagonal lines and vertical bars:&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/XJKgWyN?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;This drawing can easily be achieved using two CSS gradients: one tilted at 70 degrees and another consisting of a series of vertical columns. I applied it to the &lt;code&gt;body&lt;/code&gt;, although I could have used &lt;code&gt;:root&lt;/code&gt; instead.&lt;/p&gt;

&lt;p&gt;Another variation of this illusion is the Münsterberg Poggendorff Arch, in which the two sides of an arch appear misaligned and seem as though they will not meet at the top - but they do (mouse over to see it).&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/ZYOLpJq?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  2 - Induced Gradients
&lt;/h2&gt;

&lt;p&gt;The following illusions combine gradients and flat colors. Surprisingly, some of the gradients do not actually exist. They are simple gray bars that, when placed over a gradient, appear to have gradients themselves.&lt;/p&gt;

&lt;p&gt;Take the following demo: all three bars (two vertical ones on the sides and one horizontal bar in the center) are the same shade of gray. The only real gradient is behind them, which tricks our brain into believing that the bars are different colors and even contain gradients.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/gbMLYqy?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;Here is another variation of this effect. It looks like the central line has a repeating gradient of dark and light grays, but in reality it is a flat color. If you mouse over the demo, the bar will expand, making it clear that there is no gradient at all.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/emzWzEZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  3 - Cornsweet Illusion
&lt;/h2&gt;

&lt;p&gt;The next few optical illusions share a common idea: some colors are identical, but they do not look the same. This typically happens when regions of the same color or brightness are surrounded by areas with different contrast.&lt;/p&gt;

&lt;p&gt;For example, in the following demo, the left and right ends are the same shade of gray. However, one looks lighter because it is closer to white, while the other looks darker because it is closer to black. Mouse over to reveal that they are, in fact, the same color.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/JoKbPQv?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  4 - White's Illusion
&lt;/h2&gt;

&lt;p&gt;Run the following demo. You will see two gray columns in a black-and-white grid. Both columns are the same shade of gray, but the one surrounded by black appears darker than the one surrounded by white.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/ogLYwXP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;I coded this demo using &lt;code&gt;mix-blend-mode&lt;/code&gt; so I could try something a bit different. That worked well, but it also made it harder to showcase the effect on hover. In hindsight, I should have planned that better.&lt;/p&gt;

&lt;p&gt;This optical illusion also works with colors. For example, these two squares appear to be different shades of blue, but they are the same color. This time, you can mouse over to reveal the effect:&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/jErMLOK?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  5 - Wertheimer-Koffka Ring
&lt;/h2&gt;

&lt;p&gt;The ring in the following illustration has the same color all the way around. However, one side is placed over white and the other over black, which makes them look different. If you mouse over the demo, the red bar will disappear, making it more obvious that the ring is a single, uniform color.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/GgqrpMb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  6 - Adelson's Illusion
&lt;/h2&gt;

&lt;p&gt;You have probably seen the illusion involving a checkerboard and an object casting a shadow, where two tiles - one seemingly light and one seemingly dark - turn out to be the same color.&lt;/p&gt;

&lt;p&gt;This demo follows the same principle. You will see two tiles labeled A and B. Both have the same shade of gray, but most people cannot tell at first glance (or second, or even third).&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/WbxRxvb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  7 - Asahi illusion of Brightness
&lt;/h2&gt;

&lt;p&gt;The circle at the center of this flower-shaped element is the same white as the rest of the page, but it gives the impression of being brighter, as if it were emitting light.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/XJKRdvb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  8 - Color Spheres
&lt;/h2&gt;

&lt;p&gt;This is one of my favorite illusions in the collection. The circles (or spheres) look red, blue, or green, but in reality they are all the same grayish color. Our brain "colorizes" them based on the lines that overlap the shapes. Don't believe it? Mouse over the illustration.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/VYjKryZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  9 - Colors from Contour
&lt;/h2&gt;

&lt;p&gt;In the following illustration, the lines inside the yellow section appear blue, while the lines inside the blue section appear red… but they are all black (or very dark gray). The white contour creates the illusion of color. Mouse over to remove the contour and the lines will clearly appear black.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/yyJgJKb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  10 - Curvature Blindness
&lt;/h2&gt;

&lt;p&gt;One set of lines looks straighter (top) while the other looks more curved (bottom). In reality, both sets are equally wavy. The only difference is how they are colored: changing the color at the peaks makes the lines look straighter. Changing it at the inflection points makes them look more curved.&lt;/p&gt;

&lt;p&gt;The CSS code for the wavy lines is adapted from a &lt;a href="https://css-tricks.com/how-to-create-wavy-shapes-patterns-in-css/" rel="noopener noreferrer"&gt;Temani Afif snippet on CSS-Tricks&lt;/a&gt; and his &lt;a href="https://css-generators.com/wavy-shapes/" rel="noopener noreferrer"&gt;wavy shape generator&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/NPrbNbm?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  11 - Cafe Wall
&lt;/h2&gt;

&lt;p&gt;This is a classic optical illusion and an easy one to code in CSS. Three gradients are all that is needed to generate the effect in which the horizontal lines appear slanted, even though they are perfectly parallel.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/azZmpMr?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  12 - Penrose Triangle
&lt;/h2&gt;

&lt;p&gt;This optical illusion depicts an impossible shape. Parts that should be in front appear in the back, top becomes right, and everything feels contradictory. I coded this one some time ago for the 2024 Divtober event.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/vEKXxEX?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  13 - Ebbinghaus Illusion
&lt;/h2&gt;

&lt;p&gt;Which orange circle is larger: the one on the right or the one on the left? It is a trick question: both are the same size. However, having smaller surrounding elements gives the impression that one is larger.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/myErBdK?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;I also created an animated version of this illusion (see below), as well as another version using a square shape instead of a flower shape:&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/JoKRrYJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  14 - Kanizsa Square
&lt;/h2&gt;

&lt;p&gt;When people look at this illustration, they usually say they see a white square over black circles. However, the square is not actually there. The "Pac-Man" shapes create the illusion of a square and a sense of depth. Our brain fills in the missing information.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/VYjKzGW?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  15 - Ehrenstein's Illusion
&lt;/h2&gt;

&lt;p&gt;There are no circles or discs in this illustration, only vertical and horizontal lines forming crosses. Our visual system completes the shape and makes us perceive a disc that does not exist.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/yyJVJjP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  16 - Neon-Color-Spreading Illusion
&lt;/h2&gt;

&lt;p&gt;This illustration shows concentric circles, some of which have a green-and-black pattern. Our brain perceives a central patterned circle and four concentric circles around it, beneath the green circle.&lt;/p&gt;

&lt;p&gt;I cheated a little when creating this in CSS, as I actually used a green circle blended with the other backgrounds.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/ogLYzvv?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  17 - Hering and Wundt Illusions
&lt;/h2&gt;

&lt;p&gt;Perspective-based illusions are fascinating. Even when we know we are looking at a flat image, our brain insists on interpreting depth.&lt;br&gt;
In the Hering illusion, the red lines appear to curve outward, even though they are straight.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/vEKyKZq?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;opposite&lt;/em&gt; effect is the Wundt illusion. When the lines expand from the sides toward the center, the red lines appear to curve inward (this effect is more subtle).&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/RNRgqGZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  18 - Ponzo Illusion
&lt;/h2&gt;

&lt;p&gt;Both yellow lines are the same length, but the top one looks longer due to perceived depth and perspective. I tried a different approach when coding this one by applying a three-dimensional rotation in CSS… so the perspective is technically real.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/wBWoeYo?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  19 - T Illusion
&lt;/h2&gt;

&lt;p&gt;This illusion is easy to code in CSS and easy to fall for. Both the vertical and horizontal lines are the same length, but the vertical line appears longer.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/raLWryY?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  20 - Müller-Lyer Illusion
&lt;/h2&gt;

&lt;p&gt;A classic illusion: the horizontal lines are the same length, but inward- or outward-pointing edges dramatically change how we perceive them. I could swear the top one is longer. But it is not.&lt;br&gt;
From a coding perspective, each shape is a pseudo-element. I ensured the horizontal lines were identical by using the same gradients and only repositioning the edges in the &lt;code&gt;::before&lt;/code&gt; and &lt;code&gt;::after&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/GgqNqeZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  21 - Tilted Table Illusion
&lt;/h2&gt;

&lt;p&gt;It looks like the top rectangle is leaning to the left, but it is actually parallel to the one at the bottom. The trick lies in the direction of the diagonal lines used to "color" each rectangle.&lt;br&gt;
This illusion works better on larger screens. The effect is diminished when you can see the whole picture.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/ZYOLpLj?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  22 - Parallel Lines
&lt;/h2&gt;

&lt;p&gt;This is a simple effect: the black lines are parallel, but they appear not to be because of the direction of the bars crossing them.&lt;br&gt;
I slightly overcomplicated this one while coding it. I initially built the black-and-red version below and tried to reuse more code than I probably should have.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/yyJVqvo?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;Here is the original version I created. The effect is also visible there:&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/VYjmByN?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;p&gt;Good news! There are more optical illusions below - but first, a warning.&lt;/p&gt;

&lt;h1&gt;
  
  
  ATTENTION: The following optical illusions are static, but they give the impression of movement. Proceed accordingly.
&lt;/h1&gt;

&lt;p&gt;(Leaving some blank space in case you do not want to continue.)&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;/p&gt;
&lt;h2&gt;
  
  
  23 - Expanding Hole
&lt;/h2&gt;

&lt;p&gt;This is a trippy optical illusion. It is completely static, yet it looks like the black hole at the center is expanding - especially when you are not looking at it directly, creating the sensation of falling into a pit.&lt;/p&gt;

&lt;p&gt;From a coding perspective, this one was very simple: a background pattern made with two radial gradients, plus a blurred pseudo-element for the "expanding" hole.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/emzdyBo?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  24 - Rotating Snakes
&lt;/h2&gt;

&lt;p&gt;This is one of only two optical illusions in this collection where I used HTML elements instead of relying exclusively on CSS. It is a classic effect: when you look at the illustration, the peripheral discs appear to rotate, even though nothing is actually moving.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/JoKbBQz?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  25 - Appearing Dots
&lt;/h2&gt;

&lt;p&gt;Another classic illusion. Focus on the white dots and the adjacent dots will appear to turn black. There is no animation, no transition, and nothing dynamic. Just intersecting lines and small white circles, yet it looks like motion.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/LEZROaP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  26 - Disappearing Dots
&lt;/h2&gt;

&lt;p&gt;This pattern consists of repeating black and white dots across the page. If you focus on one dot, the others will begin to disappear. At first it may happen by row or column, but after a short while, most of them vanish.&lt;/p&gt;

&lt;p&gt;If you do not immediately see the effect, try focusing on one black dot. Mouse over it, wait a few seconds while keeping your focus, and then mouse out.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/xbOELPZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  27 - Ouchi Illusion
&lt;/h2&gt;

&lt;p&gt;This is a static image, but it gives the impression that the pattern inside the circle is moving sideways. This happens because our eyes are constantly making small movements, even when we are not aware of it.&lt;/p&gt;

&lt;p&gt;If you cannot see the illusion, try slightly moving the screen (or your head) while looking just outside the circle.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/wBWzJwP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  28 - Orthogonal Dotted Lines Sway
&lt;/h2&gt;

&lt;p&gt;When you look around this pattern, the central area appears to slide and sway, even though it is completely static. This illusion makes me dizzy... but that may also be because I had to stare at it for a long time while coding it.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/gbMgPzW?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  29 - Enigma
&lt;/h2&gt;

&lt;p&gt;This illusion is particularly interesting. There is a pink circle surrounded by concentric pink and purple rings. If you focus on the pink circle, the rings appear to spin or scintillate, as if there were some activity in them. Of course, nothing is actually moving.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/RNRKexx?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  30 - Waves
&lt;/h2&gt;

&lt;p&gt;This demo was challenging to code and takes a long time to load. Mainly because it uses a large number of conic gradients behind the scenes, which browsers struggle to render efficiently. There is probably a better way to implement it, but I have not explored that yet.&lt;/p&gt;

&lt;p&gt;If you look closely at the illustration, you may notice wave-like motion. As with the previous illusions in this section, the image is entirely static.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/JoKWKQa?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;p&gt;Good news! There are more optical illusions below - but first, another warning.&lt;/p&gt;

&lt;h1&gt;
  
  
  ATTENTION: The following optical illusions actually move, and the illusion is created by motion itself. Some of them can be dizzying, so proceed accordingly.
&lt;/h1&gt;

&lt;p&gt;(Leaving some blank space in case you do not want to continue.)&lt;/p&gt;

&lt;p&gt;.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;br&gt;
.&lt;/p&gt;
&lt;h2&gt;
  
  
  31 - Animated Ebbinghaus Illusion
&lt;/h2&gt;

&lt;p&gt;Earlier, we saw two static versions of the Ebbinghaus illusion. This one is animated. The elements move side to side, and the surrounding shapes grow and shrink, giving the impression that the orange circle is changing size - when it definitely is not.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/vEKXewP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  32 - Psychokinematic Tower
&lt;/h2&gt;

&lt;p&gt;This looks like a three-dimensional tower spinning in space, as seen from above. In reality, it is a flat, two-dimensional image rotating.&lt;br&gt;
Mouse over the demo to stop the rotation and the illusion of depth disappears entirely.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/dPXNMWR?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  33 - Color Fan
&lt;/h2&gt;

&lt;p&gt;This optical illusion requires only two gradients: a conic gradient for the fan-shaped arms and a radial gradient for the circles and discs.&lt;/p&gt;

&lt;p&gt;If you focus on the black dot, the illustration may appear to develop a darker greenish or brownish border. However, the colors never change.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/bNeWbqL?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  34 - Reverse Spoke Illusion
&lt;/h2&gt;

&lt;p&gt;This illusion is delightful and disorienting. While the background colors of the wheel are spinning, the spokes remain fixed. However, they appear to rotate in the opposite direction. In reality, only the background is moving.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/RNRpXYP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  35 - Motion Binding
&lt;/h2&gt;

&lt;p&gt;What do you see in this animation? Most people report two sets of lines operating independently: one moving horizontally and another moving vertically. And that is exactly how it looks.&lt;/p&gt;

&lt;p&gt;In reality, it is a single shape moving uniformly. Run the demo, mouse over the lines, and the true motion will be revealed.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/ByzpqdP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  36 - Mainz-Linez Illusion
&lt;/h2&gt;

&lt;p&gt;Focus on one of the red dots. You will notice it moves straight up and down along a vertical path. Now shift your focus to one of the black crosses in the center. Suddenly, the red dots appear to zigzag instead of moving straight.&lt;/p&gt;

&lt;p&gt;The CSS code for the wavy lines is adapted from a &lt;a href="https://css-tricks.com/how-to-create-wavy-shapes-patterns-in-css/" rel="noopener noreferrer"&gt;Temani Afif snippet on CSS-Tricks&lt;/a&gt; and his &lt;a href="https://css-generators.com/wavy-shapes/" rel="noopener noreferrer"&gt;wavy shape generator&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/gbMgwar?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  37 - Waddling Colors
&lt;/h2&gt;

&lt;p&gt;It may look like the boxes are moving at different speeds or like a set of walking feet. In reality, all elements move at the same pace and in parallel. Mouse over the demo to reveal the effect.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/emzdvpX?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;The illusion also works when the "feet" move in circles, as shown in this alternative version:&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/raLjEPY?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  38 - Dotted-Line Motion
&lt;/h2&gt;

&lt;p&gt;Follow the red dot as it moves sideways. From the corner of your vision, it may appear that the dashed black-and-white lines are moving closer together (when the dot moves left) or farther apart (when it moves right). In reality, the lines are completely static.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/ZYOLWob?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  39 - Contrast Asynchrony
&lt;/h2&gt;

&lt;p&gt;These dots always have the same color. However, when placed against alternating backgrounds, they appear to jump or move out of sync because of how they blend with their surroundings.&lt;/p&gt;

&lt;p&gt;Mouse over the demo to remove the background and the illusion disappears.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/EayZKOZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  40 - Breathing Square
&lt;/h2&gt;

&lt;p&gt;This illusion gives the impression that a blue square is growing and shrinking rhythmically, almost as if it were breathing or beating like a heart.&lt;/p&gt;

&lt;p&gt;Although the image is rotating, its size never changes. Mouse over the illustration to remove the green boxes and reveal the rotating blue square.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/pvbErNQ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  41 - Troxler Fading
&lt;/h2&gt;

&lt;p&gt;This illustration shows a circle made of pink dots, with one dot missing. Focus on the cross at the center and the missing dot will appear as a yellow or green dot, giving the impression that it is "eating" the pink dots. Just like Pac-Man.&lt;/p&gt;

&lt;p&gt;I could have used CSS trigonometric functions to calculate the exact positions of the dots, but since they never change, I chose to hardcode the values instead.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/zxBoqGq?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;Here is a related effect. Follow the light gray circle as it spins, and the darker circles will appear to change from gray to greenish. Focus on the cross at the center, and after a short time, the darker circles may begin to fade entirely.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/GgqNBpL?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  42 - Pinna-Brelstaff Illusion
&lt;/h2&gt;

&lt;p&gt;This illusion is particularly dizzying. Follow the bluish dot as it moves from right to left and back again. It will appear as though parts of the tiled background are shifting, even though they are static. The only moving element is the dot.&lt;br&gt;
From a CSS perspective, I coded the pattern using conic gradients, and applied it to the &lt;code&gt;::before&lt;/code&gt; and &lt;code&gt;::after&lt;/code&gt; pseudo-elements. I then flipped one upside down and clipped it.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/NPrbLPg?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  43 - Palisade
&lt;/h2&gt;

&lt;p&gt;The radii of a wheel, when viewed through a palisade, appear to curve. In reality, they are perfectly straight. Mouse over the demo to remove the palisade and you will see that the radii never bend.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/WbxogJJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  44 - Alternative Motion
&lt;/h2&gt;

&lt;p&gt;This animation demonstrates how our minds infer motion that may not actually be there. Consider the two blue dots. Different people perceive different movements: side to side, top to bottom, or even circular motion.&lt;/p&gt;

&lt;p&gt;Cover the right side of the animation so that you see only one dot at a time. The motion now appears vertical. Cover the bottom part instead, and the motion appears horizontal. This is our brain trying to complete the movement.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/JoKEXER?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  45 - Motion Inversion
&lt;/h2&gt;

&lt;p&gt;These two illustrations are identical - same shapes, same animation. The only difference is the CSS timing function.&lt;/p&gt;

&lt;p&gt;The top animation moves smoothly from right to left. The bottom one appears to move choppily in the same direction, but if you focus on it, it may suddenly seem to reverse direction and move faster.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/MYeoXvX?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;p&gt;Most of the inspiration for these optical illusions came from two excellent resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"&lt;a href="https://www.livescience.com/health/mind/32-optical-illusions-and-why-they-trick-your-brain" rel="noopener noreferrer"&gt;35 optical illusions and why they trick your brain&lt;/a&gt;" by Patrick Pester.&lt;/li&gt;
&lt;li&gt;"&lt;a href="https://michaelbach.de/ot/" rel="noopener noreferrer"&gt;154 Visual Phenomena &amp;amp; Optical Illusions&lt;/a&gt;" with explanations by Michael Bach&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you have questions about how any of these illusions were coded, leave a comment and I will do my best to answer.&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CSS Optical Illusions</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Thu, 15 Jan 2026 16:52:03 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/css-optical-illusions-58j</link>
      <guid>https://forem.com/alvaromontoro/css-optical-illusions-58j</guid>
      <description>&lt;p&gt;Over the past week, I have coded a series of optical illusions using CSS only (and some HTML for one of them, but most of them are CSS only). I created &lt;a href="https://codepen.io/collection/GpWqKk" rel="noopener noreferrer"&gt;a collection on CodePen with 40 of them&lt;/a&gt;, although the number may grow in the next few weeks.&lt;/p&gt;

&lt;p&gt;Many of them play with color effects, some others are animated, many of them should have (and do have) a motion warning... although probably I should add it to more. Coding some of them I got really dizzy 😬&lt;/p&gt;

&lt;p&gt;These are some of my favorites from the collection:&lt;/p&gt;

&lt;h2&gt;
  
  
  Mainz-Linez Illusion
&lt;/h2&gt;

&lt;p&gt;This one is animated (and it looks better in narrower/larger screens). The idea is to look at the red dots, and notice how they are moving up and down. Then focus on any of the black crosses... suddenly the red dots start moving in a wavy motion!&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/gbMgwar?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;For this one (and the next one), I used a &lt;a href="https://css-generators.com/wavy-shapes/" rel="noopener noreferrer"&gt;super ingenious wave shape generator&lt;/a&gt; by &lt;a class="mentioned-user" href="https://dev.to/afif"&gt;@afif&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Curvature Blindness
&lt;/h2&gt;

&lt;p&gt;These set of curves are almost equal: the only thing that changes is their colors. Painting them from inflection point to inflection point or from peak to peak will make them look completely different. To the point that one of them kind of stops looking like a wave! (This one looks better in smaller screens).&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/NPrbNbm?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  Gray Color Circles
&lt;/h2&gt;

&lt;p&gt;Do you see red, blue, and green spheres? What if I told you that they are all gray? (They really are! Mouse over the demo to reveal them) But overlapping some primary colors on top, the brain will "fill in" the circles with the colors at hand. At the beginning I was making the lines too tall and the effect was not visible. I like the end result.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/VYjKryZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  Gray Bars
&lt;/h2&gt;

&lt;p&gt;The two side columns, and the line in the middle are all the same flat gray color. Yes a single tone of gray. The only gradient is the background, not the lines in themselves. I liked that this demo is easy to see and easy to code.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/gbMLYqy?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  The Breathing Square
&lt;/h2&gt;

&lt;p&gt;Another animated one that you'll need to go see at CodePen. The blue square looks like it's pulsating or breathing. Growing and shrinking in sequence... but in reality it is the same square with the same size, just spinning. Mouse over to reveal it.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alvaromontoro/embed/pvbErNQ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;p&gt;And like these five, there are 35 more. &lt;a href="https://codepen.io/collection/GpWqKk" rel="noopener noreferrer"&gt;Check them out!&lt;/a&gt; I hope you like them. And I will be adding more in the next few weeks.&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Drawing a Houndstooth Pattern in CSS</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Sat, 10 Jan 2026 23:17:46 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/drawing-a-houndstooth-pattern-in-css-3ll2</link>
      <guid>https://forem.com/alvaromontoro/drawing-a-houndstooth-pattern-in-css-3ll2</guid>
      <description>&lt;p&gt;I associated the houndstooth pattern with childhood. Because I remember seeing it everywhere when I was little, but suddenly disappear and not seeing anywhere.&lt;/p&gt;

&lt;p&gt;From a CSS perspective, the pattern is really simple and it can be created with just two gradients:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Conic gradient to generate a white and black box pattern&lt;/li&gt;
&lt;li&gt;Repeating linear gradient (or just a linear gradient if you prefer) to generate the diagonal lines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For simplicity, I recommend having a custom property for the size, so it's easier to change the size by updating a single point in the code, instead of two… so really, not so necessary, but still convenient.&lt;/p&gt;

&lt;p&gt;Here's a video generating the pattern in real time with CSS:&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/N8Gv4gvfI_g"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;And here's the source code. And don't forget to change the value of the custom property --size to adjust it to your needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;--size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="err"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="err"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nt"&gt;conic-gradient&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;#fff&lt;/span&gt; &lt;span class="nt"&gt;25&lt;/span&gt;&lt;span class="nv"&gt;%&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#0000&lt;/span&gt; &lt;span class="nt"&gt;0&lt;/span&gt; &lt;span class="nt"&gt;50&lt;/span&gt;&lt;span class="nv"&gt;%&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#000&lt;/span&gt; &lt;span class="nt"&gt;0&lt;/span&gt; &lt;span class="nt"&gt;75&lt;/span&gt;&lt;span class="nv"&gt;%&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#0000&lt;/span&gt; &lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;
    &lt;span class="nt"&gt;repeating-linear-gradient&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
      &lt;span class="nt"&gt;135deg&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
      &lt;span class="nn"&gt;#fff&lt;/span&gt; &lt;span class="nt"&gt;0&lt;/span&gt; &lt;span class="nt"&gt;12&lt;/span&gt;&lt;span class="nc"&gt;.5&lt;/span&gt;&lt;span class="nv"&gt;%&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#000&lt;/span&gt; &lt;span class="nt"&gt;0&lt;/span&gt; &lt;span class="nt"&gt;25&lt;/span&gt;&lt;span class="nv"&gt;%&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#fff&lt;/span&gt; &lt;span class="nt"&gt;0&lt;/span&gt; &lt;span class="nt"&gt;37&lt;/span&gt;&lt;span class="nc"&gt;.5&lt;/span&gt;&lt;span class="nv"&gt;%&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;#000&lt;/span&gt; &lt;span class="nt"&gt;0&lt;/span&gt; &lt;span class="nt"&gt;62&lt;/span&gt;&lt;span class="nc"&gt;.5&lt;/span&gt;&lt;span class="nv"&gt;%&lt;/span&gt;
    &lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's how you draw a houndstooth pattern with CSS :)&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>10 Cool CodePen Demos (December 2025)</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Tue, 06 Jan 2026 06:33:19 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/10-cool-codepen-demos-december-2025-213g</link>
      <guid>https://forem.com/alvaromontoro/10-cool-codepen-demos-december-2025-213g</guid>
      <description>&lt;h2&gt;
  
  
  3D animated teardrop image gallery
&lt;/h2&gt;

&lt;p&gt;What Ana Tudor can create with CSS using math functions is astonishing. This gallery is just one example of it... using parametric equations and with so little code! Mind-blowing.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/thebabydino/embed/ogLjYVx?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Connected Circles with Anchor Positioning
&lt;/h2&gt;

&lt;p&gt;Temani Afif is another developer who takes CSS to the limit (and beyond). Combining anchor positioning, attr(), container queries, shape(), trigonometric functions, and other modern features, Temani creates something that is almost unthinkable with plain CSS. Note: this demo will only work on Chrome for now.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/t_afif/embed/PwNrNvP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  RGB Dancer
&lt;/h2&gt;

&lt;p&gt;Three videos, some CSS filters, and a few lines of JavaScript to follow the mouse (move the mouse around the dancer) is all that Alexandre Vacassin needed to create a hypnotic demo. Cool use of blend modes.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/alexandrevacassin/embed/pvyMbzP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Progressively enhanced details element animation
&lt;/h2&gt;

&lt;p&gt;In this demo, Cyd Stumpel uses a progressive enhancement approach to animate disclosures/accordions. From static elements (HTML), to animated (CSS), to a second layer of animations (JS) if the first one wasn't supported. Web development done the best way.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/Sidstumple/embed/myPYymj?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  CSS Animated Light &amp;amp; Shadow
&lt;/h2&gt;

&lt;p&gt;Amazing use of box-shadow, animations, and background gradients by Vicio Bonura. The effect is so realistic and smooth as the source of light moves around, that it's unbelievable that this demo is just HTML and CSS.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/VicioBonura/embed/azNjeWO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  50 Year Calendar
&lt;/h2&gt;

&lt;p&gt;Brett Schwickerath crafted a new version of one of those "eternal calendars" (good for 50 years). It may be a work in progress and not interactive yet, but the demo is coming along nicely: nice design, nice colors, responsive... Can't wait to see the final result.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/schwiiiii/embed/gbrByGg?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Abstract Olives
&lt;/h2&gt;

&lt;p&gt;Maybe it's nostalgia (I was born in the region that produces the most olive oil in the world), maybe it's that Genuary is around the corner, but this generative piece by Holland Blumer speaks to me. It's simply beautiful. Feel like printing it and hanging it in the office.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/hollandblumer/embed/myPzeXd?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Christmas Switcher Tree
&lt;/h2&gt;

&lt;p&gt;Superb use of colors, shapes, and animations. This demo by Lia Tsernant inspired me to create one using actual toggle switches. Needles to say, my demo doesn't come even close to Lia's... but that's normal considering how good this one is, and really good timing.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/LiaTsernant/embed/LENJaPB?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  shader-art: lava #anydayshaders 40
&lt;/h2&gt;

&lt;p&gt;Lea Rosema created another hypnotic shader. This one looks like the motion of a lava lamp in beige, black, and blue tones. It feels relaxing and peaceful. I like it.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/learosema/embed/vEGQoJE?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  CSS text-grow
&lt;/h2&gt;

&lt;p&gt;Adam Argyle was at it again, sharing more demos of new and upcoming CSS features. This time it is text-grow, that he used to adjust the size of the text in the row to fit the justification. Creating a really cool effect. Note: this demo will only work in Chrome Canary after activating the experimental-web flag.&lt;/p&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/argyleink/embed/gbrBVJG?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;




</description>
      <category>html</category>
      <category>css</category>
      <category>showdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Bad CSS-Dad Jokes (VI)</title>
      <dc:creator>Alvaro Montoro</dc:creator>
      <pubDate>Mon, 05 Jan 2026 13:16:00 +0000</pubDate>
      <link>https://forem.com/alvaromontoro/bad-css-dad-jokes-vi-9gl</link>
      <guid>https://forem.com/alvaromontoro/bad-css-dad-jokes-vi-9gl</guid>
      <description>&lt;p&gt;I recently published an article with &lt;a href="https://dev.to/alvaromontoro/100-web-development-jokes-1b03"&gt;100 Web Development Jokes&lt;/a&gt;, and I'm continuing the tradition of writing terrible CSS/HTML jokes into the new year! Without further ado, here are the jokes and puns...&lt;/p&gt;




&lt;p&gt;Why are developers impressed with Tailwind?&lt;br&gt;
It is a class act.&lt;/p&gt;




&lt;p&gt;One semantic class is worth one thousand utility classes.&lt;/p&gt;




&lt;p&gt;Why was the web developer afraid of accordions?&lt;br&gt;
Because the devil is in the &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1g96r19oph517v0o5a5p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1g96r19oph517v0o5a5p.png" alt="a demon sticking out of a details bar" width="750" height="750"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;CSS developers may seem flaky, but they always go the full &lt;code&gt;324in&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;You can't judge a book by its &lt;code&gt;background-size:cover&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;&lt;code&gt;border-width&lt;/code&gt; is my favorite CSS property.&lt;br&gt;
It sticks with me through ⁠&lt;code&gt;thick&lt;/code&gt; ⁠and &lt;code&gt;⁠thin&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;Why did the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; get upset?&lt;br&gt;
It got bent out of &lt;code&gt;shape()&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;What does CSS say when it's uncomfortable?&lt;br&gt;
&lt;code&gt;#00F&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And when it's really uncomfortable: &lt;code&gt;#0000000F&lt;/code&gt;!⁠&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkr7pznd5u3x07ypfl2gy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkr7pznd5u3x07ypfl2gy.png" alt="Meme showing Spanish coach Vicente del Bosque with an Oof! face" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Why was the web page crying?&lt;br&gt;
Because it got a &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;ache.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
I was thinking about this alternative, but it feels off.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Why was the web page happy?&lt;br&gt;
Because it hit the nail on the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;What movement does CSS Art belong to?&lt;br&gt;
&lt;code&gt;#DADA&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;Where do HTML elements go on vacation?&lt;br&gt;
&lt;code&gt;&amp;lt;spain&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Another option could be &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;sbon.&lt;/p&gt;




&lt;p&gt;CSS doesn't like fruit, but it ate &lt;code&gt;appearance&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5zspgqe2v1uyx1blcvep.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5zspgqe2v1uyx1blcvep.png" alt="CSS doesn't like fruit, but it ate appearance" width="800" height="598"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;What is CSS's favorite tree?&lt;br&gt;
A &lt;code&gt;#BA0BAB&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;Did you hear about the vibe coder who got attacked by a mountain lion?&lt;br&gt;
It got Claude.&lt;/p&gt;




&lt;p&gt;HTML threw an amazing party.&lt;br&gt;
Everyone said it was &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;&lt;code&gt;-webkit-box-reflect&lt;/code&gt; isn't standard... but it already sees itself there.&lt;/p&gt;




&lt;p&gt;What is CSS developers' favorite cloud service?&lt;br&gt;
&lt;code&gt;azure&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4fe4rqucml3agcl1kk4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4fe4rqucml3agcl1kk4.png" alt="What is CSS developers' favorite cloud service? azure." width="750" height="750"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;- Knock, knock!&lt;br&gt;
- Who's there?&lt;br&gt;
- &lt;code&gt;display:none&lt;/code&gt;&lt;br&gt;
- &lt;code&gt;display:none&lt;/code&gt; who?&lt;br&gt;
- &lt;/p&gt;




&lt;p&gt;- Knock, knock! - Who's there? - &lt;code&gt;display:flex&lt;/code&gt; - &lt;code&gt;display:flex&lt;/code&gt; who? - 😏&lt;/p&gt;




&lt;p&gt;What's the most popular HTML element?&lt;br&gt;
⁠&lt;code&gt;&amp;lt;time&amp;gt;⁠&lt;/code&gt;. It always has a date.&lt;/p&gt;




&lt;p&gt;And that's it for now. You can check the previous editions of this series on my site:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://alvaromontoro.com/blog/68060/bad-css-dad-jokes" rel="noopener noreferrer"&gt;Bad CSS-Dad Jokes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://alvaromontoro.com/blog/68063/bad-css-dad-jokes-ii" rel="noopener noreferrer"&gt;Bad CSS-Dad Jokes Part Deux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://alvaromontoro.com/blog/68064/bad-css-dad-jokes-iii" rel="noopener noreferrer"&gt;Bad CSS-Dad Jokes III&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://alvaromontoro.com/blog/68085/bad-css-dad-jokes-4" rel="noopener noreferrer"&gt;Bad CSS-Dad Jokes Episode Four: No Hope&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://alvaromontoro.com/blog/68087/bad-css-dad-jokes-v" rel="noopener noreferrer"&gt;Bad CSS-Dad Jokes Episode 5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>watercooler</category>
      <category>html</category>
      <category>css</category>
      <category>humor</category>
    </item>
  </channel>
</rss>
