
Level Up Your CSS Skills With The :has() Selector — Smashing Magazine
The CSS relational selector :has() offers what was previously impossible without JavaScript. Let’s explore some magical powers that :has brings.
10 articles by Stephanie Eckles.

The CSS relational selector :has() offers what was previously impossible without JavaScript. Let’s explore some magical powers that :has brings.

We’ll build a CSS-only slide deck that supports live coding, using native web functionality and modern styling, like CSS scroll snap.

We all have run into CSS collisions and sudden regressions in our codebases when new styles are written or 3rd-party styles are added. This is because of the interdependence of styles due to source order, specificity, and inheritance. Some ways to control the cascade have included methodologies like ITCSS and BEM and other newer native features. Cascade layers will be the ultimate native solution

Take two minutes right now and visit your current project in a browser. Then, using only the Tab key, you should be able to navigate between interactive

Debugging in CSS means figuring out what might be the problem when you have unexpected layout results. Today, Stephanie Eckles will look at a few categories bugs often fit into, see how you can evaluate the situation, and explore techniques that help prevent these bugs.

Spoiler alert: tooltips, modals, tabs, carousels, and dropdown menus are some of the user interface components that require more than CSS. To ensure accessibility of your interface, JavaScript is a necessary addition to accomplish focus management, respond to keyboard events, and toggle ARIA attributes.

In more recent years, design systems and component libraries have gained popularity. There is also a desire to build once, deploy anywhere. Meaning a component developed in isolation is intended to work in any number of contexts to make building complex interfaces more efficient and consistent. CSS container queries have landed and are now available for experimentation. Let’s look at what problem

The CSS Working Group Editor’s Draft for [Selectors Level 4](https://drafts.csswg.org/selectors-4/) includes several pseudo-class selectors that already have proposal candidates in most modern browsers. This guide will cover ones that currently have the best support along with examples to demonstrate how you can start using them today!

Eleventy (aka 11ty) is rising in the ranks among static site generators. This Node-based builder is attractive due to its zero-config starting point, purely static output, and ease of achieving the coveted top Lighthouse performance score of four perfect 100s. Let’s dive into what else makes it unique, and learn about some essential concepts to help you successfully get started.

A classic problem in CSS is maintaining the aspect ratio of images across related components, such as cards. The newly supported `aspect-ratio` property in combination with `object-fit` provides a remedy to this headache of the past! In this article, Stephanie Eckles will show you how to use these properties, in addition to creating a responsive gradient image effect for extra flair.