Njw has submitted this change and it was merged. Change subject: Use svg only for decorative background-image graphics ......................................................................
Use svg only for decorative background-image graphics The stripes aren't a great loss if old browsers can't render them, so remove the .png versions. The hr would be, so use a fallback to the .png in that case. Also slightly improve the hr graphics. Change-Id: I40879b61d99a00bd6032ff7df8117e16550ae380 --- M assets/erudite.css D assets/images/Makefile M assets/images/hr.png M assets/images/hr.svg D assets/images/stripes-dark.png D assets/images/stripes.png 6 files changed, 12 insertions(+), 18 deletions(-) Approvals: Njw: Verified; Looks good to me, approved diff --git a/assets/erudite.css b/assets/erudite.css index 9fd486b..612769d 100644 --- a/assets/erudite.css +++ b/assets/erudite.css @@ -17,8 +17,7 @@ /* Use dark stripes around edge to focus on content */ #wrapper { - /* @embed */ - background: #fafafa url(images/stripes-dark.png); + background: #fafafa url(images/stripes-dark.svg); } #container { @@ -167,8 +166,7 @@ /* Header */ #header-wrap { - /* @embed */ - background-image: url(images/stripes.png); + background-image: url(images/stripes.svg); background-color: #333333; background-repeat: repeat; padding: 0.625em 0; @@ -296,9 +294,14 @@ } hr { - /* @embed */ - background: url(images/hr.png) center no-repeat; - height: 1.5em; + /* This hack ensures fallback to .png if .svg isn't supported + * (see http://css-tricks.com/svg-fallbacks/ ) */ + background-image: url(images/hr.png); + background-image: url(images/hr.svg), none; + background-position: center; + background-repeat: no-repeat; + background-size: 80% 10%; + height: 1.25em; display: block; border: none; } diff --git a/assets/images/Makefile b/assets/images/Makefile deleted file mode 100644 index 86e4485..0000000 --- a/assets/images/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# Someday browsers will all handle svg sensibly and we can then just -# serve it up directly - -all: hr.png stripes.png stripes-dark.png - -.svg.png: - rsvg-convert $< > $@ - -.SUFFIXES: .svg .png diff --git a/assets/images/hr.png b/assets/images/hr.png index 9f39445..18499d4 100644 --- a/assets/images/hr.png +++ b/assets/images/hr.png Binary files differ diff --git a/assets/images/hr.svg b/assets/images/hr.svg index 71ac0b6..a6edea9 100644 --- a/assets/images/hr.svg +++ b/assets/images/hr.svg @@ -1,7 +1,7 @@ <svg xmlns="http://www.w3.org/2000/svg" width="270" height="2"> <radialGradient id="g"> <stop offset="0" stop-color="black"/> - <stop offset="1" stop-color="white"/> + <stop offset="1" stop-opacity="0"/> </radialGradient> -<rect x="0" y="0" width="270" height="2" fill="url(#g)" opacity="0.8" /> +<rect x="0" y="-2" width="270" height="4" fill="url(#g)" /> </svg> diff --git a/assets/images/stripes-dark.png b/assets/images/stripes-dark.png deleted file mode 100644 index 4cf4e3b..0000000 --- a/assets/images/stripes-dark.png +++ /dev/null Binary files differ diff --git a/assets/images/stripes.png b/assets/images/stripes.png deleted file mode 100644 index cbd14e5..0000000 --- a/assets/images/stripes.png +++ /dev/null Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/96269 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40879b61d99a00bd6032ff7df8117e16550ae380 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/skins/erudite Gerrit-Branch: master Gerrit-Owner: Njw <nick.wh...@durham.ac.uk> Gerrit-Reviewer: Njw <nick.wh...@durham.ac.uk> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits