Last modified: 2014-02-03 16:59:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37336, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35336 - Vector: Add SVG version of magnifying-glass icon
Vector: Add SVG version of magnifying-glass icon
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.19
All All
: Low normal (vote)
: 1.23.0 release
Assigned To: Mateusz Maćkowski
gci2013 https://www.mediawiki.org/wik...
: easy
Depends on:
Blocks: hidpi 44881
  Show dependency treegraph
 
Reported: 2012-03-19 23:16 UTC by Brion Vibber
Modified: 2014-02-03 16:59 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screenshot on mediawiki.org on iPad w/ Retina display (413.84 KB, image/png)
2012-03-19 23:16 UTC, Brion Vibber
Details

Description Brion Vibber 2012-03-19 23:16:20 UTC
Created attachment 10277 [details]
Screenshot on mediawiki.org on iPad w/ Retina display

The little search icon in the search box is visibly pixelated on high-resolution screens such as third-generation iPad, or when zooming in on browsers.

Recommend using an SVG with a PNG fallback.
Comment 1 Pau Giner 2013-02-20 17:23:17 UTC
For SVG with PNG fallback we have been used the technique described at http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique

The magnifying glass icon in the language selector at http://translatewiki.net/ uses SVG graphics in this way.
Comment 2 Bartosz Dziewoński 2013-02-20 17:25:36 UTC
Pau, this has been discussed on https://gerrit.wikimedia.org/r/#/c/3687/ previously and considere non-viable. Has the situation changed that much in a year?
Comment 3 Pau Giner 2013-02-22 09:17:59 UTC
My proposed technique is slightly different than the one proposed in the patchset. This one is based in the fact that all the browsers that support CSS gradients[1] support also SVG[2].

So this is really cross-browser safe: 
background: transparent url(fallback-image.png) center center no-repeat;
background-image: linear-gradient(transparent, transparent), url(vector-image.svg);

With the above rule, only the following browsers will consider the SVG version:
IE 10, Firefox 16+, Chrome 26, Opera 12+, Opera Mobile 12.1, Firefox fr android 18.0. All of them supporting SVG.

You can even add -webkit prefix version (only with the new syntax) for the gradients and you still be safe with a wider browser support: Crome 10+, iOs safari 5.0+, Android browser 4.0+, and Blackberry browser 10.0

We tested this with crossbrowsertesting.com and used this technique for the graphics on the language selector at http://translatewiki.net/ without problems.


[1] http://caniuse.com/css-gradients
[2] http://caniuse.com/svg
Comment 4 Pau Giner 2013-02-22 09:43:15 UTC
I created a new patchset so that this can be tested: https://gerrit.wikimedia.org/r/#/c/50355/
Comment 5 Mayank Madan 2013-11-19 07:31:26 UTC
It still gets pixelated when zoomed in.
Comment 6 Gerrit Notification Bot 2013-11-23 17:34:27 UTC
Change 97307 had a related patch set uploaded by M4tx:
Added SVG version of search button icon (bug 35336).

https://gerrit.wikimedia.org/r/97307
Comment 7 Gerrit Notification Bot 2013-11-23 18:36:48 UTC
Change 97307 had a related patch set uploaded by M4tx:
Added SVG version of search button icon (bug 35336).

https://gerrit.wikimedia.org/r/97307
Comment 8 Bartosz Dziewoński 2013-11-23 20:18:01 UTC
(That patch is blocked by https://gerrit.wikimedia.org/r/#/c/82100/ being merged first. The icon is currently an <img> in page source, which makes using Pau's technique impossible.)
Comment 9 Bartosz Dziewoński 2014-02-03 16:56:42 UTC
All done now! Thanks.
Comment 10 Gerrit Notification Bot 2014-02-03 16:59:31 UTC
Change 97307 merged by jenkins-bot:
Add SVG version of search button icon

https://gerrit.wikimedia.org/r/97307

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links