Use shorthand for matching left/right/top/bottom properties in Computed Style and CSS Style Rules panels



Other Applications
DOM Inspector
15 years ago
11 years ago


(Reporter: Jesse Ruderman, Unassigned)


(Depends on: 1 bug)

Windows XP

Firefox Tracking Flags

(Not tracked)




15 years ago
DOM Inspector should use shorthand properties when left/right/top/bottom all
match.  For example, show border-color instead of the four border-color-[side]
properties when all four match.  (I'm not asking to collapse border-width,
border-style, and border-color to border, because that would require the value
column to be wider.)

This might depend on bug 137688, "getPropertyValue on computed style does not do
shorthand properties".
"might" as in "does".  And on some mechanism for deciding that the shorthands
are showable....
bz: I don't think there's anything we can do about whether short-hand 
properties are showable or not.  I glanced at the code; it appears to just 
iterate through all the items computedStyle(element, "") returns.  The only way 
we could do that would be if these particular properties computedStyle returns 
had some JS property to tell us what others it is bound to and vice versa.
Depends on: 137688

Comment 3

15 years ago
This could be fixed without fixing bug 137688.  Just look for "-bottom" in each
property name, and if you find "-bottom", check whether properties exist and
have the same value when you replace "-bottom" with "-top", "-left", and
"-right".  If they exist and match, remove "-bottom" to get the shorthand
property name.

If you used a general mechanism from bug 137688, you might not be able to avoid
also collapsing border-color, etc. into border.
Mass re-assigning bugs to dom.inspector@extensions.bugs
Assignee: caillon → dom.inspector
Product: Core → Other Applications
Assignee: dom-inspector → nobody
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.