css

5 Articles

Z-Index 99999: A CSS Conundrum

Unlocking the mysteries behind the CSS Stacking Context

The z-index property is a source of constant frustration as it often fails to behave as expected. This may be due to the stacking context; a fundamental concept that underpins the z-index property. It plays a pivotal role in determining how z-indices work, however, despite its significance, the stacking context remains an overlooked concept. In this article, we delve into the intricate relationship between stacking context and z-indices, shedding light on one of the most irritating questions in CSS: why does setting a z-index value as high as 99999 sometimes not work?

Read more
Battling CSS style collisions with the superpowers of the cascade

A deep dive into Cascade Layers

We've all experienced CSS style collisions in our codebase when writing new styles or adding new 3rd-party styling libraries. This can make working with CSS incredibly frustrating sometimes! However, there have been some new additions to the CSS spec that makes working with the cascade a bit easier. This article explores cascade layers and how they rework our approach to organizing and structuring styles within CSS.

Read more
Thinking about a new responsive web

A deep dive into container queries

Design on the web has changed drastically over the years. Tools such as media queries, flexbox, and CSS grid allow developers to reshape layouts on the web to suit the devices of many users. Although we are still iterating and uncovering answers to questions that drive the user experience on websites, the shift to component-based development has made it increasingly important to think about how components define their own layout. This article explores container queries and how they iterate on the idea of micro-layouts.

Read more
Selecting parent elements has become easier

unwrapping the :has selector in CSS

CSS has a lot of ways to select elements in the HTML and so many options can make it difficult to choose which method is most sufficient. The :has selector gives us another way to select parent elements but it allows us to do so much more. Here we deep dive into what the :has selector is and explore different use cases

Read more
Dark Mode: Not as simple as inverting the colours

How to properly create dark mode for an application

Dark mode, a fan favourite amongst developers and user alike. I find that there are a lot of nuances about creating dark theme for a website/application that are missed -- it isn't really as simple as inverting the colour scheme of your website/application. In this article we will explore some of those nuances and find how to create an effective dark theme.

Read more