Skip to content

Instantly share code, notes, and snippets.

@jxnblk
Created February 4, 2014 20:15
Show Gist options
  • Save jxnblk/8811461 to your computer and use it in GitHub Desktop.
Save jxnblk/8811461 to your computer and use it in GitHub Desktop.
Simpler, more performant styles for Symbolset icons
/*
* Cleaner Symbolset styles
* Edited for front-end performance by Jxnblk
*
* - Removed all adjoining selectors
* - Removed slow ^= and *= selectors
* - Removed .right functionality
* - Removed ligature functionality
*
*/
$webfont: 'ss-geomicons-squared' !default;
$webfont-name: 'SSGeomiconsSquared' !default;
$webfont-path: '/webfonts/' !default;
@font-face {
font-family: "#{$webfont-name}";
src: url('#{$webfont-path}#{$webfont}.eot');
src: url('#{$webfont-path}#{$webfont}.eot?#iefix') format('embedded-opentype'),
url('#{$webfont-path}#{$webfont}.woff') format('woff'),
url('#{$webfont-path}#{$webfont}.ttf') format('truetype'),
url('#{$webfont-path}#{$webfont}.svg##{$webfont-name}') format('svg');
font-weight: 400;
font-style: normal;
}
// If you're using more than one Symbolset font, remove the .ss-icon selector
.ss-icon:before,
#{$webfont}:before {
font-family: "#{$webfont-name}";
font-style: normal;
font-weight: 400;
text-decoration: none;
white-space: nowrap;
-webkit-font-smoothing: antialiased;
// Hack for better vertical alignment (optional)
position: relative;
top: .1875em;
}
// Put the rest of the Symbolset CSS file here. I recommend removing the adjoining .right selectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment