From e78e2f17269d94d725180e3b2c5462fa25fc76c7 Mon Sep 17 00:00:00 2001 From: Hector A Escobedo Date: Tue, 19 Nov 2013 11:05:41 -0500 Subject: [PATCH] shared.css: Start vectorizing common icons This is in response to bug 35345. I am working under the MediaWiki Google Code-In project, and this is my first commit. I have some experience with CSS and vector images, so it seems like a good place to start. This is for the following task: https://google-melange.appspot.com/gci/task/view/google/gci2013/5795046364282880 Only the Atom feed icon has been vectorized so far, but I plan on adding more subsequently. Preliminary testing shows that this approach works fine on Firefox. Changed so that older browsers use the old PNG image, while newer ones that support gradients use the SVG. Bug: 35345 Change-Id: I842690df6934f4f14807dfc8d20ec2c0b0007df6 --- skins/common/images/feed-icon.svg | 18 ++++++++++++++++++ skins/common/shared.css | 6 +++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 skins/common/images/feed-icon.svg diff --git a/skins/common/images/feed-icon.svg b/skins/common/images/feed-icon.svg new file mode 100644 index 0000000000..0aa76f5498 --- /dev/null +++ b/skins/common/images/feed-icon.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/skins/common/shared.css b/skins/common/shared.css index ac7265a8af..f5b6231da7 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -485,7 +485,11 @@ a.new { /* feed links */ a.feedlink { /* @embed */ - background: url(images/feed-icon.png) center left no-repeat; + background-image: url(images/feed-icon.png); + background-image: linear-gradient(transparent, transparent), url(images/feed-icon.svg); + background-position: center left; + background-repeat: no-repeat; + background-size: 12px 12px; padding-left: 16px; } -- 2.20.1