Links
Radial Gradients and CSS Trigonometric Functions
I’ve been playing around with layering radial gradients in CSS to create flower shapes, with the help of CSS trigonometric functions. We can draw circles as background images with the
radial-gradient()
function in CSS, and we can layer multiple gradients to draw shapes.
I don't have time to learn React
React proponents might claim that React will teach you modern UI, but from what I've seen it barely copes with modern UI.
autofocus
is broken, custom elements don't work in all but the experimental version, using any "modern" features like<dialog>
or popovers requiresuseEffect
, and the synthetic event system teaches you so little about how DOM actually works. This isn't modern UI, it's UI from 2013 at its inception. I don't have the time left in my career to pick up UI paradigms that haven't evolved much beyond from when Barack Obama was in office.
Anchor Positioning Is Disruptive
The more I play with it, the more convinced I am that anchor positioning is going to unlock some surprising new layouts. Many of the initial examples and use cases for anchor positioning are simplifying existing possibilities, and – don’t misunderstand me – anchor positioning will simplify how dropdown menus are implemented significantly. But that’s just the start.
Popping Comments With CSS Anchor Positioning And View-Driven Animations
We will make the following blog post in which footnotes pop up as comments on the sides of each text. For this demo, our requirements will be: Pop the footnotes up when they get into the screen; Attach them to their corresponding texts; The footnotes are on the sides of the screen, so we need a mobile fallback;
No Fuss Light/Dark Modes
One approach to color modes it to do it all in CSS with
prefers-color-scheme
media queries and/or thelight-dark()
function. A user toggle can be a future improvement.
Videos
My top 5 most popular front-end tips
In this one, I look at what I called the
console.log()
of CSS, light and dark mode favicons, number inputs, how modern CSS is magic, and how to escape tutorial hell.
Sponsor
Sponsored by Cloud Four
Thanks to Cloud Four for sponsoring this week’s newsletter! They solve complex responsive web design and development challenges for ecommerce, healthcare, fashion, B2B, SaaS, and nonprofit organizations.
If you’d like to help with the costs of running Friday Front-End, you can back our Patreon for as little as a dollar a month.