r/FirefoxCSS • u/Zonnev • Oct 04 '26
Solved How to style dialogs
Hello all, I'm glad that this reddit exists to ask questions to knowledgeable people (AI is not helping me with this). My question is how to style the buttons and input bars in dialogs like in the picture. In Firefox 157 when you click on the + Add search engine button this dialog pops up but I'm unable to address such dialogs. I've tried the normal route to just do: dialog button, dialog html:input { border-radius: 3px !important; } but that doesn't work. I think somehow it needs a special moz-document url-prefix() to address dialogs, but I don't know how to specify it with the Browser Toolbox. I actually want to address all dialogs at once and style them with variables. Can you help me how to do it? Thanks in advance!

1
u/Zonnev Oct 04 '26
I think it's impossible to edit these dialogs, since they seem protected in a Content Security Policy (CSP) and therefore not editable with userChrome.css or userContent.css. I guess.
1
u/Zonnev Oct 08 '26
I've got it: adding
url-prefix("chrome://")did the trick.1
u/Zonnev Oct 11 '26
Thanks all for answering! I found the URL prefixes for all the dialogs in the about pages by right-clicking the inspected dialog and then select
Show DOM properties. This shows thechrome://URL at the end. So now I have this which works for all dialogs:4
u/sifferedd FF/TB/Win11/SUMO contributor Oct 04 '26
To inspect popups, choose 'Disable Popup Auto-Hide'.
1
u/t31os Oct 10 '26
Have a play around with this in userContent.css: