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

Use external URLs in PNG data URI stylesheet if the data URI would be greater than 32,768 chars #26

Merged
merged 2 commits into from Feb 19, 2013

Conversation

Projects
None yet
3 participants
@keeganstreet
Contributor

keeganstreet commented Feb 18, 2013

Implemented feature request #25

keeganstreet added some commits Feb 18, 2013

Added some SVGs to the image source folder. gummy-bears-1 is 32750 ch…
…aracters when converted to a PNG data URI. gummy-bears-2 is 32826 characters, which is over IE8's limit of 32768, so it does not display.
Using URL references in PNG data URI stylesheet where the data URI wo…
…uld have been longer than 32768 characters, as this length data URI is not supported in IE8.
@scottjehl

This comment has been minimized.

Show comment
Hide comment
@scottjehl

scottjehl Feb 18, 2013

Member

wow, I like this idea.

hey @zachleat - might you have a sec to review this this week?

On Feb 18, 2013, at 6:04 AM, Keegan Street notifications@github.com wrote:

Implemented feature request #25

You can merge this Pull Request by running

git pull https://github.com/keeganstreet/grunticon master
Or view, comment on, or merge it at:

#26

Commit Summary

Added some SVGs to the image source folder. gummy-bears-1 is 32750 characters when converted to a PNG data URI. gummy-bears-2 is 32826 characters, which is over IE8's limit of 32768, so it does not display.
Using URL references in PNG data URI stylesheet where the data URI would have been longer than 32768 characters, as this length data URI is not supported in IE8.
File Changes

A example/source/gummy-bears-1.svg (33)
A example/source/gummy-bears-2.svg (33)
M tasks/grunticon/phantom.js (11)
Patch Links:

https://github.com/filamentgroup/grunticon/pull/26.patch
https://github.com/filamentgroup/grunticon/pull/26.diff

Member

scottjehl commented Feb 18, 2013

wow, I like this idea.

hey @zachleat - might you have a sec to review this this week?

On Feb 18, 2013, at 6:04 AM, Keegan Street notifications@github.com wrote:

Implemented feature request #25

You can merge this Pull Request by running

git pull https://github.com/keeganstreet/grunticon master
Or view, comment on, or merge it at:

#26

Commit Summary

Added some SVGs to the image source folder. gummy-bears-1 is 32750 characters when converted to a PNG data URI. gummy-bears-2 is 32826 characters, which is over IE8's limit of 32768, so it does not display.
Using URL references in PNG data URI stylesheet where the data URI would have been longer than 32768 characters, as this length data URI is not supported in IE8.
File Changes

A example/source/gummy-bears-1.svg (33)
A example/source/gummy-bears-2.svg (33)
M tasks/grunticon/phantom.js (11)
Patch Links:

https://github.com/filamentgroup/grunticon/pull/26.patch
https://github.com/filamentgroup/grunticon/pull/26.diff

@zachleat

This comment has been minimized.

Show comment
Hide comment
@zachleat

zachleat Feb 18, 2013

Member

Sure thing, I'll have a gander

Member

zachleat commented Feb 18, 2013

Sure thing, I'll have a gander

@zachleat

This comment has been minimized.

Show comment
Hide comment
@zachleat

zachleat Feb 19, 2013

Member

This looks great to me. Looks like it only does this for the PNG data URI stylesheet (for browsers that don't support SVG but do support data uris, IE8). According to this stack overflow post (http://stackoverflow.com/questions/695151/data-protocol-url-size-limitations), it looks like the SVG sprite sheet data URIs are probably safe up to 2MB.

Great stuff, will merge.

Member

zachleat commented Feb 19, 2013

This looks great to me. Looks like it only does this for the PNG data URI stylesheet (for browsers that don't support SVG but do support data uris, IE8). According to this stack overflow post (http://stackoverflow.com/questions/695151/data-protocol-url-size-limitations), it looks like the SVG sprite sheet data URIs are probably safe up to 2MB.

Great stuff, will merge.

zachleat added a commit that referenced this pull request Feb 19, 2013

Merge pull request #26 from keeganstreet/master
Use external URLs in PNG data URI stylesheet if the data URI would be greater than 32,768 chars

@zachleat zachleat merged commit beea69e into filamentgroup:master Feb 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment