Google’s latest Chrome update broke cascading style sheet layouts across websites, forcing developers to scramble for fixes. When CSS layouts break, websites render poorly and chase away traffic.
Here’s what happened with the latest Chrome update and how the AIMCLEAR web-development team restored order for our clients.
Browser updates happen all the time, and they occasionally cause unexpected problems. Agency leaders, developers and brand marketers must pay attention, as a broken user interface can negatively impact user experience and brand perception.
We discovered this issue when a client reported that parts of its website displayed incorrectly for some users on Chromium browsers. Headers and other key sections appeared unstyled or disordered, creating a disjointed visual experience. While other browsers such as Safari worked correctly, versions of Chromium, including Google Chrome and Microsoft Edge, displayed styling errors inconsistently across devices.
Our investigation followed these steps:
- Replicating: Testing revealed that the problem was intermittent, affecting only certain Chromium versions. The inconsistency made troubleshooting difficult, as some team members could not reproduce the error in Chrome.
- Clearing caches: We cleared cache layers, from those for theme and site to others for host and content delivery network, to see if outdated assets were causing the problem. But this didn’t resolve the issue.
- Resolving console errors: A common practice for browser-rendering problems includes addressing browser console errors and warnings. Errors often stem from third-party scripts and WooCommerce add-ons, but none of these were contributing to the problem.
- Comparing browser parsing: Analyzing differences in page loading between a working browser (Firefox) and a broken version (Chrome) helped identify inconsistencies. Using the DevTools HAR file export, we created HTTP archive files for comparison. Sitespeed.io’s HAR comparison tool showed no server-based CSS issues. That led us to suspect a change in Chrome’s CSS handling was the cause.
- Diagnosing: Our analysis pointed to Chrome’s handling of CSS custom properties in its version 130 update. This change in how Chrome interprets null-value custom properties altered the visual structure of certain elements on the site. Previously, Chrome stored an empty placeholder for invalid custom properties. But the recent update parsed these properties as null, impacting how the rest of the stylesheet rendered. One problematic section of CSS in the inherited code looked like this:
- Understanding: The code included improperly defined properties that became problems because of Chrome’s new behavior. The lack of an initial value led to rendering errors for dependent CSS elements. Google’s update caused these undefined custom properties to propagate issues throughout the page styling.
- Fixing: With the cause identified, we modified the CSS to remove the broken custom property definitions. After eliminating empty-value custom properties, we retested the site across devices and browsers. All styling issues were resolved, restoring a consistent look across Chromium and non-Chromium browsers. Testing on BrowserStack helped us confirm the effectiveness of the fix across browser versions and devices.
- Moving forward: The experience underscores the importance of maintaining clean, standards-compliant code. Although we inherited this code from a previous team, this issue highlights why avoiding undefined custom properties is critical. While the flawed properties caused no problems until Chrome’s recent update, they made the site vulnerable to changes outside our control.
- Adapting: Frequent browser updates, especially in Chrome, mean sites must adapt to new standards swiftly. Agencies and developers need to prioritize these critical processes:
- Ensuring that code is resilient to browser changes, especially when managing inherited or third-party code.
- Conducting regular audits of inherited codebases to mitigate the risk of issues, even if the code seems functional at present.
- Testing browser compatibility, especially when changes in core browser functionality affect visual rendering. With tools such as DevTools, HAR file exports and BrowserStack, developers can anticipate how future browser versions might handle CSS or JavaScript differently. Being prepared for disruptions ensures a quality user experience while demonstrating reliability to clients, who demand seamless functionality for their brands.
Agencies and developers must be diligent, safe and act quickly. Maintaining websites requires proactive code management and an awareness of how external updates affect performance. Fixing this update-triggered issue highlighted the need for thorough, standards-based coding practices and testing of browser compatibility.
Browser updates are a fact of life. Agencies and developers must maintain resilient code for a reliable user experience. Chrome’s latest update broke many CSS layouts. We’re betting this won’t be the last time we see this problem. We need to stay vigilant to keep our sites safe from Google’s “improvements.”