CSS Subgrid Layout Builder - Online Align Nested Grids
Design a layout where nested grids share track sizes with their parent via subgrid. Copy the complete CSS.
UD5 Toolkit
The Custom Highlight API is a modern browser feature that allows developers to highlight text programmatically without modifying the DOM structure. This API uses the Highlight object and the CSS.highlights registry to manage highlights efficiently.
Unlike traditional approaches that wrap text in span elements, the Highlight API creates range-based highlights that are rendered natively by the browser. This means better performance for dynamic highlighting scenarios such as search results, syntax highlighting, and collaborative editing.
The API is part of the CSS Highlight API specification and works alongside the ::highlight() pseudo-element. Developers can define multiple highlight groups with different priorities, and the browser handles overlap rendering automatically. Each highlight can have its own styling via the highlight pseudo-element.
Browser support for the Highlight API is growing. Chrome and Edge have supported it since version 105, while other browsers are actively implementing the specification. For applications that need to highlight text in real-time—such as find-in-page features or live search filtering—this API provides a significant performance improvement over DOM-based highlighting.
No highlight groups yet. Add one above.
Highlight objects (collections of Range or StaticRange objects) registered in the CSS.highlights registry. Styling is applied via the ::highlight() CSS pseudo-element. This approach is more performant than wrapping text in <span> elements because it doesn't trigger layout recalculations or mutate the DOM tree.
<span> or <mark> elements, which mutates the DOM. This causes layout thrashing, breaks CSS :nth-child selectors, and complicates text selection. The Custom Highlight API renders highlights as an overlay on top of the existing text, leaving the DOM untouched. This preserves event listeners, selection behavior, and avoids performance penalties during frequent updates.
::highlight() pseudo-element supports a limited subset of CSS properties: color, background-color, text-decoration (and related properties like text-decoration-color, text-decoration-style), text-shadow, -webkit-text-stroke, and text-emphasis. Properties like border, padding, margin, font-size, and animations are not supported to ensure highlights render efficiently without affecting layout.
Highlight object has a priority property (an integer). When multiple highlights overlap on the same text range, the highlight with the higher priority value is painted on top. The default priority is 0. This is useful when you have different types of highlights—for example, search matches (priority 10) should appear above syntax highlights (priority 5), which should appear above spell-check underlines (priority 1).
Range can span across multiple text nodes and elements. The Custom Highlight API handles cross-element ranges gracefully, painting the highlight continuously across element boundaries. This is a major advantage over DOM-based approaches, where wrapping text across element boundaries often requires splitting text nodes and restructuring the DOM tree.
CSS.highlights.delete('highlight-name'). To clear all highlights, use CSS.highlights.clear(). To update a highlight, simply create a new Highlight object with updated ranges and set it using the same name: CSS.highlights.set('my-highlight', newHighlight). The old highlight is automatically replaced without any DOM manipulation needed.
Design a layout where nested grids share track sizes with their parent via subgrid. Copy the complete CSS.
Create a pure CSS scroll progress indicator using animation‑timeline: scroll(). No JavaScript. Copy the complete code.
Paste your CSS and see warnings for properties that have limited browser support. Links to CanIUse. Modernize safely.
Query the permission state of camera, microphone, geolocation, and more. See the response and learn the API.
Acquire and release locks across tabs. Prevent race conditions in IndexedDB or localStorage. Visual queue and lock state.
Test the Fullscreen API: request fullscreen on a colored div, detect changes, and copy the JavaScript boilerplate.
Create complex linear gradients with any number of color stops, exact angles, and length units. Live preview and CSS code.
Paste any text and have it read aloud while each spoken word is highlighted. Improve reading focus. Web Speech API.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS text‑decoration.
Design a button or card that glows on hover. Adjust shadow color, spread, and transition. Copy the CSS. Rich UI.
Create a realistic letterpress (debossed) text effect using CSS text‑shadow and background. Adjust depth and light direction. Copy code.
Generate a subtle noise/grain texture as a CSS background pattern. Adjust opacity and size. For that film look.
Create a customizable checkerboard or grid background using pure CSS gradients. Adjust cell size and colors. Copy the code.
Upload two images and apply CSS blend modes (multiply, screen, overlay, etc.). See the result and copy the filter CSS. Pure frontend.
Add print styles like removing backgrounds, adding page breaks, setting margins. See print preview instantly.
Create a pure CSS countdown timer with a flipping number effect. Adjust duration and style. No JavaScript needed for display.
Create a glowing or rotating border animation around an element. Copy the CSS keyframes. Pure CSS magic.
Create a custom HTML/CSS progress bar with percentage, colors, and animation. Copy the code. Modern UI element.
Design a realistic neon sign text with multiple layers of glow. Copy the CSS and HTML. Perfect for headers.
A replica of the famous Flexbox Froggy game: solve alignment puzzles by writing CSS. Progress saved locally. Fun frontend learning.
Fetch a website's CSS and extract :root custom properties (‑‑color) to reveal its design token palette. For learning and inspiration.
Find safe mixing ratios for the classic elephant toothpaste demonstration. Volume adjustments for different container sizes.
Recreate the target CSS linear gradient by adjusting stops and colors. A unique game for front‑end developers to master gradients.
Browse and search all Font Awesome 6 icons with preview, class name, and unicode. Copy the HTML snippet. Perfect for web developers.
Create text with a gradient fill using CSS background-clip. Configure colors and direction. Copy the code. Works in modern browsers.
A complete, searchable list of all 140+ named HTML/CSS colors with their hex codes and color previews. Click to copy code. Essential web reference.
Visually experiment with Flexbox container and item properties. See the layout update in real time and copy the CSS. Learn by doing, fully interactive.
Minify JavaScript and CSS code to reduce file size for production. Remove whitespace and comments instantly. Run locally, your code stays private.
Easily create asymmetric border radius values and preview the result. Copy the generated CSS instantly. All interactively and browser-based.
Beautify and format your CSS stylesheets instantly. Organize, minify, or prettify CSS code for better readability. Processed securely on client-side.