From b2f97d807beccb91017c69258fe3cdbe2622f0cf Mon Sep 17 00:00:00 2001 From: Pau Giner Date: Fri, 22 Feb 2013 10:36:55 +0100 Subject: [PATCH] Add SVG version of user icon in Vector personal portlet An SVG version of the user icon is provided only for browsers supporting SVG. To ensure browser compatibility, the SVG version is provided in a two-layer background where the first layer is a transparent gradient. The fact that browsers supporting CSS gradients are a strict subset of those supporting SVG guarantees an appropriate fallback. Embedding is used to avoid extra http requests. Bug: 35341 Change-Id: I914da0649459744ccca9e1a78e9f48fe66e1a77f --- skins/vector/images/user-icon.svg | 424 ++++++++++++++++++++++++++++++ skins/vector/screen.css | 6 + 2 files changed, 430 insertions(+) create mode 100644 skins/vector/images/user-icon.svg diff --git a/skins/vector/images/user-icon.svg b/skins/vector/images/user-icon.svg new file mode 100644 index 0000000000..767d51079b --- /dev/null +++ b/skins/vector/images/user-icon.svg @@ -0,0 +1,424 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skins/vector/screen.css b/skins/vector/screen.css index 2e09ee175b..858e997562 100644 --- a/skins/vector/screen.css +++ b/skins/vector/screen.css @@ -783,6 +783,12 @@ div#content a.external[href *=".pdf?"], div#content a.external[href *=".PDF?"], #pt-login { /* @embed */ background: url(images/user-icon.png) left top no-repeat; + /* SVG support using a transparent gradient to guarantee cross-browser + * compatibility (browsers able to understand gradient syntax support also SVG) */ + /* @embed */ + background-image: -webkit-linear-gradient(transparent, transparent), url(images/user-icon.svg); + /* @embed */ + background-image: linear-gradient(transparent, transparent), url(images/user-icon.svg); padding-left: 15px !important; text-transform: none; } -- 2.20.1