开发者

Stop Firebug from consolidating css attributes

Using Firebug 1.5.4. When I a开发者_开发技巧m inspecting an element, Firebug converts declaration "padding: 10px 0 13px 0" to "padding: 10px 0 13px" in the inspection window, which bugs me. Yet it leaves "margin: 0 0 0 16px;" as is which I like. (How come it didn't consolidate that one?)

Is there a setting in Firebug to show all css attributes in expanded (none consolidated) format?


You can easily verify that Firebug is not consolidating as you think it is. Just edit an elements Style using Firebug > HTML > Style > New Property and use

padding: 2px 3px 4px 0;

You will see that Firebug does not remove the trailing 0;

My guess is that Firefox chooses not to report a zero value for the trailing values in a shorthand property. Firebug is just showing you the result.


This annoys me too! Worse, it does it semi-randomly.

For example, 2px 3px 4px 0 doesn't seem to get clipped but 10px 0 13px 0 usually does.

I haven't found any kind of setting, but one work-around is to always specify units.

10px 0 13px 0px gets rewritten to 10px 0 13px 0, which is acceptable.

.

Another workaround is to check the Expand Shorthand Properties menu item. But, this breaks "padding" into "padding-left", "padding-top", etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