---
title: "Flex wrapping detection in CSS sure would be handy"
publication: "Frontend Focus"
issue: 581
published_at: "2023-02-22"
canonical_url: "https://frontendfoc.us/issues/581"
---

Plus support for web push notifications on iOS. |       

Together with [![Userfront\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_600,h_110/e_make_transparent/co_white,e_outline:7/lnopbsxefrqqsjq14fvr.png)](https://userfront.com/tutorials/react-authentication?%0A%20%20%20utm_source=frontendfoc.us&utm_medium=newsletter&utm_campaign=primary&utm_content=react_authentication)         

#​581 — February 22, 2023 | [Read on the web](https://frontendfoc.us/issues/581)       

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1677073598/h8gea29hnbljvxehjw20.jpg)](https://webkit.org/blog/13878/web-push-for-web-apps-on-ios-and-ipados/)  

[Web Push for Web Apps on iOS and iPadOS](https://webkit.org/blog/13878/web-push-for-web-apps-on-ios-and-ipados/) — iOS and iPadOS 16.4 beta 1 comes with support for Web Push for home screen web apps, the badging API, screen wake lock API, and more. It’s now possible for a web app to send home screen push notifications to users with the Push API, Notifications API, and Service Workers all working together. 

Eidson and Simmons (WebKit)   [![\](https://copm.s3.amazonaws.com/a82128bd.png)](https://userfront.com/tutorials/react-authentication?utm_source=frontendfoc.us&utm_medium=newsletter&utm_campaign=primary&utm_content=react_authentication) 

[React Authentication, Simplified](https://userfront.com/tutorials/react-authentication?utm_source=frontendfoc.us&utm_medium=newsletter&utm_campaign=primary&utm_content=react_authentication) — In this article, we lay out a new approach to authentication (plus access control & SSO) in React applications. 

Userfront sponsor   

[Do We Need CSS `flex-wrap` Detection?](https://ishadeed.com/article/flex-wrap-detect/) — A considered explainer as to why flex wrapping detection in CSS would be handy, along with some use-cases highlighting the potential benefit. 

Ahmad Shadeed   

[Last Baseline Alignment](https://web.dev/last-baseline/) — Alignment using the `first` and `last` keywords is now available in all major engines. This means that we can use last baseline alignment as another option when aligning groups of flex or grid items. 

Rachel Andrew    

**⚡️ IN BRIEF** 

- Can ChatGPT write good CSS? [▶️ Zoran Jambor says yes](https://www.youtube.com/watch?v=DK132U72ckY).
- [The release notes for Safari 16.4 beta](https://developer.apple.com/documentation/safari-release-notes/safari-16_4-release-notes) – adding over 130 new features.
- What's new in DevTools for Chrome Canary 111? [This post has the rundown](https://developer.chrome.com/blog/new-in-devtools-111/), including a look at an enhanced breakpoint UX.
- All of the modules in the excellent '[Learn HTML!](https://web.dev/learn/html/)' resource/course, penned by Estelle Weyl, [are now available](https://web.dev/learn-html-available/) — the latest modules cover forms, images, and APIs.
- Kevin Powell runs through [five useful CSS properties](https://www.youtube.com/watch?v=o1HzOJfgugE) that don't get enough attention, including the `isolation` and `inset` properties.
- MS has been spotted [inserting ads for Edge](https://twitter.com/frantzfries/status/1628178202395873286) into the Chrome download page. 😬    

📙 **Tutorials, Articles & Opinion** 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1677074069/vg0cs4kpvmtlcv7pc3y0.png)](https://www.smashingmagazine.com/2023/02/guide-building-accessible-carousels/)  

[A Step-By-Step Guide to Building Accessible Carousels](https://www.smashingmagazine.com/2023/02/guide-building-accessible-carousels/) — Most carousels come with some usability and accessibility issues. This article addresses such problems with step-by-step design considerations as well as semantic requirements for carousels to be accessible. 

Sonja Weckenmann   

[How To Optimize Resource Loading With Priority Hints](https://www.debugbear.com/blog/priority-hints?utm_source=newsletter&utm_medium=sponsored&utm_campaign=frontend-focus-2) — Speed up your website by assigning a priority to your requests, for example to load a hero image earlier. 

DebugBear sponsor   

[The User Activation API](https://webkit.org/blog/13862/the-user-activation-api/) — As a web developer, you’ve probably noticed that certain APIs only work if an end-user clicks or taps on an HTML element. Well, the `UserActivation` API can help determine if it’s OK to call a function that depends on user activation, as explained here. 

Marcos Caceres (WebKit)   

[Using Focal Points, Aspect Ratio & Object-Fit to Crop Images Correctly](https://henry.codes/writing/pure-css-focal-points) — A look at using CSS to crop images whilst ensuring the focal point stays in place. 

Henry Desroches   

[(255,255,255) is the Highest Specificity](https://www.bram.us/2023/02/21/255255255-is-the-highest-specificity/) — An exploration of how browser engines store specificity and what, if any, its limits are. This is not something you’ll likely run up against in practice, and if you do the author urges you “_[to stop writing bad CSS selectors like that](https://twitter.com/bramus/status/1628062154694721538)_”. 

Bramus Van Damme   

▶[Astro 2.0, Island Architecture, and React with Fred K. Schott](https://www.whiskeywebandwhatnot.fm/astro-20-island-architecture-and-react-with-fred-k-schott/) 

Whiskey Web and Whatnot sponsorpodcast   

[Use a MutationObserver to Handle DOM Nodes that Don’t Exist Yet](https://www.macarthur.me/posts/use-mutation-observer-to-handle-nodes-that-dont-exist-yet) — Comparing the effectiveness of the MutationObserver API with the conventional method of constantly checking for the creation of nodes. 

Alex MacArthur   

[Supporting CSS Multi Direction Languages in 2023](https://medium.com/appwrite-io/supporting-css-multi-direction-languages-in-2023-ea8f1f20bb91) 
Elad Shechter   

[Create a Rainbow-Colored List with `:nth-of-type()`](https://rachsmith.com/create-a-rainbow-coloured-list-with-css/) 
Rach Smith   

[Building a Lightbox with the Dialog Element](https://polypane.app/blog/building-a-lightbox-with-the-dialog-element/) 
Polypane  

🔧 **Code, Tools & Resources**  

[CSS Doodle: A Web Component for Drawing Patterns with CSS](https://css-doodle.com/) — A Custom Elements-based component that builds an internal grid of DIV elements and then populates them using CSS to create patterns. [GitHub repo.](https://github.com/css-doodle/css-doodle) 

Yuan Chuan   

[ScrollTrigger: Let Your Page React to Scroll Changes](https://github.com/terwanerik/ScrollTrigger) — Triggers classes based on the current scroll position. So, for example, when an element enters the viewport you can fade it in. 

Erik Terwan   [![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/v1677070643/spjxjughzenetbxh8knn.png)](https://codepen.io/thebabydino/pen/qByGqOm) 

[No SVG, No Image, CSS-Only Fluid Slider with `input[type=range\]`](https://codepen.io/thebabydino/pen/qByGqOm) — This is an impressive CSS demo, showcasing an animated, color-changing slider. Browser support for certain features used (such as `color-mix`) is limited. 

Ana Tudor Codepen   

[Kobalte: A UI Toolkit for Building Accessible Web Apps and Design Systems with SolidJS](https://github.com/kobaltedev/kobalte) — The components are unstyled and follow WAI-ARIA authoring practices. You also have granular access to each component part, allowing you to add event listeners, props, etc. 

Kobalte   

[Unicopy: Copy Unicode Characters and Symbols](https://unicopy.cc/) — There are lots of these types of sites but you might like this one because it has only the basics, divided into five categories. 

Magnus Hvidtfeldt    

🧑‍💻 JOBS  

[Software Engineer](https://jobs.ashbyhq.com/stickermule/1539721e-7c7d-4f45-a5b0-17e5c02d7bd0?utm_source=Cooperpress) — Join our happy team. Stimulus is a social platform started by Sticker Mule to show what's possible if your mission is to increase human happiness. 
Stimulus   

[Find Frontend Engineering Jobs with Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-frontendfocus%29&utm_content=easy-job-hunting) — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now. 
Hired    

🌛 **Dark Mode, The Easy Way?**  

Over on Twitter, Flavio Copes had a great demonstration of [a quick way to create a 'dark mode'](https://twitter.com/flaviocopes/status/1627609246014619649) for a site. Invert the colors, then invert back the things you _don't_ want to change, like images and code examples: 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/gduqrka9k6zn70haqa7q.jpg)](https://twitter.com/flaviocopes/status/1627609246014619649)  

There can be some downsides to this approach but it might be enough to get you thinking about the colors you'd want to use.   

📬 

**Got a new email address?** You can [change your email here](https://frontendfoc.us/edit_subscription/*|UID|*). 

--- 

**Bored of us?** Click [here to stop getting this newsletter](https://frontendfoc.us/leave/*|UID|*). 

--- 

**Got a link for us?** Reply and tell us. We can't include everything but we'll take a look. 

--- 

Published by Cooper Press Ltd.
Curated by [Chris Brandrick](https://mastodon.social/@brandrick) & [Peter Cooper](https://twitter.com/cooperx86).
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

[Stop getting this newsletter](https://frontendfoc.us/leave/*|UID|*)  

[Ipx.](https://frontendfoc.us/open/581/*|UID|*?ipx=t)
