Page MenuHomePhabricator

Allow SVG for wiki-logo
Closed, ResolvedPublic

Description

Hi please add support for svg in logo with fallback to png if the browser or screen dosent support svg please.

Event Timeline

Paladox raised the priority of this task from to Needs Triage.
Paladox updated the task description. (Show Details)
Paladox added a project: MediaWiki-Core-Team.
Paladox added a project: Vector (legacy skin).
Paladox set Security to None.
Paladox subscribed.
Aklapper triaged this task as Lowest priority.Jan 8 2015, 10:50 PM

It has to do with

/**

  • @param $context ResourceLoaderContext
  • @return array
	 */

public function getStyles( ResourceLoaderContext $context ) {

		$logo = $this->getConfig()->get( 'Logo' );
		$styles = parent::getStyles( $context );
		$styles['all'][] = '.mw-wiki-logo { background-image: ' .
			CSSMin::buildUrlValue( $logo ) .
			'; }';

		return $styles;

}

in file ResourceLoaderSkinModule.php. The file should use less and then add .background-image.svg( ) and in $logo in localsettings.ph do something like $logo = 'image.svg', 'image.png';

@Paladox: Do not add random projects to tasks.

Change 193434 had a related patch set uploaded (by Paladox):
Add support for svg with png fallback for logo

https://gerrit.wikimedia.org/r/193434

McZusatz renamed this task from Add support for svg in logo to Allow SVG for wiki-logo.Aug 2 2015, 3:31 PM

What's going on? Is there any negative review making it stuck? Or still waiting for any review?

This https://gerrit.wikimedia.org/r/#/c/193434/ works, this will allow us to use svg images on Wikipedia whilst falling back to png on browsers that doint support svg :).

@Dvorapa hi, it is almost ready, need @Legoktm to take another look at the patch I just updated now and if he says it is ok, it can then be merged :)

Screen Shot 2016-10-10 at 01.04.04.png (388×516 px, 39 KB)

Mostly for reference on gerrit...

Screen Shot 2016-10-10 at 01.13.16.png (236×804 px, 72 KB)

Screen Shot 2016-10-10 at 01.21.42.png (844×2 px, 457 KB)

Change 193434 had a related patch set uploaded (by Paladox):
[mediawiki/core] Add support for svg with png fallback for logo

https://gerrit.wikimedia.org/r/193434

Change 193434 had a related patch set uploaded (by Paladox; owner: Paladox):
[mediawiki/core@master] Add support for svg with png fallback for logo

https://gerrit.wikimedia.org/r/193434

Paladox raised the priority of this task from Lowest to Medium.May 23 2017, 9:54 PM

Changing priority due to activity on the patch. Looks to be merged soon once one problem is resolved on the patch :)

Change 193434 merged by jenkins-bot:
[mediawiki/core@master] Add support for SVGs to $wgLogoHD with PNG fallback

https://gerrit.wikimedia.org/r/193434

Paladox claimed this task.
Paladox removed a project: Patch-For-Review.