Archive

Archive for the ‘Designing’ Category

2024: More CSS At-Rules Than the Past Decade Combined

October 9th, 2024 No comments
Number of at-rules per year in FWPD. They all have been added at an average rate of 1 per year, with the highest being 4 in 2021

More times than I can count, while writing, I get myself into random but interesting topics with little relation to the original post. In the end, I have to make the simple but painful choice of deleting or archiving hours of research and writing because I know most people click on a post with a certain expectation of what they’ll get, and I know it isn’t me bombing them with unrelated rants about CSS.

This happened to me while working on Monday’s article about at-rules. All I did there was focus on a number of recipes to test browser support for CSS at-rules. In the process, I began to realize, geez we have so many new at-rules — I wonder how many of them are from this year alone. That’s the rabbit hole I found myself in once I wrapped up the article I was working on.

And guess what, my hunch was right: 2024 has brought more at-rules than an entire decade of CSS.

It all started when I asked myself why we got a selector() wrapper function for the @supports at-rule but are still waiting for an at-rule() version. I can’t pinpoint the exact reasoning there, but I’m certain rthere wasn’t much of a need to check the support of at-rules because, well, there weren’t that many of them — it’s just recently that we got a windfall of at-rules.

Some historical context

So, right around 1998 when the CSS 2 recommendation was released, @import and @page were the only at-rules that made it into the CSS spec. That’s pretty much how things remained until the CSS 2.1 recommendation in 2011 introduced @media. Of course, there were other at-rules like — @font-face, @namespace and @keyframes to name a few — that had already debuted in their own respective modules. By this time, CSS dropped semantic versioning, and the specification didn’t give a true picture of the whole, but rather individual modules organized by feature.

Random tangent: The last accepted consensus says we are at “CSS 3”, but that was a decade ago and some even say we should start getting into CSS 5. Wherever we are is beside the point, although it’s certainly a topic of discussion happening. Is it even useful to have a named version?

The @supports at-rule was released in 2011 in CSS Conditional Rules Module Level 3 — Levels 1 and 2 don’t formally exist but refer to the original CSS 1 and 2 recommendations. We didn’t actually get support for it in most browsers until 2015, and at that time, the existing at-rules already had widespread support. The @supports was only geared towards new properties and values, designed to test browser support for CSS features before attempting to apply styles.

The numbers

As of today, we have a grand total of 18 at-rules in CSS that are supported by at least one major browser. If we look at the year each at-rule was initially defined in a CSSWG Working Draft, we can see they all have been published at a fairly consistent rate:

If we check the number of at-rules supported on each browser per year, however, we can see the massive difference in browser activity:

Number of at-rules per year in FWPD visualized by the browsers that implemented them in a colorful vertical bar chart.

If we just focus on the last year a major browser shipped each at-rule, we will notice that 2024 has brought us a whopping seven at-rules to date!

Numbers of at-rules with support in at least one major browsers. There have been seven that gained support in 2024
Data collected from caniuse.

I like little thought experiments like this. Something you’re researching leads to researching about the same topic; out of scope, but tangentially related. It may not be the sort of thing you bookmark and reference daily, but it is good cocktail chatter. If nothing else, it’s affirming the feeling that CSS is moving fast, like really fast in a way we haven’t seen since CSS 3 first landed.

It also adds context for the CSS features we have — and don’t have. There was no at-rule() function initially because there weren’t many at-rules to begin with. Now that we’ve exploded with more new at-rules than the past decade combined, it may be no coincidence that just last week the Chrome Team updated the function’s status from New to Assigned!

One last note: the reason I’m even thinking about at-rules at all is that we’ve updated the CSS Almanac, expanding it to include more CSS features including at-rules. I’m trying to fill it up and you can always help by becoming a guest writer.


2024: More CSS At-Rules Than the Past Decade Combined originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Categories: Designing, Others Tags:

Top 11 WordPress Themes for Web Designers in 2024

October 8th, 2024 No comments

A WordPress theme that doesn’t look modern, doesn’t come with built-in flexibility, and with a developer that doesn’t support it can spell trouble for you down the line. Your website’s design needs to adapt and evolve alongside the business it represents.

A WordPress theme that doesn’t look modern, doesn’t come with built-in flexibility, and with a developer that doesn’t support it can spell trouble for you down the line. Your website’s design needs to adapt and evolve alongside the business it represents.

There are tens of thousands of WordPress themes available on the market. And there are new ones being developed every day. When it comes time to choose a theme for your website and brand, how do you decide which is the best from so many?

In the following review, you’ll discover the best WordPress themes for 2024. They include:

These tried and tested WordPress themes are the best of the best. If you’re looking for incredible designs, intuitive page builders, and feature-packed themes, keep reading.

What do all the top WordPress themes have in common?

There are certain traits that all the best WordPress themes share. Whether you’re looking for a theme for your new website or to replace an existing one, make sure your theme has the following:

User-friendliness: You might see a theme with the most incredible looking pre-built websites or demos. However, if it takes more than a minute to figure out how to edit that theme on the backend, that’s a major issue.

Page builder options: From WordPress’s own builder to Elementor, every page builder has its fans. Finding a WordPress theme that allows you to design and customize your website with an intuitive page builder is critical.

Customizability: One of the drawbacks to using a popular WordPress theme is that it can end up looking like other people’s websites. The best WordPress themes in 2024, however, include a wide variety of website demos. They also give you the ability to customize as much or as little of them as you want.

Design quality: Before you purchase or install a theme, take a look at the multipurpose demos it comes with. They should look like they were built today, not five years ago. You should also be able to find designs made for your niche (or something close to it).

Mobile editing: As more people scour the web from their smartphones, you can’t afford to have a site not built for their screens. While many of the top WordPress themes offer responsive demos, it’s just as important that the page builders have easy-to-use mobile editing tools.

Speed: Speed matters in a number of ways. For starters, your WordPress theme and page builders should load quickly. If you’re having to wait for each new screen to open, editing your site will quickly become a nightmare. Your website visitors will feel the same way if your beautiful web design takes too long to load.

Support: Even the most seasoned of designers need help from time to time. That’s why it’s crucial to use themes that are well-supported by their developers. That includes self-support options like user manuals and video tutorials as well as timely customer support from the theme developer.

11 top WordPress themes for your website projects

Finding the perfect WordPress theme can feel like trying to find a needle in a haystack. The WordPress themes below, however, are the best of the best.

While you can’t go wrong with any of these themes, you might find that some of them are better suited to your current website needs than others. To help you narrow down the options, you’ll find information on their top features, the average customer rating, as well as what real users have to say about them.

UiCore Pro

TL;DR: UiCore PRO is a WordPress theme tailored explicitly for agencies looking to build unlimited websites under one yearly subscription.

UiCore PRO stands apart from the rest in the realm of WordPress themes. Crafted with agencies in mind, this theme offers unparalleled features designed to elevate your web design game and streamline your operations.

The Startup template, the epitome of sophistication, melds elegant design choices, boundary-pushing content structures, and captivating special effects, all culminating in an unrivaled user experience. Backed by a seamless backend interface, users revel in a hassle-free customization process, free from lag or errors, setting UiCore PRO leagues ahead of the competition.

Agencies looking for a game-changer in WordPress themes gravitate toward UiCore PRO for numerous reasons:

  • Unlimited Websites: Build limitless sites under one subscription, simplifying your workflow.
  • Tailored Agency Functionality: Designed specifically to meet the demands of agencies seeking efficiency and excellence.
  • Strategic Long-Term Investment: A single subscription grants access to a treasure trove of features, making it a smart investment for scaling your agency’s online presence.

Experience the power of UiCore PRO – where unlimited website creation meets unparalleled innovation. Take charge of your agency’s digital landscape today.

Preview the Theme

Customer testimonial“This is the most flexible yet powerful theme I’ve used. The use of Elementor with theme blocks and theme settings has let me completely recreate a website in 2 days.”

BeTheme -Wordpress & WooCommerce Theme

TL;DR: BeTheme is the best WordPress theme for designers who want one theme for all their websites.

BeTheme is a WordPress theme and page builder all rolled in one. If you’re looking for a powerhouse that will allow you to come up with something original and impressive for your own site or for your clients, you’ve found it.

BeTheme comes with more than 700 pre-built websites. New websites are released monthly, so you’ll always have new, modern designs like BeFurnitureStore to play around with.

BeTheme’s own page builder is another rave-worthy feature. BeBuilder is fast, stable, and user-friendly. What’s more, you can edit any part of your website — including things like the header, footer, and WooCommerce content — with it.

Here are some more reasons to give BeTheme a try:

  • Time savings. BeTheme’s pre-built websites are just that — full-fledged websites. They’re not templates.
  • Ease of use. You won’t need to write CSS or install a ton of plugins to wow your visitors with a BeTheme site.
  • Support. If you run into trouble, BeTheme’s technical support is ready and able to help.

Preview the Theme

Average rating: 4.83 / 5

Customer testimonial: “Technical support is excellent. Clear, friendly, and always willing to help to solve any problem. It really pays to have the updated support subscription. Great service.”

Avada WordPress Theme

TL;DR: Avada is the best WordPress theme for web designers and developers who want a flexible, feature-rich, all-in-one website building solution.

Avada isn’t so much a WordPress theme as it is a complete website builder solution. While this theme comes with 83 pre-built websites and more than 120 design elements, it’s the live visual builder that makes this theme one of the best options for 2024.

Take something like Avada’s pre-built eBike website. Using the live builder, you could easily repurpose this template for other types of small ecommerce shops. And it would feel as though you’re editing it on the website instead of inside of WordPress.

There are other reasons why Avada is a fan favorite in the WordPress community:

  • Flexibility. You can design anything you imagine with it.
  • Feature-packed. You won’t need to install or purchase tons of plugins since Avada comes with most, if not all, the features you need.
  • Fast support. If you have questions or need help, Avada support is helpful and responsive.

Preview the Theme

Average rating: 4.78 / 5

Customer testimonial: “I am a web designer, and I purchased this builder for all my clients. I love it. I enjoy how flexible it is and all the ways I can mold different websites, and the many features it comes with, without purchasing anything extra. I’ve been using this builder since 2015 and it keeps getting better and better.”

Uncode – Creative & WooCommerce WordPress theme

TL;DR: Uncode is the best multiuse WordPress and WooCommerce theme for professional designers and agencies looking for a go-to solution for any project.

Uncode is one of those multipurpose themes that makes you never want to look at a plugin again. In terms of designing with Uncode, it comes with about 100 demos, 550 premade section wireframes, plus 85 content modules.

Whatever you can dream up, you’ll have an easy time recreating it with Uncode.

Shop Ajax is a great example of what you can do with Uncode. This ecommerce demo is attractive and full of all the features you’d need to improve your customers’ shopping experience (like filters, hover-revealed options, logo integration, and so on).

It’s this level of attention to detail that makes Uncode one of the top WordPress themes.

Here are some other reasons to try Uncode:

  • Personalization. You can fine-tune as much of your website or shop with Uncode as you want. Variations and settings allow you to go really deep when it comes to editing.
  • Coding. This theme is really well-coded. So bugs and slow performance won’t be an issue with your websites.
  • Support. Requests and issues are addressed promptly and in full by the support team.

Preview the Theme

Average rating: 4.89 / 5

Customer testimonial: “It is the best WordPress theme out there and the support is top notch (amazing response times and knowledge from their support team). The way it is built is smart and intuitive. Truly easy to use and consistent in all its options. I love it!”

Blocksy WooCommerce Theme

TL;DR: Blocksy is the best free WordPress theme in 2024 for building beautiful, lightweight websites.

Blocksy is a freemium WordPress theme unlike any other. What’s most notable about it is that it is lightning fast — not just to use, but the websites you design with it, too. With performance playing such a big role in SEO these days, this is a big deal.

Blocksy-built websites aren’t just fast. They’re also built with beautiful aesthetics. Take, for instance, the Persona starter site. Modern users will love the dark theme and classy layout.

Anyone editing these starter sites will fall in love with Blocksy, too. This WordPress theme works with the top page builders — WordPress’s Gutenberg, Elementor, Beaver Builder, and Brizy.

There are other reasons why you’ll enjoy working with Blocksy:

  • It’s free. The free version of Blocksy is feature-packed. Upgrading to premium gives you even more power and flexibility.
  • Easy to use. You won’t need a comprehensive user’s manual to figure out how to edit this theme.
  • Helpful support. Users report quick response times and helpful advice.

Preview the Theme

Average rating: 5 / 5

Customer testimonial: “Blocksy is fast and light, responsive and beautiful. Blocksy has nothing superfluous and has everything you need. I love Blocksy, and Blocksy loves me.”

Total WordPress Theme

TL;DR: Total is the best WordPress theme for web designers and developers seeking the flexibility to design from-scratch as well as to use time-saving templates.

Total is the total package. You can build any type of website you want, regardless of your skill level. You also have the ability to design it from-scratch using the WPBakery live customizer or to start with a fully editable and professionally designed template.

Have a look at the Reach demo and you’ll get a sense for the types of designs you can come up with for businesses. In this case, the basic look and layout are smart choices. They’re what make this service provider’s portfolio really pop.

Visit Total’s website and you’ll see how diverse and complex the other demos are. The possibilities will feel endless with Total. And when you’re building websites for dozens of clients every year, that’s important.

Here are other reasons why Total will be one of the best WordPress themes in 2024:

  • Out of the box. You won’t need to spend hours researching, installing, and setting up plugins to get all the features your site needs. They’re right there out of the box.
  • Scalability. With features like dynamic templates, global headers, and more, you can program your designs for easier, hands-free scalability.
  • Well-maintained. Users refer to this support as world-class. They also appreciate the regular updates that add new features to the theme.

Preview the Theme

Average rating: 4.86 / 5

Customer testimonial: “Among several themes purchased from ThemeForest, I can say Total theme is the only theme that I can recommend. It is a fast theme with most options already built in, and the support is excellent.”

Litho Elementor Theme

TL;DR: Litho is the best WordPress theme for users of all experience levels wanting to use a theme that’s well-built and supported.

Litho is one of the best WordPress themes for 2024 for numerous reasons. The one that stands out the most is the level of customer support.

While every great theme has a great team behind it, Litho goes the extra mile when it comes to user support. Whether you have questions about how to get started or experience an issue, you can expect customer service to be super friendly, fast, and capable of solving your problem.

This makes Litho an especially good choice for novice WordPress users and professional designers alike.

Plus, with dedicated support behind you, you won’t feel limited in what you do with the theme. Whether you want to create a startup site or something more complex, someone will be there to help you when you need it.

Here are some more reasons Litho is a good choice:

  • Versatility. Although there are hundreds of templates available, there are loads of customization options that allow you to design something unique.
  • Template quality. Litho’s collection of premade designs look fresh and new.
  • Elementor integration. Elementor is one of the most popular and user-friendly WordPress page builders, guaranteeing an easy editing experience in Litho.

Preview the Theme

Average rating: 4.94 / 5

Customer testimonial: “I’m absolutely thrilled with Litho. Its flexibility and customization options allowed me to create a unique and visually stunning website that perfectly fits my vision. The remarkable customer support provided by the team is incredibly responsive, genuinely friendly, and exceptionally helpful.”

Rey WordPress WooCommerce Theme

TL;DR: Rey is the best WordPress theme for designing full-featured, high-converting ecommerce websites.

Rey is a stylish and modern alternative to WooCommerce’s collection of themes. It’s also a great option if you’re tired of having to outfit great-looking WordPress themes with all the ecommerce features and functionality they’re missing.

Take a glance at the San Francisco demo and you’ll see how incredible these ecommerce sites are. With designs that rival those of luxury brands and wow-inducing product pages, websites built with Rey are sure to impress visitors and turn them into customers.

This WordPress theme seamlessly integrates with Elementor. If you’re familiar with this page builder plugin, then you know how easy it’s going to be to customize any Rey demo you use.

Speaking of customization, here are other reasons why you should consider using Rey:

  • Customization. If you see a feature or layout you like on another ecommerce site, chances are good you’ll be able to recreate it with Rey.
  • eCommerce functionality. With Rey, you won’t need to install lots of plugins to make it work how you want.
  • Support. Rey’s support team does a great job assisting with everything from basic requests to the most complex of problems.

Preview the Theme

Average rating: 4.98 / 5

Customer testimonial: “This is by FAR the best theme I have ever purchased from here. So easy to modify, and if you stumble across a roadblock the dev is quick to help!”

WoodMart WordPress WooCommerce Theme

TL;DR: WoodMart is the best WooCommerce theme for niche ecommerce design.

WoodMart is a fantastic option if you’re looking to build a niche ecommerce website that is uniquely your own.

This WooCommerce theme comes with more than 80 pre-built demo sites. You’ll find sites for businesses like video game companies, food delivery services, coffee retailers, and furniture stores — like the Furniture 2 demo.

These demos and the hundreds of templates included in the theme are easy to customize. From a global level down to each element on the page, WoodMart gives you all the options and settings needed to customize your designs as much or as little as you need to.

If you get stuck, there’s a search feature built into the settings to help you find the exact setting you need. The theme documentation is helpful, too, if you’re ever feeling stuck or wondering what more you can do.

Here are some other benefits to using WoodMart to design your online shop:

  • Organized. Many multipurpose themes can feel overwhelming to users. WoodMart is neat, clean, and easy to work with.
  • Design quality. Even if you’re only using one demo to design your site, you’ll find tons of inspiration amongst the beautiful library of demos and templates.
  • Mobile design. You won’t have to do much responsive editing as WoodMart’s templates look incredible on mobile out of the box.

Preview the Theme

Average rating: 4.93 / 5

Customer testimonial: “A theme could only be this quality, pleasant, practical, professional, wonderful, and tremendous. I don’t know how else to express it. This is truly a work of art designed and programmed with great effort. Some might think I’m exaggerating, but I can clearly say this. It’s the best WordPress theme on ThemeForest, even in the world.”

Impeka – Creative Multi-Purpose WordPress Theme

TL;DR: Impeka is the best WordPress theme for anyone wanting to spend more time designing and creating content instead of trying to master the theme itself.

Impeka has so many great things going for it. But one thing that can’t be denied is how easy Impeka is to use.

That’s not always something you find when using multipurpose WordPress themes. Yet, Impeka’s developer found a way to create a feature-packed and completely customizable theme without making it difficult for users to learn how to use it.

Special attention really does need to be paid to the theme developers. In addition to creating an easy-to-use theme, they provide great support for it, too.

For starters, the theme is updated often and new pre-built sites like the elegant Design Agency Demo are released every month. Secondly, the comprehensive support options and instantaneous customer support are rave-worthy.

Here are some other reasons why users love Impeka so much:

  • Design quality. Some users compare Impeka’s demos to works of art. They’re that good.
  • Flexibility. You’ll discover endless possibilities when it comes to how you use this theme and what you design with it.
  • Documentation. Although Impeka is incredibly easy to use, documentation is comprehensive and makes it easy to work out problems and get answers on your own.

Preview the Theme

Average rating: 4.98 / 5

Customer testimonial: “The theme is very flexible and there are endless possibilities to how it is used which the incredible support team are happy to help navigate. I can’t believe how quick and thoroughly responsive the team are. It’s refreshing to get such great support.”

XStore WooCommerce WordPress Theme

TL;DR: XStore is the best WooCommerce theme for designers and agencies looking to build high-converting online stores.

XStore is a fantastic choice if you’re looking for a WooCommerce theme you can use for a multitude of online stores. With more than 130 pre-built websites and Coming Soon pages, you’ll be able to get your store up and running quickly.

The Minimal Electronics pre-built site is a good example of the quality of designs you’ll find when you install XStore.

A great ecommerce theme has to do more than just look good. It also needs to include the right features for your shoppers.

In addition to the common functionality needed to run an ecommerce site, XStore also comes with a collection of high-converting features. Product variation swatches, live viewing counters, shopping cart countdowns, and free shipping progress bars, for instance, will help you capture more sales.

Here are some other reasons you might want to use XStore for ecommerce design:

  • Design quality. XStore’s templates look modern, sleek, and are beautifully laid out, making for a great shopping experience.
  • Customization. From the header and footer to the languages and currencies, there’s no limit to what you can customize.
  • Speed. Users rave about how quick their XStore websites load. Even after theme updates, page performance remains high and stable.

Preview the Theme

Average rating: 4.87 / 5

Customer testimonial: “I can’t express how thrilled I am with the XStore WordPress theme! It’s truly a game-changer for my website. From the moment I installed it, I was blown away by its stunning design and powerful features.”

Which of these WordPress themes will you try in 2024?

With tens of thousands of great WordPress themes available, you might feel overwhelmed when it comes time to settle on one. Especially if you’re thinking about purchasing a theme.

However, the best WordPress themes are easy to find if you know what you’re looking for.

  • They’re user-friendly.
  • They’re either compatible with the most popular page builder plugins or offer an intuitive and flexible editing experience of their own.
  • There are no limits on what types of websites or shops you can build.
  • The pre-built websites and demos are top-of-the-line and make creating your own a much faster and enjoyable process.
  • They allow for responsive editing so your site looks good on all screens.
  • The themes are fast and stable. And so too are the sites you design with them.
  • Customer support is there for you when you need it.

If you want to narrow down your search, start with this compilation of 11 top WordPress themes for 2024. Each of them has something special to offer.

Just to recap:

WordPress Theme Summary Standout Feature
UiCore PRO UiCore PRO is a WordPress theme tailored explicitly for agencies looking to build unlimited websites under one yearly subscription. Unlimited Websites
BeTheme BeTheme is the best WordPress theme for designers who want one theme for all their websites. Pre-built website collection
Avada Avada is the best WordPress theme for web designers and developers who want a flexible, feature-rich, all-in-one website building solution. Live visual builder
Uncode Uncode is the best multiuse WordPress and WooCommerce theme for professional designers and agencies looking for a go-to solution for any project. Website building components
Blocksy Blocksy is the best free WordPress theme in 2024 for building beautiful, lightweight websites. Website speed
Total Total is the best WordPress theme for web designers and developers seeking the flexibility to design from-scratch as well as to use time-saving templates. Endless possibilities
Litho Litho is the best WordPress theme for users of all experience levels wanting to use a theme that’s well-built and supported. Customer support
Rey Rey is the best WordPress theme for designing full-featured, high-converting ecommerce websites. eCommerce features
Woodmart WoodMart is the best WooCommerce theme for niche ecommerce design. Deep customization
Impeka Impeka is the best WordPress theme for anyone wanting to spend more time designing and creating content instead of trying to master the theme itself. Ease of use
XStore XStore is the best WooCommerce theme for designers and agencies looking to build high-converting online stores. Conversion features

The reviews above are a good place to start. But don’t let your research stop there.

Spend some time previewing the themes and their page builders (if they have their own). Also, check out the available demos, starters sites, or pre-built websites.

You’ll be able to get a good sense for which theme will suit your needs best once you spend some time with it.

[- This is a sponsored post on behalf of BAW media -]

Categories: Designing, Others Tags:

Smashing Hour With Heydon Pickering

October 8th, 2024 No comments

I sat down with Heydon Pickering in the most recent episode of the Smashing Hour. Full transparency: I was nervous as heck. I’ve admired Heydon’s work for years, and even though we run in similar circles, this was our first time meeting. You know how you build some things up in your mind and sorta psyche yourself out? Yeah, that.

Heydon is nothing short of a gentleman and, I’ll be darned, easy to talk to. As is the case with any Smashing Hour, there’s no script, no agenda, no nothing. We find ourselves getting into the weeds of accessibility testing and documentation — or the lack of it — before sliding into the stuff he’s really interested in and excited about today: styling sound. Dude pulled out a demo and walked me (and everyone else) through the basics of the Web Audio API and how he’s using it to visualize sounds in tons of groovy ways that I now want hooked up to my turntable somehow.


Smashing Hour With Heydon Pickering originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Categories: Designing, Others Tags:

Searching for a New CSS Logo

October 7th, 2024 No comments

There is an amazing community effort happening in search of a new logo for CSS. I was a bit skeptical at first, as I never really considered CSS a “brand.” Why does it need a logo? For starters, the current logo seems… a bit dated.

Displayed quite prominently is the number 3. As in CSS version 3, or simply CSS3. Depending on your IDE’s selected icon pack of choice, CSS file icons are often only the number 3.

VS Code file browser displaying a styles folder decorated with the CSS3 logo, as well as a CSS file with the CSS3 logo as it's file icon.

To give an incredibly glossed-over history of CSS3:

  • Earliest draft specification was in 1999!
  • Adoption began in 2011, when it was published as the W3C Recommendation.
  • It’s been used ever since? That can’t be right…

CSS is certainly not stuck in 2011. Take a look at all the features added to CSS in the past five years (warning, scrolling animation ahead):

CodePen Embed Fallback

(Courtesy of Alex Riviere)

Seems like this stems mainly from the discontinuation of version numbering for CSS. These days, we mostly reference newer CSS features by their individual specification level, such as Selectors Level 4 being the current Selectors specification, for example.

A far more general observation on the “progress” of CSS could be taking a look at features being implemented — things like Caniuse and Baseline are great for seeing when certain browsers implemented certain features. Similarly, the Interop Project is a group consisting of browsers figuring out what to implement next.

There are ongoing discussions about the “eras” of CSS, though, and how those may be a way of framing the way we refer to CSS features.

Chris posted about CSS4 here on CSS-Tricks (five years ago!), discussing how successful CSS3 was from a marketing perspective. Jen Simmons also started a discussion back in 2020 on the CSS Working Group’s GitHub about defining CSS4. Knowing that, are you at least somewhat surprised that we have blown right by CSS4 and are technically using CSS5?

The CSS-Next Community Group is leading the charge here, something that member Brecht de Ruyte introduced earlier this year at Smashing Magazine. The purpose of this group is to, well, determine what’s next for CSS! The group defines the CSS versions as:

  • CSS3 (~2009-2012): Level 3 CSS specs as defined by the CSSWG
  • CSS4 (~2013-2018): Essential features that were not part of CSS3, but are already a fundamental part of CSS.
  • CSS5 (~2019-2024): Newer features whose adoption is steadily growing.
  • CSS6 (~2025+): Early-stage features that are planned for future CSS.

Check out this slide deck from November 2023 detailing the need for defining stronger versioning. Their goals are clear in my opinion:

  1. Help developers learn CSS.
  2. Help educators teach CSS.
  3. Help employers define modern web skil…
  4. Help the community understand the progression of CSS capabilities over time.

Circling back around to the logo, I have to agree: Yes, it’s time for a change.

Back in August, Adam Argyle opened an issue on the CSS-Next project on GitHub to drum up ideas. The thread is active and ongoing, though appears to be honing in on a release candidate. Let’s take a look at some proposals!

Nils Binder, from 9elements, proposed this lovely design, riffing on the “cascade.” Note the river-like “S” shape flowing through the design.

two-by-two grid displaying a proposed CSS logo in various colors. 
Top left: black logo on white background.
Top Right: white logo on black background.
Bottom Left: light green logo on dark purple background.
Bottom Right: dark purple logo on light green background.

Chris Kirk-Nielson pitched a neat interactive logo concept he put together a while back. The suggestion plays into the “CSS is Awesome” meme, where the content overflows the wrapper. While playful and recognizable, Nils raised an excellent point:

Regarding the reference to the ‘CSS IS AWESOME’ meme, I initially chuckled, of course. However, at the same time, the meme also represents CSS as something quirky, unpredictable, and full of bugs. I’m not sure if that’s the exact message that needs to be repeated in the logo. It feels like it reinforces the recurring ‘CSS is broken’ mantra. To exaggerate: CSS is subordinate to JS and somehow broken.

Wow, is this the end of an era for the familiar meme? 

It’s looking that way, as the current candidate builds off of Javi Aguilar’s proposal. Javi’s design is being iterated upon by the group, it’s shaping up and looks great hanging with friends:

new CSS logo placed next to the JavaScript, Typescript, and Web Assembly logos

Javi describes the design considerations in the thread. Personally, I’m a fan of the color choice, and the softer shape differentiates it from the more rigid JavaScript and Typescript logos.

As mentioned, the discussion is ongoing and the design is actively being worked on. You can check out the latest versions in Adam’s CodePen demo:

CodePen Embed Fallback

Or if checking out design files is more your speed, take a look in Figma.

I think the thing that impresses me most about community initiatives like this is the collaboration involved. If you have opinions on the design of the logo, feel free to chime in on the discussion thread!

Once the versions are defined and the logo finalized, the only thing left to decide on will be a mascot for CSS. A chameleon? A peacock? I’m sure the community will choose wisely.


Searching for a New CSS Logo originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Categories: Designing, Others Tags:

Exciting New Tools for Designers, October 2024

October 7th, 2024 No comments

Welcome to our roundup of top new tools for October.

Categories: Designing, Others Tags:

Exciting New Tools for Designers, October 2024

October 7th, 2024 No comments
Feeedy is a notes app that offers the convenience of messaging apps with enhanced note-taking features.

We’ve got goodies for designers, developers, SEO-ers, content managers, and those of you who wear multiple hats. And, of course, it wouldn’t be October without a Halloween themed font. Enjoy!

Feeedy

Feeedy is a notes app that offers the convenience of messaging apps with enhanced note-taking features.

RealMail

Email sign ups can go wrong for a number of reasons, like fake addresses and typos. RealMail provides email validation that is easily configurable and fast to implement.

Syncly

The Syncly platform could help you pinpoint and eliminate causes of customer dissatisfaction by using AI to analyze and categorize user feedback automatically.

The Syncly platform could help you pinpoint and eliminate causes of customer dissatisfaction by using AI to analyze and categorize user feedback automatically.

Personno

If you need to do a lot of user testing but don’t have the budget, Personno will let you create AI respondents for fast results. It’s due to launch in Beta in the next couple of weeks.

If you need to do a lot of user testing but don’t have the budget, Personno will let you create AI respondents for fast results. It’s due to launch in Beta in the next couple of weeks.

FluidSEO

FluidSEO is an SEO plugin for Webflow. As well as the usual SEO help such as page audits, Fluid SEO can implement changes and suggestions for you, and run tasks in bulk.

FluidSEO is an SEO plugin for Webflow. As well as the usual SEO help such as page audits, Fluid SEO can implement changes and suggestions for you, and run tasks in bulk.

bcons

bcons is a php console that is added to your browser devtools. Inspect variable values, errors, and warnings without wading through error logs and var dumps. It currently works with Chromium and mozilla browsers.

bcons is a php console that is added to your browser devtools. Inspect variable values, errors, and warnings without wading through error logs and var dumps.

Airbounce

Airbounce aims to simplify using Zoom by turning your Mac’s caps lock key into a control switch. Press it to join or leave calls, and while on a call, use it to toggle mute. And as a bonus, the light will indicate whether you’re muted.

Airbounce aims to simplify using Zoom by turning your Mac’s caps lock key into a control switch.

Done

There are a ton of task managers and to-do lists out there, but Done is one of the simplest. It has a very minimal UI which at the same time is intuitive and easy to use. It allows you to create task groups, set reminders, and push unfinished tasks to the next day.

There are a ton of task managers and to-do lists out there, but Done is one of the simplest.

Monster Madness

This fun, lettering font is clearly inspired by old monster movie posters. It comes in three variants, and includes Opentype ligatures.

Monster Madness

PowerCharts

PowerCharts records your Mac’s battery health and performance and visualizes it in easy-to-read charts. Taking control of battery levels, consumption rates, maximum capacity, and level distribution over time may help you improve the battery life.

PowerCharts records your Mac’s battery health and performance and visualizes it in easy-to-read charts.

Clearspace

We all do it: turn to our phones for a quick break, then get hooked on social feeds or games. Clearspace prompts you to pause before opening your worst habit apps and take a few deep breaths. On the iPhone version, you can even set it to make you do some physical exercise first.

 Clearspace prompts you to pause before opening your worst habit apps and take a few deep breaths.

Cursor

Cursor is an AI code editor. Its autocomplete offers suggestions based on your most recent edits, and it will write code from natural language prompts. It can speed up development by taking over the grunt work, but you do still need to know code.

Cursor is an AI code editor. Its autocomplete offers suggestions based on your most recent edits, and it will write code from natural language prompts.

Magic Inspector

Magic Inspector’s AI lets you create, run, and schedule automated browser tests using natural language, without needing to be a developer.

Magic Inspector’s AI lets you create, run, and schedule automated browser tests using natural language, without needing to be a developer.

Strapi 5.0

Strapi headless CMS has been around for a while now, and last week saw the launch of version 5.0, with a whole host of major improvements for developers and for content managers.

Strapi headless CMS has been around for a while now, and last week saw the launch of version 5.0

Tab Organizer

This Chrome extension groups tabs by domain, subdomain, or custom rules, to to help minimize browser clutter. You can set custom colors for each tab group, and sort by title or domain.

This Chrome extension groups tabs by domain, subdomain, or custom rules, to to help minimize browser clutter.
Categories: Designing, Others Tags:

CSS Anchor Positioning Guide

October 2nd, 2024 No comments
Square labeled as "anchor"

Not long ago, if we wanted a tooltip or popover positioned on top of another element, we would have to set our tooltip’s position to something other than static and use its inset/transform properties to place it exactly where we want. This works, but the element’s position is susceptible to user scrolls, zooming, or animations since the tooltip could overflow off of the screen or wind up in an awkward position. The only way to solve this was using JavaScript to check whenever the tooltip goes out of bounds so we can correct it… again in JavaScript.

CSS Anchor Positioning gives us a simple interface to attach elements next to others just by saying which sides to connect — directly in CSS. It also lets us set a fallback position so that we can avoid the overflow issues we just described. For example, we might set a tooltip element above its anchor but allow it to fold underneath the anchor when it runs out of room to show it above.

Anchor positioning is different from a lot of other features as far as how quickly it’s gained browser support: its first draft was published on June 2023 and, just a year later, it was released on Chrome 125. To put it into perspective, the first draft specification for CSS variables was published in 2012, but it took four years for them to gain wide browser support.

So, let’s dig in and learn about things like attaching target elements to anchor elements and positioning and sizing them.

Quick reference

/* Define an anchor element */
.anchor {
  anchor-name: --my-anchor;
}
/* Anchor a target element */
.target {
  position: absolute;
  position-anchor: --my-anchor;
}
/* Position a target element */
.target { 
  position-area: start end;
}

Basics and terminology

At its most basic, CSS Anchor Positioning introduces a completely new way of placing elements on the page relative to one another. To make our lives easier, we’re going to use specific names to clarify which element is connecting to which:

  • Anchor: This is the element used as a reference for positioning other elements, hence the anchor name.
  • Target: This is an absolutely positioned element placed relative to one or more anchors. The target is the name we will use from now on, but you will often find it as just an “absolutely positioned element” in the spec.

For the following code examples and demos, you can think of these as just two

elements next to one another.

<div class="anchor">anchor</div>
<div class="target">target</div>

CSS Anchor Positioning is all about elements with absolute positioning (i.e., display: absolute), so there are also some concepts we have to review before diving in.

  • Containing Block: This is the box that contains the elements. For an absolute element, the containing block is the viewport the closest ancestor with a position other than static or certain values in properties like contain or filter.
  • Inset-Modified Containing Block (IMCB): For an absolute element, inset properties (top, right, bottom, left, etc.) reduce the size of the containing block into which it is sized and positioned, resulting in a new box called the inset-modified containing block, or IMCB for short. This is a vital concept to know since properties we’re covering in this guide — like position-area and position-try-order — rely on this concept.

Attaching targets to anchors

We’ll first look at the two properties that establish anchor positioning. The first, anchor-name, establishes the anchor element, while the second, position-anchor, attaches a target element to the anchor element.

anchor-name

A normal element isn’t an anchor by default — we have to explicitly make an element an anchor. The most common way is by giving it a name, which we can do with the anchor-name property.

anchor-name: none | <dashed-ident>#

The name must be a , that is, a custom name prefixed with two dashes (--), like --my-anchor or --MyAnchor.

.anchor {
  anchor-name: --my-anchor;
}

This gives us an anchor element. All it needs is something anchored to it. That’s what we call the “target” element which is set with the position-anchor property.

Square labeled as "target"

position-anchor

The target element is an element with an absolute position linked to an anchor element matching what’s declared on the anchor-name property. This attaches the target element to the anchor element.

position-anchor: auto | <anchor-element>

It takes a valid . So, if we establish another element as the “anchor” we can set the target with the position-anchor property:

.target {
  position: absolute;
  position-anchor: --my-anchor;
}

Normally, if a valid anchor element isn’t found, then other anchor properties and functions will be ignored.

Positioning targets

Now that we know how to establish an anchor-target relationship, we can work on positioning the target element in relation to the anchor element. The following two properties are used to set which side of the anchor element the target is positioned on (position-area) and conditions for hiding the target element when it runs out of room (position-visibility).

Anchor element with target elements spanning around it.

position-area

The next step is positioning our target relative to its anchor. The easiest way is to use the position-area property, which creates an imaginary 3×3 grid around the anchor element and lets us place the target in one or more regions of the grid.

position-area: auto | <position-area>

It works by setting the row and column of the grid using logical values like start and end (dependent on the writing mode); physical values like topleftrightbottom and the center shared value, then it will shrink the target’s IMCB into the region of the grid we chose.

.target {
  position-area: top right;
  /* or */
  position-area: start end;
}

Logical values refer to the containing block’s writing mode, but if we want to position our target relative to its writing mode we would prefix it with the self value.

.target {
  position-area: self-start self-end;
}

There is also the center value that can be used in every axis.

.target {
  position-area: center right;
  /* or */
  position-area: start center;
}

To place a target across two adjacent grid regions, we can use the prefix span- on any value (that isn’t center) a row or column at a time.

.target {
  position-area: span-top left;
  /* or */
  position-area: span-start start;
}

Finally, we can span a target across three adjacent grid regions using the span-all value.

.target {
  position-area: bottom span-all;
  /* or */
  position-area: end span-all;
}

You may have noticed that the position-area property doesn’t have a strict order for physical values; writing position-area: top left is the same as position-area: left top, but the order is important for logical value since position-area: start end is completely opposite to position-area: end start.

We can make logical values interchangeable by prefixing them with the desired axis using y-, x-, inline- or block-.

.target {
  position-area: inline-end block-start;
  /* or */
  position-area: y-start x-end;
}
CodePen Embed Fallback
CodePen Embed Fallback
Examples on each position-visibility value: always showing the target, anchors-visible hiding it when the anchor goes out of screen and no-overflow hiding it when the target overflows

position-visibility

It provides certain conditions to hide the target from the viewport.

position-visibility: always | anchors-visible | no-overflow
  • always: The target is always displayed without regard for its anchors or its overflowing status.
  • no-overflow: If even after applying the position fallbacks, the target element is still overflowing its containing block, then it is strongly hidden.
  • anchors-visible: If the anchor (not the target) has completely overflowed its containing block or is completely covered by other elements, then the target is strongly hidden.
position-visibility: always | anchors-visible | no-overflow
CodePen Embed Fallback

Setting fallback positions

Once the target element is positioned against its anchor, we can give the target additional instructions that tell it what to do if it runs out of space. We’ve already looked at the position-visibility property as one way of doing that — we simply tell the element to hide. The following two properties, however, give us more control to re-position the target by trying other sides of the anchor (position-try-fallbacks) and the order in which it attempts to re-position itself (position-try-order).

The two properties can be declared together with the position-try shorthand property — we’ll touch on that after we look at the two constituent properties.

Examples on each try-tactic: flip-block flipping the target from the top to the bottom, flip-inline from left to right and flip-start from left to top (single value) and top right to left bottom (two values)

position-try-fallbacks

This property accepts a list of comma-separated position fallbacks that are tried whenever the target overflows out of space in its containing block. The property attempts to reposition itself using each fallback value until it finds a fit or runs out of options.

position-try-fallbacks: none | [ [<dashed-ident> || <try-tactic>] | <'inset-area'>  ]#
  • none: Leaves the target’s position options list empty.
  • : Adds to the options list a custom @position-try fallback with the given name. If there isn’t a matching @position-try, the value is ignored.
  • : Creates an option list by flipping the target’s current position on one of three axes, each defined by a distinct keyword. They can also be combined to add up their effects.

    • The flip-block keyword swaps the values in the block axis.
    • The flip-inline keyword swaps the values in the inline axis.
    • The flip-start keyword swaps the values diagonally.
  • || : Combines a custom @try-option and a to create a single-position fallback. The keywords can also be combined to sum up their effects.
  • Uses the position-area syntax to move the anchor to a new position.
.target {
  position-try-fallbacks:
    --my-custom-position,
    --my-custom-position flip-inline,
    bottom left;
}
two targets sorrounding an anchor, positioned where the IMCB is the largest.

position-try-order

This property chooses a new position from the fallback values defined in the position-try-fallbacks property based on which position gives the target the most space. The rest of the options are reordered with the largest available space coming first.

position-try-order: normal | most-width | most-height | most-block-size | most-inline-size

What exactly does “more space” mean? For each position fallback, it finds the IMCB size for the target. Then it chooses the value that gives the IMCB the widest or tallest size, depending on which option is selected:

  • most-width
  • most-height
  • most-block-size
  • most-inline-size
.target {
  position-try-fallbacks: --custom-position, flip-start;
  position-try-order: most-width;
}

position-try

This is a shorthand property that combines the position-try-fallbacks and position-try-order properties into a single declaration. It accepts first the order and then the list of possible position fallbacks.

position-try: < "position-try-order" >? < "position-try-fallbacks" >;

So, we can combine both properties into a single style rule:

.target {
  position-try: most-width --my-custom-position, flip-inline, bottom left;
}

Custom position and size fallbacks

@position-try

This at-rule defines a custom position fallback for the position-try-fallbacks property.

@position-try <dashed-ident> {
  <declaration-list>
}

It takes various properties for changing a target element’s position and size and grouping them as a new position fallback for the element to try.

Imagine a scenario where you’ve established an anchor-target relationship. You want to position the target element against the anchor’s top-right edge, which is easy enough using the position-area property we saw earlier:

.target {
  position: absolute;
  position-area: top right;
  width: 100px;
}

See how the .target is sized at 100px? Maybe it runs out of room on some screens and is no longer able to be displayed at anchor’s the top-right edge. We can supply the .target with the fallbacks we looked at earlier so that it attempts to re-position itself on an edge with more space:

.target {
  position: absolute;
  position-area: top right;
  position-try-fallbacks: top left;
  position-try-order: most-width;
  width: 100px;
}

And since we’re being good CSSer’s who strive for clean code, we may as well combine those two properties with the position-try shorthand property:

.target {
  position: absolute;
  position-area: top right;
  position-try: most-width, flip-inline, bottom left;
  width: 100px;
}

So far, so good. We have an anchored target element that starts at the top-right corner of the anchor at 100px. If it runs out of space there, it will look at the position-try property and decide whether to reposition the target to the anchor’s top-left corner (declared as flip-inline) or the anchor’s bottom-left corner — whichever offers the most width.

But what if we want to simulataneously re-size the target element when it is re-positioned? Maybe the target is simply too dang big to display at 100px at either fallback position and we need it to be 50px instead. We can use the @position-try to do exactly that:

@position-try --my-custom-position {
  position-area: top left;
  width: 50px;
}

With that done, we now have a custom property called --my-custom-position that we can use on the position-try shorthand property. In this case, @position-try can replace the flip-inline value since it is the equivalent of top left:

@position-try --my-custom-position {
  position-area: top left;
  width: 50px;
}

.target {
  position: absolute;
  position-area: top right;
  position-try: most-width, --my-custom-position, bottom left;
  width: 100px;
}

This way, the .target element’s width is re-sized from 100px to 50px when it attempts to re-position itself to the anchor’s top-right edge. That’s a nice bit of flexibility that gives us a better chance to make things fit together in any layout.

Anchor functions

anchor()

You might think of the CSS anchor() function as a shortcut for attaching a target element to an anchor element — specify the anchor, the side we want to attach to, and how large we want the target to be in one fell swoop. But, as we’ll see, the function also opens up the possibility of attaching one target element to multiple anchor elements.

This is the function’s formal syntax, which takes up to three arguments:

anchor( <anchor-element>? && <anchor-side>, <length-percentage>? )

So, we’re identifying an anchor element, saying which side we want the target to be positioned on, and how big we want it to be. It’s worth noting that anchor() can only be declared on inset-related properties (e.g. top, left, inset-block-end, etc.)

.target {
  top: anchor(--my-anchor bottom);
  left: anchor(--my-anchor end, 50%);
}

