Try a CSS fix with DevTools overrides
Use Chrome DevTools Local Overrides to test a stylesheet change in your browser before deploying it.
A production page has a CSS bug, such as note text set to white on a white card. You want to try a fix before you open a pull request, and deploying to find out costs a build and a review. Local Overrides in Chrome DevTools skip both.
An override tells DevTools to answer a request for one file with a copy saved in a folder on your disk. Your browser serves the local copy while DevTools is open. Other visitors still get the server’s file.
Pick a folder once
Make an empty folder for the copies. The first time you override something, DevTools asks you to select a folder and then asks permission to read and write it, so allow it. You can also set it up ahead of time under the Overrides tab of the Sources panel.
DevTools lists saved copies in the Overrides tab and disables the browser cache while overrides are active.
Override the file
Reload the page with the Network panel open. Right-click the stylesheet's request and pick "Override content". DevTools writes the file into your folder and opens it in the Sources panel.
The rule from my test page, as the server sends it:
.card { max-width: 24rem; margin: 2rem auto; padding: 1rem; }
.note { color: #fff; }Edit the copy in the Sources panel and save it with Ctrl+S or Cmd+S.
.note { color: #444; }Reload and the note text is dark grey on white. The Network panel puts a purple dot next to the file's Response tab. The dot marks the response as overridden.
To check the fix itself, I served the edited file in place of the original in a test browser. The note's computed colour changed from rgb(255, 255, 255) to rgb(68, 68, 68), and it stayed that way across a second reload.
Know when it is still on
An override persists across reloads until you turn it off. Untick "Enable Local Overrides" in the Overrides tab, or delete the file from the folder.
I turn it off before I look at a deploy. While the override is on, the page keeps using my copy. A deploy that fixed the bug and one that did not then look the same.
The same steps work on a script. Right-click the JavaScript file in the Network panel, edit the saved copy, and reload.
If DevTools shows a source-mapped file, override the actual network response. Once the fix works, make the equivalent change in your source repository.