All tags
css
Narrow down
CSS79
- TipCSS Overview in Chrome DevTools audits the colors and fonts of a pageCaptures a report of all colors, fonts, unused declarations and media queries on a page.2 Dec 2026
- Tip
.notice:empty {CSS :empty hides elements that have no contentMatches elements with no children, so empty wrappers can be hidden or styled differently.2 Dec 2026 - Tip
Inspector > click the "grid" badgeThe grid badge in Firefox's Inspector draws your layout's lines on the pageSee grid lines, line numbers and area names directly over the page.1 Dec 2026 - Tip
Show Rendering > Paint flashingPaint flashing in DevTools shows which parts of a page repaintFind animations and widgets that redraw far more than they need to.1 Dec 2026 - Tip
.toast {The CSS linear() easing function gives transitions a bounce or springA list of points creates easing curves that cubic-bezier() cannot express.30 Nov 2026 - Tip
article { counter-reset: h2; }CSS counters number your headings 1, 1.1, 1.2 without typing the numbersSection numbers update by themselves when you add or move a heading.30 Nov 2026 - Tip
.toolbar {Gap in a CSS flexbox replaces margins between itemsSpacing goes only between items, with no margin on the first or last one.30 Nov 2026 - Tip
@font-face {size-adjust in a CSS @font-face makes the fallback font match your web fontA scaled local fallback font reduces the layout jump when the web font arrives.30 Nov 2026 - Tip
transition: scale 0.2s;The CSS translate, rotate and scale properties change one transform without losing the othersA hover scale no longer wipes out the translate that positions the element.30 Nov 2026 - Tip
content="width=device-width, initial-scale=1, viewport-fit=cover">Env(safe-area-inset-bottom) in CSS keeps buttons clear of the iPhone home barA fixed bottom bar gets extra padding only on devices with a notch or home indicator.30 Nov 2026 - Tip
tr:nth-child(even of :not([hidden])) {:nth-child(even of .visible) in CSS keeps zebra stripes right after filteringStriped rows stay alternating even when a filter hides some rows.30 Nov 2026 - Tip
text-box: trim-both cap alphabetic;Text-box: trim-both cap alphabetic in CSS removes the empty space above and below textButtons and headings get optically even padding because the font's built-in spacing is cut off.30 Nov 2026 - Tip
[popover] {Transition-behavior: allow-discrete in CSS animates a popover as it closesElements that switch to display: none can fade out instead of vanishing at once.30 Nov 2026 - Tip
::selection {::selection in CSS changes the color of text people highlightSelected text gets your own colors instead of the system blue.30 Nov 2026 - Tip
button:focus-visible {A transparent outline in CSS keeps focus visible in forced colors modeFocus styles made with box-shadow still show up for people who use a high contrast theme.30 Nov 2026 - Tip
.excerpt {-webkit-line-clamp in CSS cuts a teaser off after three linesExcerpts get the same height in a card grid, with an ellipsis at the end.30 Nov 2026 - Tip
animation-timeline: view();Animation-timeline: view() in CSS fades cards in as they scroll into viewA scroll-driven animation replaces the IntersectionObserver code for simple reveal effects.30 Nov 2026 - Tip
overflow: hidden;Text-overflow: ellipsis in CSS needs three lines, and min-width: 0 in a flex rowLong single lines end in three dots instead of overflowing, even inside flexbox.30 Nov 2026 - Tip
position: sticky;When CSS position: sticky does not stick, check the ancestors for overflowThree common reasons a sticky header or sidebar scrolls away anyway, and how to fix them.30 Nov 2026 - Tip
.page {grid-template-areas in CSS draws your page layout as textNamed grid areas make a layout readable and easy to rearrange per screen size.30 Nov 2026 - Tip
@media (prefers-contrast: more) {@media (prefers-contrast: more) in CSS adds contrast for people who ask for itSoft grey text and faint borders get stronger when the system setting asks for more contrast.30 Nov 2026 - Tip
:root {Oklch() in CSS gives you color shades that look equally lightChanging only the lightness number gives a predictable set of shades for one hue.30 Nov 2026 - Tip
user-select: all;User-select: all in CSS selects a whole command with one clickOne click on a code snippet selects all of it, ready to copy.30 Nov 2026 - Tip
background: hsl(from var(--accent) h s calc(l - 10));Relative color syntax in CSS makes a see-through or darker version of any colorRelative color syntax derives transparent or darker variants from one CSS variable.30 Nov 2026 - Tip
.footnotes li:target,:target in CSS highlights the section a link just jumped toAfter clicking a footnote or heading link, the reader sees which part the link meant.30 Nov 2026 - Tip
details:open > summary {The CSS :open pseudo-class styles a details, dialog or select while it is openOne selector covers open details, dialogs and dropdown pickers.30 Nov 2026 - Tip
interpolate-size: allow-keywords;Interpolate-size: allow-keywords lets CSS animate to height: autoPanels can slide open to their natural height without measuring them in JavaScript.30 Nov 2026 - Tip
font-synthesis: none;Font-synthesis: none in CSS stops the browser from faking bold and italicText without a real bold or italic font file stays in the designed style instead of a smeared imitation.30 Nov 2026 - Tip
a[href$=".pdf" i]::after {CSS attribute selectors like a[href$=".pdf" i] label file links automaticallyLinks to PDFs or other sites get a marker without adding classes by hand.30 Nov 2026 - Tip
all: unset;All: unset in CSS strips a button bare, so add the focus ring backOne declaration removes every browser style from an element, including some you want to keep.30 Nov 2026 - Tip
isolation: isolate;Isolation: isolate in CSS keeps a negative z-index inside its cardA new stacking context stops decorative layers from slipping behind the whole page.30 Nov 2026 - Tip
.menu-button {CSS anchor positioning places a menu next to its button without JavaScriptA dropdown or tooltip sticks to the element that opens it, and flips when space runs out.30 Nov 2026 - Tip
font-display: swap;Font-display: swap in CSS shows text right away while a web font loadsVisitors can read the page in a fallback font instead of staring at invisible text.30 Nov 2026 - Tip
.field label {:placeholder-shown in CSS builds a floating label without JavaScriptThe label moves up out of the way once a field has a value or focus.30 Nov 2026 - Tip
.tag-row {mask-image with a gradient in CSS fades out the edge of a scroll rowA gradient mask shows there is more to scroll, on any background.30 Nov 2026 - Tip
width: min(100% - 2rem, 70rem);Width: min(100% – 2rem, 70rem) in CSS is a container in one lineA centered column that stays narrow on wide screens and keeps side space on phones.30 Nov 2026 - Tip
Elements > Styles > :hov > :hover:hov in the DevTools Styles pane forces the hover state so you can edit itKeeps an element in its hover state so you can edit the matching CSS.28 Nov 2026 - Tip
@media (prefers-reduced-motion: reduce) { .hero { animation: none; }}The Rendering tab can emulate prefers-reduced-motion without touching your OS settingsMakes Chrome behave as if reduced motion is switched on, to test your CSS.28 Nov 2026 - Tip
.field:focus-within {:focus-within highlights the whole group around a focused inputStyles a container while any element inside it has keyboard focus.28 Nov 2026 - Tip
textarea {Field-sizing: content makes textareas grow with their textLets textareas and text inputs resize to fit what is typed, without JavaScript.28 Nov 2026 - Tip
ul li::marker {::marker styles list bullets without extra markupColours or replaces the bullets and numbers of a list directly in CSS.28 Nov 2026 - Tip
@media (hover: hover) {@media (hover: hover) so hover styles don't stick on touch screensApplies hover effects only on devices that can really hover, not on touch screens.28 Nov 2026 - Tip
@scope (.card) to (.card-footer) {@scope limits styles to one part of the pageApplies CSS rules only inside one element, and optionally stops at an inner boundary.28 Nov 2026 - Tip
wp scaffold child-theme my-child --parent_theme=twentytwentyone --theme_name="My child" --activatewp scaffold child-theme makes a WordPress child theme in one commandCreates a WordPress child theme so your theme changes survive updates of the parent theme.27 Nov 2026 - Tip
font-variant-numeric: tabular-nums;Font-variant-numeric: tabular-nums stops numbers from jumping aroundGives every digit the same width so timers and number columns stop shifting.27 Nov 2026 - Tip
hyphens: auto;Hyphens: auto breaks long Dutch words, as long as lang is setLets the browser hyphenate long words at the end of a line, using the page language.27 Nov 2026 - Tip
@property --fill {@property gives a CSS variable a type, so you can animate itRegisters a typed CSS variable so the browser can animate and validate it.27 Nov 2026 - Tip
@starting-style {@starting-style gives a new element a fade-in with only CSSAnimates an element from a starting value when it first appears on the page.27 Nov 2026 - Tip
@supports (display: grid) {CSS @supports applies styles only when the browser understands themWraps CSS in a feature check, so newer features get a fallback in browsers that lack them.26 Nov 2026 - Tip
input:user-invalid {CSS :user-invalid shows form errors only after the visitor has typed somethingMarks invalid form fields red only after interaction, not on an empty form that just loaded.26 Nov 2026 - Tip
object-fit: cover;CSS object-fit: cover makes images fill a box without stretchingMakes an image fill a fixed-size box, cropping the edges instead of distorting it.26 Nov 2026 - TipThe HTML popover attribute gives you a dropdown with zero JavaScriptMakes a menu or tooltip that opens and closes from a button, without writing JavaScript.26 Nov 2026
- Tip
.header {CSS backdrop-filter blurs whatever is behind an elementApplies effects such as blur to the area behind an element, for frosted glass headers and overlays.25 Nov 2026 - Tip
.card { position: relative; }CSS inset replaces top, right, bottom and left in one lineSets top, right, bottom and left of a positioned element with one shorthand property.25 Nov 2026 - Tip
place-items: center;CSS place-items: center centers content on both axes in a gridCenters items horizontally and vertically with one declaration on a grid container.25 Nov 2026 - Tip
a {CSS text-underline-offset moves an underline away from the textControls the distance between text and its underline, so links stop cutting through descenders.25 Nov 2026 - Tip
color-scheme: light dark;Color-scheme: light dark gives form controls and scrollbars a dark modeTells the browser your page supports light and dark, so default controls match the visitor's setting.23 Nov 2026 - Tip
text-wrap: balance;Text-wrap: balance keeps a heading from ending on one lonely word19 Nov 2026 - Tip
label:has(input:checked) { background: #e6f4ea; }The :has() css selector styles a parent based on its childrenSelects an element depending on what it contains, so a parent can be styled by its children.30 Jun 2026 - Tip
.hero { min-height: 100vh; /* fallback */ min-height: 100dvh; }Min-height: 100dvh in css tracks the real visible height on a phoneSizes an element to the visible screen height on mobile even while the browser toolbar moves.23 Mar 2026 - Tip
:root { color-scheme: light dark; }Light-dark() in css picks a color for the light or dark scheme in one valueChooses between a light and a dark color value without a separate media query block.22 Mar 2026 - Tip
.modal-body { overflow: auto; overscroll-behavior: contain; }Overscroll-behavior: contain stops css scroll chaining out of a modal or panelKeeps scrolling inside a panel when it reaches its end instead of moving the page behind it.22 Mar 2026 - Tip
.sidebar-list { overflow-y: auto; scrollbar-gutter: stable both-edges; }Scrollbar-gutter: stable stops css layout shift when a scrollbar appearsReserves space for the scrollbar so the layout does not shift when scrolling becomes possible.22 Mar 2026 - Tip
article p { text-wrap: pretty; }Text-wrap: pretty in css avoids a lonely last word in a paragraphAsks the browser to break paragraph lines so the final line does not hold a single orphan word.21 Mar 2026 - Tip
button:focus-visible, a:focus-visible {:focus-visible in css shows focus rings for keyboard users onlyShows the focus ring when the keyboard is used and skips it for ordinary mouse clicks.21 Mar 2026 - Tip
h2[id], h3[id] { scroll-margin-top: 5rem; }scroll-margin-top keeps anchor targets from hiding under a sticky css headerLeaves space above a link target so a fixed header does not cover it after scrolling.21 Mar 2026 - Tip
:root { accent-color: #0b6bcb; }accent-color in css recolors checkboxes, radios and sliders in one lineColors the active part of native checkboxes, radio buttons and sliders with one declaration.20 Mar 2026 - Tip
.post-card { content-visibility: auto; contain-intrinsic-size: auto 400px; }Content-visibility: auto in css skips rendering of cards that are off screenSkips layout and painting of off-screen elements to make long pages render faster.20 Mar 2026 - Tip
@media (prefers-reduced-motion: reduce) {prefers-reduced-motion in css switches off animation for people who ask for itDetects the reduced-motion setting of the operating system so animations can be switched off.20 Mar 2026 - Tip
@view-transition { navigation: auto; }@view-transition navigation: auto gives css page fades between your own pagesAnimates navigation between two same-origin pages with a cross-fade, using only a stylesheet rule.19 Mar 2026 - Tip
.card {Native css nesting with & removes the need for a preprocessorWrites child rules inside the parent rule in plain stylesheets, without Sass or a build step.19 Mar 2026 - Tip
@layer reset { a { color: inherit; } }@layer lets a css reset lose to your styles whatever the specificityGroups rules into ordered layers so the cascade order beats selector specificity.19 Mar 2026 - Tip
:root { --accent: #0b6bcb; }Color-mix() in css builds hover and tint colors from one variableBlends two colors so shades and tints can be derived from a single base color.17 Mar 2026 - Tip
.row { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; }scroll-snap-type makes a css carousel stop on each card without JavaScriptMakes a horizontally scrolling row stop neatly on each item as you swipe.16 Mar 2026 - Tip
.card { display: grid; grid-row: span 3; grid-template-rows: subgrid; }Grid-template-rows: subgrid lines up card titles and footers in css gridLets nested grid items share the tracks of the parent grid so content lines up across cards.15 Mar 2026 - Tip
h1 { font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3rem); }Font-size: clamp() in css scales text between a minimum and a maximumSets a value that grows with the window but stays between a lower and an upper limit.12 Mar 2026 - Tip
.post :is(h2, h3, h4) { margin-block-start: 2rem; }:is() shortens long css selector lists, but it takes the highest specificityGroups several selectors into one short expression, with the specificity of the strongest entry.11 Mar 2026 - Tip
:where(.prose) a { color: #0645ad; text-decoration: underline; }:where() in css gives a selector zero specificity so it is easy to overrideWraps a selector so it adds no specificity, which keeps default styles easy to override.11 Mar 2026 - Tip
.card-wrap { container-type: inline-size; }Container-type: inline-size lets css components respond to their own widthLets a component change its layout based on the width of its parent instead of the browser window.11 Mar 2026
Media1
Docker1
Posts3
Nothing matches.