Let’s break down the function’s arguments.

This argument specifies which anchor element we want to attach the target to. We can supply it with either the anchor’s name (see “Attaching targets to anchors”).

We also have the choice of not supplying an anchor at all. In that case, the target element uses an implicit anchor element defined in position-anchor. If there isn’t an implicit anchor, the function resolves to its fallback. Otherwise, it is invalid and ignored.

This argument sets which side of the anchor we want to position the target element to, e.g. the anchor’s top, left, bottom, right, etc.

But we have more options than that, including logical side keywords (inside, outside), logical direction arguments relative to the user’s writing mode (start, end, self-start, self-end) and, of course, center.

  • : Resolves to the of the corresponding side of the anchor element. It has physical arguments (top, left, bottom right), logical side arguments (inside, outside), logical direction arguments relative to the user’s writing mode (start, end, self-start, self-end) and the center argument.
  • : Refers to the position between the start (0%) and end (100%). Values below 0% and above 100% are allowed.

This argument is totally optional, so you can leave it out if you’d like. Otherwise, use it as a way of re-sizing the target elemenrt whenever it doesn’t have a valid anchor or position. It positions the target to a fixed or relative to its containing block.

Let’s look at examples using different types of arguments because they all do something a little different.

Using physical arguments
targets sorrounding the anchor. each with a different position

Physical arguments (top, right, bottom, left) can be used to position the target regardless of the user’s writing mode. For example, we can position the right and bottom inset properties of the target at the anchor(top) and anchor(left) sides of the anchor, effectively positioning the target at the anchor’s top-left corner:

.target {
  bottom: anchor(top);
  right: anchor(left);
}

Using logical side keywords
targets sorrounding the anchor. each with a different position

Logical side arguments (i.e., insideoutside), are dependent on the inset property they are in. The inside argument will choose the same side as its inset property, while the outside argument will choose the opposite. For example:

.target {
  left: anchor(outside);
  /* is the same as */
  left: anchor(right);

  top: anchor(inside);
  /* is the same as */
  top: anchor(top);
}

Using logical directions

targets sorrounding the anchor. each with a different position

Logical direction arguments are dependent on two factors:

  1. The user’s writing mode: they can follow the writing mode of the containing block (start, end) or the target’s own writing mode (self-start, self-end).
  2. The inset property they are used in: they will choose the same axis of their inset property.

So for example, using physical inset properties in a left-to-right horizontal writing would look like this:

.target {
  left: anchor(start);
  /* is the same as */
  left: anchor(left);

  top: anchor(end);
  /* is the same as */
  top: anchor(bottom);
}

In a right-to-left writing mode, we’d do this:

.target {
  left: anchor(start);
  /* is the same as */
  left: anchor(right);

  top: anchor(end);
  /* is the same as */
  top: anchor(bottom);
}

That can quickly get confusing, so we should also use logical arguments with logical inset properties so the writing mode is respected in the first place:

.target {
  inset-inline-start: anchor(end);
  inset-block-start: anchor(end);
}

Using percentage values
targets sorrounding the anchor. each with a different position

Percentages can be used to position the target from any point between the start (0%) and end (100% ) sides. Since percentages are relative to the user writing mode, is preferable to use them with logical inset properties.

.target {
  inset-inline-start: anchor(100%);
  /* is the same as */
  inset-inline-start: anchor(end);

  inset-block-end: anchor(0%);
  /* is the same as */
  inset-block-end: anchor(start);
}

Values smaller than 0% and bigger than 100% are accepted, so -100% will move the target towards the start and 200% towards the end.

.target {
  inset-inline-start: anchor(200%);
  inset-block-end: anchor(-100%);
}

Using the center keyword
targets sorrounding the anchor. each with a different position

The center argument is equivalent to 50%. You could say that it’s “immune” to direction, so there is no problem if we use it with physical or logical inset properties.

.target {
  position: absolute;
  position-anchor: --my-anchor;

  left: anchor(center);
  bottom: anchor(top);
}

anchor-size()

The anchor-size() function is unique in that it sizes the target element relative to the size of the anchor element. This can be super useful for ensuring a target scales in size with its anchor, particularly in responsive designs where elements tend to get shifted, re-sized, or obscured from overflowing a container.

The function takes an anchor’s side and resolves to its , essentially returning the anchor’s width, height, inline-size or block-size.

anchor-size( [ <anchor-element> || <anchor-size> ]? , <length-percentage>? )
anchor with an anchor-size() function on each side

Here are the arguments that can be used in the anchor-size() function:

  • : Refers to the side of the anchor element.
  • : This optional argument can be used as a fallback whenever the target doesn’t have a valid anchor or size. It returns a fixed or relative to its containing block.

And we can declare the function on the target element’s width and height properties to size it with the anchor — or both at the same time!

.target {
  width: anchor-size(width, 20%); /* uses default anchor */`
  height: anchor-size(--other-anchor inline-size, 100px);
}

Multiple anchors

We learned about the anchor() function in the last section. One of the function’s quirks is that we can only declare it on inset-based properties, and all of the examples we saw show that. That might sound like a constraint of working with the function, but it’s actually what gives anchor() a superpower that anchor positioning properties don’t: we can declare it on more than one inset-based property at a time. As a result, we can set the function multiple anchors on the same target element!

Here’s one of the first examples of the anchor() function we looked at in the last section:

.target {
  top: anchor(--my-anchor bottom);
  left: anchor(--my-anchor end, 50%);
}

We’re declaring the same anchor element named --my-anchor on both the top and left inset properties. That doesn’t have to be the case. Instead, we can attach the target element to multiple anchor elements.

.anchor-1 { anchor-name: --anchor-1; }
.anchor-2 { anchor-name: --anchor-2; }
.anchor-3 { anchor-name: --anchor-3; }
.anchor-4 { anchor-name: --anchor-4; }

.target {
  position: absolute;
  inset-block-start: anchor(--anchor-1);
  inset-inline-end: anchor(--anchor-2);
  inset-block-end: anchor(--anchor-3);
  inset-inline-start: anchor(--anchor-4);
}

Or, perhaps more succintly:

.anchor-1 { anchor-name: --anchor-1; }
.anchor-2 { anchor-name: --anchor-2; }
.anchor-3 { anchor-name: --anchor-3; }
.anchor-4 { anchor-name: --anchor-4; }

.target {
  position: absolute;
  inset: anchor(--anchor-1) anchor(--anchor-2) anchor(--anchor-3) anchor(--anchor-4);
}

The following demo shows a target element attached to two