Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PoC] inline svg files #4059

Closed
wants to merge 1 commit into from
Closed

[PoC] inline svg files #4059

wants to merge 1 commit into from

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Mar 25, 2017

Saves loading a lot of resources. And since the css file is cached
anyway this can save precious seconds.

Todo:

  • CI job to check
  • Look for more files to use
  • Some places we use background-url but in some places we still use img stags. The img tags can't be repalced by this method.

Files so far:

  • icons.scss

@ChristophWurst as discussed.

Saves loading a lot of resources. And since the css file is cached
anyway this can save precious seconds.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* @copyright Copyright (c) 2015, Hendrik Leppelsack <hendrik@leppelsack.de>
* @copyright Copyright (c) 2015, Jan-Christoph Borchardt <hey@jancborchardt.net>
*
* @license GNU AGPL version 3 or any later version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a message here saying: "This file is automatically generated"?

@@ -0,0 +1,32 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also execute this on CI and throw an error if there is a change. 😉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah was thinking about that as well of course

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some refinements, but looks good code wise :)

@MorrisJobke
Copy link
Member

This alone removes 13 of 129 requests of the files app (10%) 🙌

@MorrisJobke
Copy link
Member

MorrisJobke commented Mar 28, 2017

May be an alternative to #3385

@jancborchardt
Copy link
Member

We would need a way that the »build process« for this is automated. Also, the icons.scss file has other things than just .svg links. :)

@rullzer
Copy link
Member Author

rullzer commented Mar 29, 2017

Lets kill this. We can only do this properly if we would have a compile step or something for it (like scss or javascript). For now not worth it I think...

@rullzer rullzer closed this Mar 29, 2017
@rullzer rullzer deleted the img-in-css branch March 29, 2017 17:30
@jancborchardt
Copy link
Member

Ref #1066 if we want to work on anything like that again. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants