Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/145554
Change subject: Badges: Add PNG fallback and optimize SVG ...................................................................... Badges: Add PNG fallback and optimize SVG Change-Id: I002f8733ea6d38a3d707b38f95cc368dcc4f37a1 --- A lib/resources/images/wb-badges-default.png M lib/resources/images/wb-badges-default.svg M lib/resources/wikibase.css 3 files changed, 22 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/54/145554/1 diff --git a/lib/resources/images/wb-badges-default.png b/lib/resources/images/wb-badges-default.png new file mode 100644 index 0000000..b909a9d --- /dev/null +++ b/lib/resources/images/wb-badges-default.png Binary files differ diff --git a/lib/resources/images/wb-badges-default.svg b/lib/resources/images/wb-badges-default.svg index 79c7f20..e29a7d3 100644 --- a/lib/resources/images/wb-badges-default.svg +++ b/lib/resources/images/wb-badges-default.svg @@ -1,19 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" - width="96px" height="96px" viewBox="0 0 96 96" enable-background="new 0 0 96 96" xml:space="preserve"> -<g> - <g> - <path fill="#357AFB" d="M45.7,61.6c-2.6,0-8.6,6.1-8.6,6.1v21.9c0,0.5,0.6,0.7,0.9,0.4l7.7-7.6l7.8,7.7c0.3,0.3,0.9,0.1,0.9-0.4 - v-22C54.3,67.7,48.3,61.6,45.7,61.6z"/> - </g> - <path fill="#357AFB" d="M71.9,35.1c0-2.5-6.4-3.9-7.2-6.2c-0.8-2.3,3.6-7.3,2.2-9.2c-1.4-2-7.5,0.6-9.5-0.8c-1.9-1.4-1.3-8-3.7-8.8 - c-2.3-0.7-5.6,4.9-8.1,4.9c-2.5,0-5.9-5.7-8.1-4.9c-2.3,0.8-1.7,7.3-3.7,8.8c-2,1.4-8-1.2-9.5,0.8c-1.4,1.9,2.9,6.9,2.2,9.2 - c-0.7,2.3-7.2,3.7-7.2,6.2c0,2.5,6.4,3.9,7.2,6.2c0.8,2.3-3.6,7.3-2.2,9.2c1.4,2,7.5-0.6,9.5,0.8c1.9,1.4,1.3,8,3.7,8.8 - c2.3,0.7,5.6-4.9,8.1-4.9c2.5,0,5.9,5.7,8.1,4.9c2.3-0.8,1.7-7.3,3.7-8.8c2-1.4,8,1.2,9.5-0.8c1.4-1.9-2.9-6.9-2.2-9.2 - C65.5,39.1,71.9,37.6,71.9,35.1z M45.7,49.2c-7.8,0-14.1-6.3-14.1-14.1s6.3-14.1,14.1-14.1s14.1,6.3,14.1,14.1S53.5,49.2,45.7,49.2 - z"/> - <circle fill="#357AFB" cx="45.7" cy="35.1" r="9.4"/> +<svg xmlns="http://www.w3.org/2000/svg" +width="20" height="20" viewBox="0 0 96 96"> +<g transform="matrix(1.0741053,0,0,1.0741053,-1.0235202,-6.3870755)"> +<path fill="#357AFB" d="M45.7,61.6c-2.6,0-8.6,6.1-8.6,6.1v21.9c0,0.5,0.6,0.7,0.9,0.4l7.7-7.6l7.8,7.7c0.3,0.3,0.9,0.1,0.9-0.4 +v-22C54.3,67.7,48.3,61.6,45.7,61.6z"/> +<path fill="#357AFB" d="M71.9,35.1c0-2.5-6.4-3.9-7.2-6.2c-0.8-2.3,3.6-7.3,2.2-9.2c-1.4-2-7.5,0.6-9.5-0.8c-1.9-1.4-1.3-8-3.7-8.8 +c-2.3-0.7-5.6,4.9-8.1,4.9c-2.5,0-5.9-5.7-8.1-4.9c-2.3,0.8-1.7,7.3-3.7,8.8c-2,1.4-8-1.2-9.5,0.8c-1.4,1.9,2.9,6.9,2.2,9.2 +c-0.7,2.3-7.2,3.7-7.2,6.2c0,2.5,6.4,3.9,7.2,6.2c0.8,2.3-3.6,7.3-2.2,9.2c1.4,2,7.5-0.6,9.5,0.8c1.9,1.4,1.3,8,3.7,8.8 +c2.3,0.7,5.6-4.9,8.1-4.9c2.5,0,5.9,5.7,8.1,4.9c2.3-0.8,1.7-7.3,3.7-8.8c2-1.4,8,1.2,9.5-0.8c1.4-1.9-2.9-6.9-2.2-9.2 +C65.5,39.1,71.9,37.6,71.9,35.1z M45.7,49.2c-7.8,0-14.1-6.3-14.1-14.1s6.3-14.1,14.1-14.1s14.1,6.3,14.1,14.1S53.5,49.2,45.7,49.2 +z"/> +<circle fill="#357AFB" cx="45.7" cy="35.1" r="9.4"/> </g> -</svg> +</svg> \ No newline at end of file diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css index 2c3b622..15d00a2 100644 --- a/lib/resources/wikibase.css +++ b/lib/resources/wikibase.css @@ -956,11 +956,17 @@ } table.wb-sitelinks .wb-badge { + /* SVG support using a transparent gradient to guarantee cross-browser + * compatibility (browsers able to understand gradient syntax support also SVG). + * http://pauginer.tumblr.com/post/36614680636/invisible-gradient-technique */ + background-image: url(images/wb-badges-default.png); + /* @embed */ + background-image: -webkit-linear-gradient(transparent, transparent), url(images/wb-badges-default.svg); + /* @embed */ + background-image: linear-gradient(transparent, transparent), url(images/wb-badges-default.svg); + background-repeat: no-repeat; display: inline; padding: 7px; - /* @embed */ - background: url(images/wb-badges-default.svg) no-repeat center center; - background-size: 20px; } table.wb-sitelinks { -- To view, visit https://gerrit.wikimedia.org/r/145554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I002f8733ea6d38a3d707b38f95cc368dcc4f37a1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits