Closed Bug 930045 Opened 7 years ago Closed 7 years ago

Make 'customizing' selectors more specific

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 28

People

(Reporter: mikedeboer, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Australis:M9][Australis:P5])

Attachments

(1 file, 1 obsolete file)

For example, 

```css
#main-window[customizing] .customization-target
```

could become

```css
#nav-bar[customizing="true"] > #nav-bar-customization-target
```

(beware, this seemingly simple change is not implementable with just copy-paste)
(In reply to Mike de Boer [:mikedeboer] from comment #1)
> #nav-bar[customizing="true"] > #nav-bar-customization-target
>
> (beware, this seemingly simple change is not implementable with just
> copy-paste)

Why not? What happens?
(In reply to :Gijs Kruitbosch from comment #1)
> Why not? What happens?

No clue, this selector does not seem to match (at least, not according to the DOM inspector), thus styles are not applied.
This indicates that other selector(s) take precedence and null this out. Unlikely, but this is what I've observed.
(In reply to Mike de Boer [:mikedeboer] from comment #2)
> (In reply to :Gijs Kruitbosch from comment #1)
> > Why not? What happens?
> 
> No clue, this selector does not seem to match (at least, not according to
> the DOM inspector), thus styles are not applied.
> This indicates that other selector(s) take precedence and null this out.

Err, no, the CSS rule view displays all matching rules, irrespective of whether they get overridden by later ones.

It's because there isn't a - between 'customization' and 'target' in the id, unlike the class. My mistake in my original suggestion (but then, I assumed that there was consistency). We should probably just make that consistency happen and update any rules currently using #nav-bar-customizationtarget (0 on Windows AFAICT, but maybe there are others elsewhere?)
Blocks: 895836
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Whiteboard: [Australis:M?][Australis:P?] → [Australis:M?][Australis:P5]
This wfm
Attachment #821690 - Flags: review?(mdeboer)
Gijs, can you closely examine the the moment after the enter customization mode animation finishes and after the exit customization mode animation finishes? I notice two distinct 'jumps' at the right and left edges of the window - next to the Menu Panel button, for example.
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Mike de Boer [:mikedeboer] from comment #5)
> Gijs, can you closely examine the the moment after the enter customization
> mode animation finishes and after the exit customization mode animation
> finishes? I notice two distinct 'jumps' at the right and left edges of the
> window - next to the Menu Panel button, for example.

Not right now, but it'd make sense that you see those, as the toolbar attributes get set later than the transition. So either I should leave those alone in this patch, or we should set the attributes at the same time as the transition.
Flags: needinfo?(gijskruitbosch+bugs)
Attachment #821690 - Flags: review?(mdeboer)
(In reply to :Gijs Kruitbosch from comment #6)
> Not right now, but it'd make sense that you see those, as the toolbar
> attributes get set later than the transition. So either I should leave those
> alone in this patch, or we should set the attributes at the same time as the
> transition.

One of the two... I'd opt for the solution that has the most positive effect on the animations.
I've opted to leave those refactorings out of this for noww.
Attachment #823251 - Flags: review?(mdeboer)
Attachment #821690 - Attachment is obsolete: true
Comment on attachment 823251 [details] [diff] [review]
make [customizing] selectors more specific,

Review of attachment 823251 [details] [diff] [review]:
-----------------------------------------------------------------

Looking mighty-fine!
Attachment #823251 - Flags: review?(mdeboer) → review+
https://hg.mozilla.org/projects/ux/rev/fcf3103a14f8
Whiteboard: [Australis:M?][Australis:P5] → [Australis:M9][Australis:P5][fixed-in-ux]
https://hg.mozilla.org/mozilla-central/rev/fcf3103a14f8
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:M9][Australis:P5][fixed-in-ux] → [Australis:M9][Australis:P5]
Target Milestone: --- → Firefox 28
Depends on: 963576
You need to log in before you can comment on or make changes to this bug.