Ovo će web mjesto raditi na ograničen način, dok obavljamo održavanje stranice. Ako neki članak ne riješi tvoj problem i ako želiš postaviti pitanje, naša zajednica za podršku spremna je pomoći na Twitteru @FirefoxSupport i na Redditu /r/firefox.

Pretraži podršku

Izbjegni prevare podrške. Nikad te nećemo tražiti da nas nazoveš, da nam pošalješ telefonski broj ili da podijeliš osobne podatke. Prijavi sumnjive radnje pomoću opcije „Prijavi zlouporabu”.

Saznaj više

How can you add a new rule in the inspector?

  • 4 odgovora
  • 6 ima ovaj problem
  • 11 prikaza
  • Posljednji odgovor od ddavidd

more options

I've grown very accustomed to the Chrome developer tools, and I've recently decided to try out Firefox.

Best I can tell, you cannot add custom rules in the Firefox inspector tab. For instance, if I inspect the element on an image in Firefox, I am given all the defined styles (rules) for that element. I can, of course, edit those defined styles. However, it does not give me an option to add my own custom styles unless I jump over to the 'Style Editor' tab and write them in manually. This becomes a problem when I want to write in a quick :hover or a :first-child or reference any other selecter that's not already defined.

In Chrome, not only do I add/remove/change styles directly in the Inspector, but it also saves a custom inspector stylesheet for me with all the changes I made.

Chrome example: http://cl.ly/Wm56

Firefox example: http://cl.ly/WmUP

Is there any way to add custom styles directly from the inspector tab in Firefox?

Thanks!

I've grown very accustomed to the Chrome developer tools, and I've recently decided to try out Firefox. Best I can tell, you cannot add custom rules in the Firefox inspector tab. For instance, if I inspect the element on an image in Firefox, I am given all the defined styles (rules) for that element. I can, of course, edit those defined styles. However, it does not give me an option to add my own custom styles unless I jump over to the 'Style Editor' tab and write them in manually. This becomes a problem when I want to write in a quick :hover or a :first-child or reference any other selecter that's not already defined. In Chrome, not only do I add/remove/change styles directly in the Inspector, but it also saves a custom inspector stylesheet for me with all the changes I made. Chrome example: http://cl.ly/Wm56 Firefox example: http://cl.ly/WmUP Is there any way to add custom styles directly from the inspector tab in Firefox? Thanks!

Izabrano rješenje

Yes, that is not possible AFAIK. You can only modify a rule that way and add an extra selector by editing the file in the style editor.

Maybe file an enhancement bug to add this feature.

Pročitaj ovaj odgovor u kontekstu 👍 0

Svi odgovori (4)

more options

You will notice an element {} item at the top of the Rules list in the right plane. You can click between the curly brackets {} to enter a new inline rule for this element. You can do this within other rules {} as well. Type the colon to separate the property name and value. That is easier than adding a style attribute in the left pane or editing a style sheet file. That should work as well as rules added this way show as a style rule.


Izmjenjeno od cor-el

more options

Thanks for the reply! Unfortunately this is not what I'm asking. I have read the documentation on the link you provided, and I don't see where it specifically answers what I'm asking.

Perhaps this will help clarify: http://cl.ly/Wn4E

Is there a way to do all this within the inspector panel in Firefox? Thanks!

more options

Odabrano rješenje

Yes, that is not possible AFAIK. You can only modify a rule that way and add an extra selector by editing the file in the style editor.

Maybe file an enhancement bug to add this feature.

more options

Thanks, I just submitted feedback to Firefox.