What’s !important #13: @function, alpha(), CSS Wordle, and More
CSS functions, the Jane Ori expertly explained how CSS functions work. In addition, Declan Chidlow wrote our Speaking of functions, the Well, this comment from Jason Leo sums it up. Firstly, it means that we won’t need to hard-code color values when we already have CSS variables. For years I’ve circumvented this by only storing the actual values in CSS variables, but having to wrap them in the color function every single time is reallymonotonous: But it’s better than this (in my opinion): Secondly, the color format is actually irrelevant in this context, so Credit to Adam Argyle for bringing WebKit launched the Field Guide to Grid Lanes (formerly known as CSS masonry layout). If you’ve ever read one of our CSS-Tricks Guides, it’s similar to that (their words — just sayin’). It’s a smooth introduction with a variety of barebones and real-world demos. Una Kravets talked about two quality-of-life upgrades for ✅ Nice lil btn scale-down 🙈 Layout change bc the scroll bar disappears🙈 No light dismissThese UX problems can easily be solved with:– closedby="any"– overscroll-behavior: contain Also, Chris Coyier showed us how to animate CSS Day, the annual CSS community conference, was held in Amsterdam on the 11th and 12th of this month (so two days, technically). While there wasn’t a livestream this year, recordings will become available in late June. Until then, check out CSS Day on Bluesky as well as the #CSSDay Bluesky feed to see what happened on stage, what happened behind the scenes, and even the slides from some of the talks. And no, there weren’t any flamethrowers this year, but it wasn’t DOOM-free either (if you know, you know). What a week it’s been, especially with everything that transpired at CSS Day, but if you have any energy left I highly recommend a round (or several rounds) of Sunkanmi Fafowora’s CSS Wordle, which I’ve literally been obsessed with for the last week. Until next time!alpha()function, Grid Lanes, some things about <dialog>that you might not know, CSS Wordle, and more — this is What’s !importantright now.CSS functions, expertly explained
@functionwill probablybe the biggest CSS feature to probablybecome Baseline this year, so I definitely found it a bit intimidating at first. That is, until I read Jane’s baby-step-by-baby-step walkthrough, which eases you into it really well.@functiondocumentation, which you might want to bookmark for quick reference in the future.The
alpha()functionalpha()function caught me by surprise. Firstly, because I hadn’t heard of it, and secondly, because…why?We can already change the alpha channel:/* This */color: alpha(from var(--color) / 0.5);/* Instead of this */color: oklch(from var(--color) l c h / 0.5);/* Just the values */--color: 0.65 0.23 230;/* Then use them flexibly */color: oklch(var(--color));color: oklch(var(--color) / 0.5);/* Function and values */--color: oklch(0.65 0.23 230);/* Delightful */color: var(--color);/* Delightless */color: oklch(from var(--color) l c h / 0.5);alpha()offers the best of both worlds:/* Less delightless */color: alpha(from var(--color) / 0.5);alpha(from var(--color) / 0.5)communicates the intention more clearly than oklch(from var(--color) l c h / 0.5)does. It also makes the declaration inherently shorter.alpha()up.The Field Guide to Grid Lanes

Quality-of-life upgrades for
<dialog><dialog>— the new closedbyattribute, which isn’t supported by Safari yet, and overscroll-behavior: contain. There are some nuggets in the comments too, including a tip about scrollbar-gutter: stable.
[image or embed]<dialog>s, which I think many of us know how to do already, but it’s so easy to mess up. I have to Google it every time (it’s those bleeping @starting-styles).What happened at CSS Day 2026?

CSS Wordle

New web platform features and updates
image-rendering: crisp-edges(now Baseline)rect()and xywh()for shape-outside(now Baseline)path()and shape()for shape-outside(no Safari or Firefox support)Leave a Reply Cancel reply
相关推荐
-
The Software Architecture Handbook
-
How to Take Machine Learning Beyond Python Notebooks with These Helpful Tools
-
How to Run Open Source LLMs on Your Own Computer Using Ollama
-
freeCodeCamp's Terms of Service
-
How to Use Classes in JavaScript – A Handbook for Beginners
-
Stack Overflow: When We Stop Asking
- 最近发表
-
- How to Choose the Best Stock Market API for FinTech Projects and AI Agents
- freeCodeCamp.org Privacy Policy: Questions and Answers
- freeCodeCamp.org Privacy Policy: Questions and Answers
- Product Experimentation with Propensity Scores: Causal Inference for LLM
- How to Build a PostgreSQL
- How to Use AI Effectively in Your Dev Projects
- Beyond NVIDIA: Where the AI Infra Trade Actually Shows Up
- How to Use LangChain and LangGraph: A Beginner’s Guide to AI Workflows
- software architecture
- How to Use MLflow to Manage Your Machine Learning Lifecycle
- 随机阅读
-
- Bhavin Sheth
- Another Stab at the Perfect CSS Pie Chart... Sans JavaScript!
- AI in Finance: Transforming Investments and Banking in the Digital Age
- CSS Gradients Guide
- What is Programming? A Handbook for Beginners
- How to Build a Complete SaaS Payment Flow with Stripe, Webhooks, and Email Notifications
- How to Convert Images to PDF in the Browser Using JavaScript – A Step
- How to Deploy an AI Agent with Amazon Bedrock AgentCore
- How to Learn Python for JavaScript Developers [Full Handbook]
- How to Build an Autonomous OSINT Agent in Python Using Claude's Tool Use API
- CSS Gradients Guide
- @function
- How to Apply Academic Theories to Human
- How to Build a Cost
- How to Go from Toy API Calls to Production
- How to Understand the Safe Integer Limit in JavaScript
- Malware Analysis Tools Guide
- How to Build Optimal AI Agents That Actually Work – A Handbook for Devs
- How to Build a Scoped Note
- How to Build a Google Sheet AI Agent with Composio and Gemini TTS Support
- 搜索
-