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

Svg background #205

Merged
merged 4 commits into from
Feb 25, 2015
Merged

Svg background #205

merged 4 commits into from
Feb 25, 2015

Conversation

Snugug
Copy link
Member

@Snugug Snugug commented Feb 25, 2015

Moving for Linear Gradients to SVG. Based off of oddbird/susy#440 and oddbird/susy#436. Fabulous work done there and much credit to @g12n for filing the issue and doing the heavy lifting there to give me the inspiration to do it here.

Snugug added a commit that referenced this pull request Feb 25, 2015
@Snugug Snugug merged commit 2cb1f41 into 1.x.x Feb 25, 2015
@scottkellum
Copy link
Member

✨ ✨ ✨ ✨ ✨

@Snugug Snugug deleted the svg-background branch February 25, 2015 19:09
@g12n
Copy link

g12n commented Feb 26, 2015

Oh Wow! Cool!

@jakob-e
Copy link

jakob-e commented Nov 15, 2015

It may not be super important to do optimizations on a debug feature–but you can skip url-encoding by:

  1. Replacing < and > with %3C and %3E
  2. Switching single and double quotes (single quotes does not need encoding)
$SVG: "%3Csvg xmlns='http://www.w3.org/2000/svg'%3E";
  1. Replacing color hashmarks with %23
$Column-Color: $color;
$Inverse-Column-Color: mix(black, $color, 15%) + unquote("");
$Gutter-Color: mix(white, $color, 25%) + unquote("");

$Inverse-Column-Color: if(str-index($Inverse-Column-Color, '#'), '%23' + str-splice($Inverse-Column-Color, 2), $Inverse-Column-Color);
$Gutter-Color: if(str-index($Gutter-Color, '#'), '%23' + str-splice($Gutter-Color, 2), $Gutter-Color);

background-build mixin without url-encode (not tested)

Optimizing SVGs in data URIs by Taylor Hunt

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

Successfully merging this pull request may close these issues.

4 participants