From: Pau Giner Date: Fri, 22 Feb 2013 09:36:55 +0000 (+0100) Subject: Add SVG version of user icon in Vector personal portlet X-Git-Tag: 1.31.0-rc.0~20052^2 X-Git-Url: http://git.cyclocoop.org//%22%22.url_de_base%28%29.%22/%22?a=commitdiff_plain;h=b2f97d807beccb91017c69258fe3cdbe2622f0cf;p=lhc%2Fweb%2Fwiklou.git 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 --- 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; }