Skip to content

FloNeu/sass-icon-font-importer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAUTION: USE NEW FOUNDICON-PACKAGE from

The package now got some great sass-configuration-files/mixings available which basically allows the similar functionality as these mixings, and i recommand to use them instead!!!

Sass-Icon-Font-Importer

Mixing used to import multiple icon-fonts in comfortable, configurable way. In example for use-cases like on the foundation font-icons playground-page. ( http://zurb.com/playground/foundation-icons )

Notes

TODOs:

  • Testing of icon classes in ie7
  • Demo-Page

Prerequisites

  • Foundation Icons - Download and Install from Github or Foundation Playground. You can also require the Package via Bower if you have it installed in your project.
  • (Recommended for Linux/Mac)
    • Git - Download and Install Git
  • (Recommended for Windows)
    • Msysgit - Download and Install Msysgit providing Git and Unix-Shell for Windows

Configuration

See the Config File, which should be pretty much self-explaining. Basically the names of the icon-styles are matched together with the index the according icons have in the font.

Quick Install

  • Open your Unix-Shell and change into the directory you want the project to be cloned to and then clone the project to your local drive:

    $ git clone https://github.com/FloNeu/sass-icon-font-importer.git

  • Open the sass-file( like app.scss or styles.scss ) you want the mixings imported to and include the icon-font importers main-file.

    @import "./path/to/mixing/sass-icon-font-importer/iconFontImporter";

  • Then use this scss-snippet to call the mixing to create the the css needed for using the icon-fonts, according to your configuration.

    // Imports only foundation social icon-font
    $icon-fonts-to-import: (
        "social"
        , "general"
        , "general-enclosed"
        , "accessability"
    );
    @include icon-font-importer( 
      $icon-fonts-to-import // Collection of font-keys to import
      , "true" // Enables IE7 support, "false" is default and disables IE7 support
    );
    
remove unused font-identifiers from $icon-fonts-to-import collection and the according
css will not be generated at compile time.

* This will create all css needed to use the configured icon-font in a similar manner as seen
  on [Zurb Foundation Playground](http://zurb.com/playground/foundation-icon-fonts-3).

## Further usage
* Edit the mixings configuration-file to make it fit your needs, and link to the 
  font-files located in the original repository-folder.

## License
[MIT License (MIT)](http://opensource.org/licenses/MIT)
Copyright (c) 2013 Florian Neumann

About

Mixings used to import multiple foundation-icon-fonts in a none conflicting way ( https://groups.google.com/forum/#!topic/foundation-framework-/Jj9zfn-IQbs )

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages