CSS files converted to Sass. Some style fixes. Created file with sponsors.

This commit is contained in:
Oleh Zasadnyy 2014-08-08 01:23:36 +03:00
parent 1a5c529669
commit a45174a1e4
851 changed files with 19814 additions and 5533 deletions

2
_sass/modules/_all.scss Normal file
View file

@ -0,0 +1,2 @@
@import "utility";
@import "web-fonts";

View file

@ -0,0 +1,31 @@
@mixin vendorize($property, $value) {
@each $prefix in -webkit-, -moz-, -ms-, -o-, '' {
#{$prefix}#{$property}: $value;
}
}
@mixin clear() {
&:before, &:after {
content: "\0020";
display: block;
height: 0;
overflow: hidden;
}
&:after {
clear: both;
}
}
@mixin hoverActiveFocus($property, $value) {
&:hover, &:active, &:focus {
#{$property}: $value;
}
}
@mixin linkColor($color) {
color: $color;
&:hover, &:active, &:focus {
color: lighten($color, $link-lighten-amount);
}
}

View file

@ -0,0 +1,91 @@
@function wf-str-replace($string, $find, $replace, $all: true) {
$index: str-index($string, $find);
@if $index {
$before: str-slice($string, 1, $index - 1);
$after: str-slice($string, $index + str-length($find), str-length($string));
$string: $before + $replace + $after;
@if $all and not str-index($find, $replace) {
$string: wf-str-replace($string, $find, $replace);
}
}
@return $string;
}
@function wf-url-encode($string) {
$replacements: (
"!": "%21",
"#": "%23",
"$": "%24",
"&": "%26",
"'": "%27",
"(": "%28",
")": "%29",
"*": "%2A",
"+": "%2B",
",": "%2C",
"/": "%2F",
":": "%3A",
";": "%3B",
"=": "%3D",
"?": "%3F",
"@": "%40",
"[": "%5B",
"]": "%5D"
);
@each $from, $to in $replacements {
$string: wf-str-replace($string, $from, $to);
}
@return $string;
}
@function wf-implode($list, $seperator: ",") {
$string: "";
@for $i from 1 through length($list) {
$el: nth($list, $i);
$string: $string + $el;
@if ($i < length($list)) {
$string: $string + $seperator;
}
}
@return $string;
}
@function wf-serialize($fonts) {
@if type-of($fonts) == 'list' or type-of($fonts) == 'arglist' {
$serialized: ();
@each $font in $fonts {
$serialized: append($serialized, wf-serialize($font));
}
@return wf-implode($serialized, "|");
}
@if type-of($fonts) == 'map' {
$serialized: ();
@each $family, $variants in $fonts {
$variants: wf-implode($variants, ",");
$variants: wf-str-replace($variants, " ", "");
$serialized: append($serialized, "#{$family}:#{$variants}");
}
@return wf-serialize($serialized);
}
@if type-of($fonts) == 'string' {
@return wf-url-encode($fonts);
}
@warn "Unsupported font type: #{type-of($fonts)}";
}
@mixin web-fonts($fonts...) {
$web-fonts-protocol: "" !default;
$protocol: $web-fonts-protocol;
@if str-length($protocol) > 0 {
$protocol: $protocol + ":";
}
$url: "#{$protocol}//fonts.googleapis.com/css?family=";
$url: $url + wf-serialize($fonts);
@import url($url);
}