Closed
Bug 1295947
Opened 9 years ago
Closed 9 years ago
Use filter and fill properties instead of duplicating lots of SVG and CSS for the tab audio icon
Categories
(Firefox :: Theme, defect)
Firefox
Theme
Tracking
()
RESOLVED
FIXED
Firefox 51
| Tracking | Status | |
|---|---|---|
| firefox51 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
Details
Attachments
(1 file, 2 obsolete files)
|
25.92 KB,
patch
|
Gijs
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8781970 -
Flags: review?(gijskruitbosch+bugs)
Comment 1•9 years ago
|
||
This review would be a lot quicker if you can give me a paragraph of description of what the thrust of the tab-audio related changes is, instead of me trying to reverse-engineer it from the patch, given that neither the patch nor the bug has any real description beyond "refactor styling for X" which might as well be "change the code involving X", which isn't very useful.
Flags: needinfo?(dao+bmo)
| Assignee | ||
Comment 2•9 years ago
|
||
(In reply to :Gijs Kruitbosch (PTO recovery mode) from comment #1)
> patch nor the bug has any real description beyond "refactor styling for X"
> which might as well be "change the code involving X", which isn't very
> useful.
It was supposed to mean "clean up and simplify the code while maintaining the outcome." The outcome isn't actually the same, but should be roughly as good as it was or better (e.g. in the selected tab on Linux).
I didn't expand on how I simplified the code since I thought a look at the patch would make it obvious that I'm deleting most of the icon variants and use filter and fill instead.
Flags: needinfo?(dao+bmo)
| Assignee | ||
Comment 3•9 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #2)
> (In reply to :Gijs Kruitbosch (PTO recovery mode) from comment #1)
> > patch nor the bug has any real description beyond "refactor styling for X"
> > which might as well be "change the code involving X", which isn't very
> > useful.
>
> It was supposed to mean "clean up and simplify the code while maintaining
> the outcome." The outcome isn't actually the same, but should be roughly as
> good as it was or better (e.g. in the selected tab on Linux).
>
> I didn't expand on how I simplified the code since I thought a look at the
> patch would make it obvious that I'm deleting most of the icon variants and
> use filter and fill instead.
I also got rid of the "pressed" states since the slight opacity change seemed basically invisible anyway.
Comment 4•9 years ago
|
||
Comment on attachment 8781970 [details] [diff] [review]
patch
Review of attachment 8781970 [details] [diff] [review]:
-----------------------------------------------------------------
r- for regressing the outline/shadow on the icon.
::: browser/themes/shared/tabs.inc.css
@@ +145,5 @@
>
> .tab-icon-overlay[soundplaying],
> .tab-icon-overlay[muted]:not([crashed]) {
> + list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-small);
> + filter: url(chrome://browser/skin/filters.svg#fill) drop-shadow(1px 1px 1px white);
This doesn't work as well as the actual white outline that's in the SVG:
http://imgur.com/a/iuwY3
(top is current beta, bottom is nightly with your patch)
@@ +156,5 @@
>
> .tab-icon-overlay[soundplaying]:hover,
> .tab-icon-overlay[muted]:not([crashed]):hover {
> background-color: white;
> + border-radius: 10px;
If I do this:
http://jsbin.com/yijimoxidi/edit?html,css,output
I see flickering when hovering the corners that would be out of the 'hover'able area when the border radius is applied.
It's harder to reproduce on a pinned tab but I do see oddness about the hover region. Can we just keep the border-radius in the non-hover rule?
::: browser/themes/windows/browser.css
@@ +2225,5 @@
> + fill: currentColor;
> +}
> +
> +.alltabs-endimage[muted] {
> + list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-muted);
Can we move this into tabs.inc.css as well, as it's now identical between the 3 OS themes?
Attachment #8781970 -
Flags: review?(gijskruitbosch+bugs) → review-
| Comment hidden (obsolete) |
Comment 6•9 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #2)
> (In reply to :Gijs Kruitbosch (PTO recovery mode) from comment #1)
> > patch nor the bug has any real description beyond "refactor styling for X"
> > which might as well be "change the code involving X", which isn't very
> > useful.
>
> It was supposed to mean "clean up and simplify the code while maintaining
> the outcome." The outcome isn't actually the same, but should be roughly as
> good as it was or better (e.g. in the selected tab on Linux).
>
> I didn't expand on how I simplified the code since I thought a look at the
> patch would make it obvious that I'm deleting most of the icon variants and
> use filter and fill instead.
I mostly noticed most of the icons were gone and you were unifying soundplaying and muting rules, and then also touched unrelated things like the crashed icon, so I was confused. IMHO, it would be more precise to title the patch/bug/description with something along the lines of "Use filter and fill properties instead of duplicating lots of SVG and CSS for the tab audio icon".
Comment 7•9 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #5)
> (In reply to :Gijs Kruitbosch (PTO recovery mode) from comment #4)
> > @@ +156,5 @@
> > >
> > > .tab-icon-overlay[soundplaying]:hover,
> > > .tab-icon-overlay[muted]:not([crashed]):hover {
> > > background-color: white;
> > > + border-radius: 10px;
> >
> > If I do this:
> >
> > http://jsbin.com/yijimoxidi/edit?html,css,output
> >
> > I see flickering when hovering the corners that would be out of the
> > 'hover'able area when the border radius is applied.
> >
> > It's harder to reproduce on a pinned tab but I do see oddness about the
> > hover region. Can we just keep the border-radius in the non-hover rule?
>
> I can but the behavior you're seeing doesn't seem to make sense, because the
> background and border-radius changes should apply simultaneously, and would
> be a Gecko bug (which I don't think I see in your jsbin example.)
Clarified this on IRC.
| Assignee | ||
Comment 8•9 years ago
|
||
(In reply to :Gijs Kruitbosch (PTO recovery mode) from comment #4)
> Comment on attachment 8781970 [details] [diff] [review]
> patch
>
> Review of attachment 8781970 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> r- for regressing the outline/shadow on the icon.
>
> ::: browser/themes/shared/tabs.inc.css
> @@ +145,5 @@
> >
> > .tab-icon-overlay[soundplaying],
> > .tab-icon-overlay[muted]:not([crashed]) {
> > + list-style-image: url(chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-small);
> > + filter: url(chrome://browser/skin/filters.svg#fill) drop-shadow(1px 1px 1px white);
>
> This doesn't work as well as the actual white outline that's in the SVG:
>
> http://imgur.com/a/iuwY3
>
> (top is current beta, bottom is nightly with your patch)
Replicating this with drop-shadow seems tricky since the spread radius parameter isn't supported. I removed this from the patch for now.
Attachment #8781970 -
Attachment is obsolete: true
Attachment #8782021 -
Flags: review?(gijskruitbosch+bugs)
| Assignee | ||
Updated•9 years ago
|
Summary: Refactor .tab-icon-sound / .tab-icon-overlay styling → Use filter and fill properties instead of duplicating lots of SVG and CSS for the tab audio icon
Comment 9•9 years ago
|
||
Comment on attachment 8782021 [details] [diff] [review]
patch v2
Review of attachment 8782021 [details] [diff] [review]:
-----------------------------------------------------------------
Closer, but I noticed some issues on devedition and would like to know more about the tab-icon-overlay selector changes.
::: browser/themes/shared/tabs.inc.css
@@ +161,5 @@
> list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-muted");
> }
>
> +.tab-icon-overlay[soundplaying]:-moz-lwtheme-brighttext:not(:hover),
> +#TabsToolbar[brighttext] .tab-icon-overlay[soundplaying]:not([selected]):not(:hover) {
I confess I don't quite follow why these changes are necessary. Can you clarify?
@@ +209,5 @@
> }
>
> +.tab-icon-sound:-moz-lwtheme-darktext[soundplaying],
> +.tab-icon-sound:-moz-lwtheme-darktext[muted] {
> + filter: url(chrome://browser/skin/filters.svg#fill) drop-shadow(1px 1px 1px white);
This looks bad on the selected tab on light devedition, where the background is blue, the icon is white, and now the dropshadow is also white (as your patch is replacing the dark stroke with the white dropshadow). It also looks bad on both selected and unselected tabs on dark devedition. Seems like maybe we could put the color in a CSS variable and set it for dark/light lwthemes and then override it for light/dark deveditions? That or just write several extra rules for devedition (both light and dark devedition match -moz-lwtheme-darktext because they're the same lwtheme).
Attachment #8782021 -
Flags: review?(gijskruitbosch+bugs)
| Assignee | ||
Comment 10•9 years ago
|
||
(In reply to :Gijs Kruitbosch (PTO recovery mode) from comment #9)
> ::: browser/themes/shared/tabs.inc.css
> @@ +161,5 @@
> > list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-muted");
> > }
> >
> > +.tab-icon-overlay[soundplaying]:-moz-lwtheme-brighttext:not(:hover),
> > +#TabsToolbar[brighttext] .tab-icon-overlay[soundplaying]:not([selected]):not(:hover) {
>
> I confess I don't quite follow why these changes are necessary. Can you
> clarify?
The selected tab is opaque and connects with the nav bar, so #TabsToolbar[brighttext] isn't a useful hint in that context.
> (both light and dark devedition match
> -moz-lwtheme-darktext because they're the same lwtheme).
*sigh* Someone should probably fix that.
| Assignee | ||
Comment 11•9 years ago
|
||
Attachment #8782021 -
Attachment is obsolete: true
Attachment #8782533 -
Flags: review?(gijskruitbosch+bugs)
Updated•9 years ago
|
Attachment #8782533 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 12•9 years ago
|
||
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb97f65f521d
Use filter and fill properties instead of duplicating lots of SVG and CSS for the tab audio icon. r=gijs
Comment 13•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
You need to log in
before you can comment on or make changes to this bug.
Description
•