Closed Bug 748341 Opened 12 years ago Closed 9 years ago

Style panels incorrectly strikeout font-size values for a series of em/%

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jwalker, Unassigned)

Details

(Whiteboard: [ruleview])

html { font-size: 90%; }
body { font-size: 90%; }
div  { font-size: 90%; }

The font-size of the div will be affected by all 3 CSS rules, however the style views display the top 2 rules with strikeout.
Component: Developer Tools → Developer Tools: Inspector
QA Contact: developer.tools → developer.tools.inspector
If a property value is a percentage then it's property in previous rules should not be overridden.
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Whiteboard: [ruleview]
The "font-size:90%" from body will have an influence on the font-size of the div, but still, the declaration won't apply to the div. It needs to be stroke out.
Crossing the property out implies that it is overridden but it isn't. Percentage values of all parents coalesce to create the actual value.
I agree, they shouldn't be crossed out.
The nature of the inheritance is different. Example:

<p><span></span></p>

p {
  font-size: 90%;
  opacity: 0.9;
}

span {
  font-size: 90%;
  opacity: 0.9;
}

We should not strike p{font-size:90%}, so we should also not strike p{opacity:0.9}?
Exactly. of course, as soon as we move from a relative value to a fixed one they should be crossed out.

If a value is crossed out then changing the values should not affect the page. If it would affect the page it should not be crossed out.
(In reply to Paul Rouget [:paul] from comment #5)
> The nature of the inheritance is different. Example:
> 
> <p><span></span></p>
> 
> p {
>   font-size: 90%;
>   opacity: 0.9;
> }
> 
> span {
>   font-size: 90%;
>   opacity: 0.9;
> }
> 
> We should not strike p{font-size:90%}, so we should also not strike
> p{opacity:0.9}?

So to me strikeout means 'not used'.

I'm not sure opacity is a fair comparison because it's a special flower; I think I could put forward an argument both ways. But % font-size is an accumulative property. The value on the p has as much to do with the final outcome as the value on the span.
(In reply to Joe Walker [:jwalker] from comment #7)
> (In reply to Paul Rouget [:paul] from comment #5)
> > The nature of the inheritance is different. Example:
> > 
> > <p><span></span></p>
> > 
> > p {
> >   font-size: 90%;
> >   opacity: 0.9;
> > }
> > 
> > span {
> >   font-size: 90%;
> >   opacity: 0.9;
> > }
> > 
> > We should not strike p{font-size:90%}, so we should also not strike
> > p{opacity:0.9}?
> 
> So to me strikeout means 'not used'.
> 
> I'm not sure opacity is a fair comparison because it's a special flower;

Why?

Let's take `width:XX%` then.

The parent is width:90%. The child is 50%.
Should you strike out parent{width:90%}? Because it has a direct influence on the absolute width.

Let's not take a percentage, but the rem unit. Should we not strike out body{font-size:12px} if the selected node use node{border:1px 0.1rem red}?

> But % font-size is an accumulative property.

Like opacity:0.5.
Like width:50%.

> The value on the p has as much to do with the final
> outcome as the value on the span.

and you say:

> So to me strikeout means 'not used'.

So many things have consequences on so many things. The rgba value of a background will have an influence on the another background. A box model of a parent node can force the box model of a child node. A width of a parent node will influence the width of a child node.

For me, strikeout means 'does not apply'. The 90% of the parent doesn't not apply to the child. It has a role on the final absolute size. But it does not apply.
I think we've got 2 different, valid definitions of what strikeout should mean:
- Is this value overridden
- Is this value used

I think the latter is a more useful concept to the user. It would be *awesome* to see all the dimension properties that contributed to the final result.

But it would also be Hard.

So in the interests of sanity, I'm thinking that we'll have to use the former definition for now.
(In reply to Joe Walker [:jwalker] (overloaded - needinfo me or ping on irc) from comment #9)
> I think we've got 2 different, valid definitions of what strikeout should
> mean:
> - Is this value overridden
> - Is this value used
> 
> I think the latter is a more useful concept to the user. It would be
> *awesome* to see all the dimension properties that contributed to the final
> result.
> 
> But it would also be Hard.
> 
> So in the interests of sanity, I'm thinking that we'll have to use the
> former definition for now.

Agreed, this is a rabbit hole that we shouldn't go down.

Filter on 1ff0543e-b501-4893-a72b-e4773c01e655
Assignee: mratcliffe → nobody
Status: ASSIGNED → NEW
Filter on 1ff0543e-b501-4893-a72b-e4773c01e655
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.