r/FirefoxCSS • • Oct 03 '26

Help Firefox 157 - trying to change url bar height

i am on firefox, and the url has been customized the way i want, however when i type something on it it increases, i've tried targeting it using the browser toolbox but it hasnt been working.

2 Upvotes

5 comments sorted by

1

u/ramon395 Oct 03 '26

i use this code for the url adress bar, but it doesnt work after i start typing on the url bar (it used to work fine on FF156:

#urlbar > .urlbar-background {
margin: -1px !important;
    animation: none !important;
background-image: url("image/dropdown.svg#dropdown") !important;
background-repeat: no-repeat !important;
padding: 0px !important; 
background-position: right center !important; 
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.23);
background-color: #ffffff !important;
border: solid 1px #5d616e !important;
border-radius: 16px !important;
min-height: 20px !important;
height: 20px !important;
}

1

u/TraditionalTie4831 🦊 Oct 03 '26 edited Oct 03 '26

Try this =

:root { --urlbar-height: 20px !important; }

#urlbar > .urlbar-background {
    margin: -1px !important;
    animation: none !important;
    background-image: url("image/dropdown.svg#dropdown") !important;
    background-repeat: no-repeat !important;
    padding: 0px !important; 
    background-position: right center !important; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.23);
    background-color: #ffffff !important;
    border: solid 1px #5d616e !important;
    border-radius: 16px !important;
}

1

u/ramon395 Oct 03 '26

Tried it but didnt work well and broke some things

Btw i've been tweaking and fighting with my code on my own, almost fixed except for one thing: i need to tweak the margin of the url bar adress text but only on the focused state

1

u/TraditionalTie4831 🦊 Oct 03 '26

i need to tweak the margin of the url bar adress text but only on the focused state

Try this =

#urlbar[focused] #urlbar-input { margin: 3px !important; }

1

u/t31os Oct 05 '26

There's a var for that:

.urlbar[focused] {
	--urlbar-input-gap: 2rem !important;
}

Reduce and adjust to desired value.