Skip to main content

34 docs tagged with "css"

View all tags

Anchor Positioning & Popover

Position tooltips and menus with CSS anchor positioning and the Popover API - anchor(), position-area, position-try, anchor-size(), popover=hint, and when JavaScript still wins.

Architecture & Best Practices

Organising CSS for maintainability - BEM naming, file structure, CSS resets vs normalisers, utility classes, component-scoped styles, and preprocessor overview.

Backgrounds, Borders & Shadows

CSS background images, gradients, background shorthand, border-radius for rounded corners, box-shadow, text-shadow, and multiple backgrounds.

Build a Simple Blog Page

A super-beginner, start-to-finish tutorial for building a simple blog page using only HTML, CSS, and vanilla JavaScript - with an optional section on adding Vite later.

Cascade Layers & Scope

Control the cascade with @layer patterns and encapsulate component styles with @scope - how they compare to BEM, specificity wars, and !important.

Client Libraries

Client libraries (clientlibs) are AEM's mechanism for managing CSS and JavaScript delivery. They provide

Colors & Typography

CSS colour formats (named, hex, rgb, hsl), opacity, font properties, text styling, web-safe fonts, and loading Google Fonts.

content-visibility & Rendering Performance

Skip rendering off-screen content with content-visibility and contain-intrinsic-size - when it helps, accessibility caveats, and how it pairs with general web performance advice.

CSS Container Queries

Make components respond to their own slot size with CSS container queries. Interactive demos, the core API, and when to prefer them over media queries or device width.

CSS Custom Properties

CSS custom properties (variables) - defining, using, scoping, fallback values, theming, building a dark mode toggle, and dynamic updates with JavaScript.

CSS Grid

CSS Grid layout - defining rows and columns, the fr unit, grid areas, gap, auto-fit/auto-fill, minmax(), and implicit vs explicit grids.

CSS Nesting

Production rules for native CSS nesting - & usage, specificity, nesting media queries, and how native nesting differs from Sass.

Debugging & Common Pitfalls

Using browser DevTools to debug CSS, understanding margin collapse, overflow issues, centring gotchas, z-index problems, and cross-browser testing.

Display & Positioning

How CSS display modes (block, inline, inline-block) and positioning (static, relative, absolute, fixed, sticky) control element flow and placement.

Flexbox

CSS Flexbox layout - flex containers and items, direction, wrapping, alignment, sizing with flex-grow/shrink/basis, gap, and common patterns.

HTML & CSS Essentials

Learn enough HTML and CSS to build web pages - document structure, semantic elements, forms, CSS selectors, the box model, flexbox, and responsive design.

Introduction & First Styles

What CSS is, how it works with HTML, the three ways to add styles, the anatomy of a CSS rule, writing your first stylesheet, and a quick look at browser DevTools.

Logical Properties

Build direction-aware layouts with CSS logical properties - inset, margin-inline, padding-block, inline-size, and how they map to physical top/right/bottom/left.

Modern CSS Color

Perceptually uniform colour with oklch/oklab, color-mix(), relative colour syntax, light-dark(), color-scheme, and contrast-aware theming tips.

Modern CSS Features

Recent CSS additions - native nesting, the :has() selector, container queries, @layer, logical properties, color-mix(), accent-color, and subgrid.

Native Overlays & Dialogs

Build modals and light-dismiss overlays with the HTML dialog element, invoker commands, and CSS - without a JavaScript modal library.

Practice Projects

Hands-on CSS projects from beginner to advanced - profile card, navigation, gallery, landing page, dashboard, CSS art, scroll-snap carousel, and anchored tooltip.

Project: Build a Complete Website

Build a multi-page vanilla JavaScript website from scratch - navigation, theme toggle, form validation, dynamic content, and local storage.

Pseudo-classes & Pseudo-elements

CSS pseudo-classes for targeting element states (:hover, :focus, :nth-child) and pseudo-elements for creating virtual content (::before, ::after).

Responsive Design

Building layouts that work on every screen size - the viewport meta tag, media queries, mobile-first development, breakpoints, responsive images, and fluid typography.

Scroll Snap & Carousels

Build CSS-only carousels and galleries with scroll-snap, overflow scrolling, and progressive enhancement - without a carousel library.

Scroll-Driven Animations

Drive CSS animations from scroll progress with animation-timeline, scroll(), and view() - ranges, progressive enhancement, and when IntersectionObserver still wins.

Selectors

How CSS targets HTML elements - element, class, ID, universal, grouping, descendant, child, sibling, and attribute selectors.

Specificity & the Cascade

How CSS decides which rule wins - the cascade algorithm, specificity calculation, inheritance, the !important keyword, and cascade layers.

The Box Model

How browsers calculate element sizes using the CSS box model - content, padding, border, margin, box-sizing, and debugging with DevTools.

Transitions & Animations

CSS transitions for smooth state changes, transform functions (translate, rotate, scale, skew), keyframe animations, timing functions, and performance tips.

Units & Sizing

CSS length units - px, em, rem, percentages, viewport units, and when to use each one for font sizes, spacing, and layout.

View Transitions API

Animate between UI states with the View Transitions API - same-document transitions, view-transition names, pseudo-elements, reduced motion, and a brief look at cross-document MPA support.