The web development landscape continues its rapid evolution, with CSS at the forefront of driving more dynamic, user-friendly, and performant digital experiences. The eighteenth edition of "What’s !important" highlights a collection of recent advancements and discussions among leading CSS developers, showcasing a commitment to refining existing functionalities and introducing groundbreaking new capabilities. From enhancing subtle UI interactions to fundamentally altering how layouts are conceived and controlled, these updates underscore a period of significant innovation.
Enhancing User Interaction: The Evolution of Tooltips and Accessibility
The seemingly simple tooltip, a ubiquitous UI element, has received significant attention, with developers seeking to optimize its behavior for improved user experience and accessibility. Abhishek Jakhar initiated a crucial discussion, explaining the rationale behind delaying tooltip appearance while ensuring instant dismissal. This approach addresses a common frustration: accidental tooltip triggers when merely passing over an element, and conversely, the annoyance of a persistent tooltip that overstays its welcome after the user has moved on. Jakhar’s implementation details offered a practical guide to achieving this balance, although he prudently noted that for unusually small hover regions, a delay in dismissal might be beneficial to prevent unintentional de-triggering.
Responding to this foundational insight, Chris Coyier introduced a modern, more declarative approach utilizing "interest invokers." These experimental features, currently supported exclusively by Chrome, leverage two powerful CSS properties: interest-delay-start and interest-delay-end. These properties allow developers to define precise delays for both the activation and deactivation of UI elements based on user interaction, such as hovering. This represents a significant leap forward from JavaScript-heavy solutions, promising a more performant and maintainable method for controlling complex hover-driven interactions. While browser support remains limited, the concept aligns perfectly with progressive enhancement principles, allowing developers to implement these advanced behaviors for compatible browsers while providing robust fallbacks. Industry experts increasingly emphasize that such subtle improvements in UI elements are critical for enhancing overall user satisfaction, reducing cognitive load, and contributing to a more intuitive digital environment. The move towards native CSS solutions for these interactions signifies a broader trend in web development to offload common scripting tasks to the browser engine, leading to more efficient rendering and smoother user experiences.
Streamlining Location Services: The <geolocation> HTML Element
Accessing user location data has long been a powerful, yet complex, feature for web applications, often fraught with challenges related to permissions, hardware dependencies (GPS, Wi-Fi, cellular towers), and the intricate process of managing user consent. The traditional Geolocation API, while functional, presented developers with a steep learning curve and users with sometimes confusing permission dialogues.
The introduction of the <geolocation> HTML element aims to simplify this process considerably. This new element promises a more declarative way to request and manage location access, abstracting away much of the underlying complexity. However, its implementation introduces new considerations, notably "styling restrictions" that limit how the element’s default UI can be customized, a common trade-off when browsers provide native UI components. As with many cutting-edge features, <geolocation> is currently a Chrome-specific enhancement. Recognizing this, strategies for progressive enhancement are vital. A recommended approach involves using the <geolocation> element in conjunction with the existing Geolocation API. This allows developers to leverage the simplified approach for Chrome users while ensuring full functionality for users on other browsers through the established API. This dual strategy enables immediate adoption of the new element without compromising broader compatibility. The simplification of location access through <geolocation> could pave the way for more widespread and seamless integration of location-based services into web applications, from personalized content delivery to navigation aids, while simultaneously pushing the conversation forward on standardized, user-friendly permission models that respect privacy. Developers and privacy advocates alike are keenly observing the evolution of location APIs, seeking a balance between utility and user control, and the <geolocation> element represents a significant step in that ongoing dialogue.
Native Performance for Developers: MicroLighter and the Custom Highlight API
For developers and technical writers, presenting code snippets effectively is paramount. Traditional syntax highlighting solutions often rely on substantial JavaScript libraries, which can introduce performance overhead, particularly on content-heavy pages. Dave Rupert’s creation, MicroLighter, offers an elegant and performant alternative, leveraging the nascent Custom Highlight API.

MicroLighter is a minimalist syntax highlighter built around the ::highlight() CSS pseudo-element. The Custom Highlight API allows developers to define custom highlight ranges in the DOM and then style them directly with CSS, offloading the heavy lifting of styling code to the browser’s native rendering engine rather than relying on JavaScript to manipulate individual elements or apply classes. Rupert’s detailed guide on using MicroLighter, further discussed by Geoff Graham, underscored its simplicity and efficiency. The immediate implication is a significant reduction in page load times and improved rendering performance for websites that frequently display code. This shift from JavaScript-driven DOM manipulation to native CSS highlights represents a powerful paradigm change, offering a more semantic and performant way to achieve complex text styling. The development community is constantly seeking ways to offload rendering tasks to native browser capabilities, improving performance and user experience, and MicroLighter stands as a compelling example of this trend, promising a more accessible and faster web for developers and readers alike.
Advanced Layout Control: CSS Grid and Dynamic Interactivity
CSS Grid has revolutionized layout design, offering unparalleled power for creating complex, responsive structures. However, programmatically accessing detailed grid information within CSS itself has been a long-standing challenge. Temani Afif has brilliantly demonstrated a method to extract crucial CSS Grid information—such as the number of rows and columns, and the precise x/y coordinates of each cell—directly into CSS custom properties (variables).
This innovation unlocks a new realm of dynamic and interactive grid-based designs. While the current method requires columns to have equal widths, the foundational principle is a significant breakthrough. The ability to query and utilize layout information within CSS opens doors for sophisticated interactive effects. Afif showcased one particularly compelling application: determining "hover proximity." By combining grid coordinate data with mouse position, developers can create highly nuanced hover effects that react not just to an element being hovered, but to the user’s proximity within the grid space. This capability moves beyond static design, enabling layouts to become more reactive and intelligent without resorting to complex JavaScript calculations. The ongoing evolution of CSS, particularly in areas like grid layout, demonstrates a clear trajectory towards more powerful native solutions for complex design and interaction problems. Innovations that bridge the gap between CSS layout and dynamic interactivity are highly valued by frontend developers, enabling more creative and performant user interfaces with reduced reliance on external scripts. As CSS continues to evolve, the initial limitation of equal-width columns is likely to be addressed, further broadening the applicability of this technique.
User Preferences and Design Debates: The Dark Mode Conundrum
The widespread adoption of dark mode across operating systems and applications has sparked an interesting debate among designers and developers regarding the optimal implementation of dark mode toggles. The core of the discussion revolves around whether to offer a "two-state" (light/dark) or "tri-state" (light/dark/system-preference) option.
Lea Verou advocated for a simpler two-state approach, arguing for clarity and reducing cognitive overhead for users. Conversely, Bramus made a compelling case for a tri-state toggle, emphasizing user autonomy and respecting system-level preferences while still allowing for manual override. This debate highlights a broader tension in design: balancing simplicity with granular user control. A notable hybrid approach, favored by Vale.Rocks and described as "auto-until-overridden," seems to strike a harmonious balance. In this model, the website initially respects the user’s system-level dark mode preference (auto), but once the user manually selects either light or dark mode on the site, that preference is stored and maintained, overriding the system default until explicitly changed again. This approach caters to the majority of users who appreciate automatic adaptation while empowering those who desire specific control. User surveys consistently show a significant preference for dark mode options, driven by factors such as reduced eye strain in low-light environments, improved battery life on OLED screens, and aesthetic preferences. The discussion around dark mode implementation underscores a broader trend in web design: empowering users with greater control over their browsing environment and ensuring that design choices align with evolving user expectations and accessibility considerations.
The Future of CSS Selectors and Feature Detection
The ongoing development of CSS syntax is constantly pushing the boundaries of what’s possible, aiming for cleaner code, improved performance, and more robust feature detection. Two proposals highlighted by Bramus demonstrate this forward momentum.
Introducing the Class Prefix Selector
Current CSS practice often requires verbose attribute selectors like [class^="something-"] or [class*=" something-"] to target elements whose class names begin with a specific prefix. While functional, these selectors can be less performant and harder to read than a more direct approach. Bramus introduced the concept of a "class prefix selector," exemplified by the syntax .something-*. This proposed selector would intuitively match any class name starting with "something-", offering a cleaner, more concise, and potentially more performant alternative to existing attribute selectors. For instance, .something-* would match class="something-primary" and class="something-secondary" without the need for complex attribute selector logic. Although this feature is not yet supported by any browser, its simplicity and clear utility suggest a high likelihood of rapid adoption once proposed for standardization. Its implementation would significantly improve the maintainability and readability of large CSS codebases, particularly in projects that adhere to methodologies like BEM (Block-Element-Modifier) or utility-first CSS frameworks. The ongoing evolution of CSS syntax aims to provide developers with more expressive and efficient tools, reducing boilerplate and enhancing code clarity, and the class prefix selector aligns perfectly with this goal.

Granular Feature Detection with @supports named-feature()
The existing @supports CSS rule is invaluable for progressive enhancement, allowing developers to conditionally apply styles based on browser support for specific CSS properties or values. However, it has limitations when it comes to detecting support for highly specific, nuanced browser behaviors that aren’t tied directly to a single property-value pair. Bramus highlighted the introduction of the @supports named-feature() function, a significant enhancement to feature detection capabilities.
This new function enables querying support for "undetectable" CSS features – complex interactions or rendering behaviors that are difficult to infer from standard property checks. An example cited is detecting whether a browser correctly respects CSS transforms when anchor-positioning elements. Such granular detection is critical for deploying cutting-edge CSS features safely, ensuring that advanced UIs only render as intended in capable browsers, while providing elegant fallbacks for others. Currently supported by Chrome, @supports named-feature() represents a crucial step towards making progressive enhancement more robust and precise across the web. This innovation represents a significant step forward in making CSS feature detection more granular and powerful, crucial for adaptive web design and allowing developers to push the boundaries of user interface design with greater confidence.
Aesthetic Layouts with flex-wrap: balance
Achieving visually balanced layouts with wrapped flex items has long presented a design challenge. When flex items wrap onto multiple lines, the last line can often appear sparse or uneven, detracting from the overall aesthetic. Ahmad Shadeed discussed the exciting new flex-wrap: balance property, which addresses this issue directly.
Similar in concept to text-wrap: balance for text content, flex-wrap: balance aims to distribute wrapped flex items as evenly as possible across rows or columns. This means that instead of a single, short last line, the items will be re-arranged to create a more harmonious and visually appealing distribution across all lines. This feature, currently available in Chrome, significantly simplifies the process of creating dynamic, responsive layouts that maintain a professional and polished appearance without requiring complex JavaScript calculations or manual adjustments. Shadeed’s article elucidated its practical applications, demonstrating how it can dramatically improve the visual appeal of galleries, navigation menus, and other components where items dynamically wrap. As responsive design becomes more sophisticated, CSS is continually evolving to offer more native solutions for common layout challenges, simplifying developer workflows and enabling designers to achieve more refined aesthetics with less effort.
As the leaves begin to turn and the seasons shift, so too does the landscape of web development, with a continuous stream of innovations aimed at enhancing user experience, improving performance, and empowering developers with more expressive and efficient tools. These recent advancements in CSS and the broader web platform collectively represent a vibrant and forward-looking community dedicated to building a more capable, accessible, and beautiful web.
