GithubHelp home page GithubHelp logo

57u / sass-globbing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chriseppstein/sass-globbing

0.0 2.0 0.0 112 KB

Adds glob-based imports to Sass

License: MIT License

Ruby 21.17% CSS 78.83%

sass-globbing's Introduction

Sass Globbing Plugin (Doesn't work on Windows)

Sass globbing allows you to import many sass or scss files in a single import statement.

Stylesheet Syntax

Import a folder of files:

@import "library/mixins/*"

Import a tree of files:

@import "library/**/*"

Globbed files are sorted alphabetically before importing them.

Globs are always relative to the current file. The ruby glob file syntax is used, read the docs for more that you can do with it.

Installation

$ gem install sass-globbing

Use with the Sass command line

$ sass -r sass-globbing --watch sass_dir:css_dir

Use with compass

Add the following to your compass configuration:

require 'sass-globbing'

Use with Ruby on Rails

Ruby on Rails has this capability out of the box starting in Rails 3.1. Do not install this plugin if you use Rails 3.1 or greater.

Caveats

CSS is order dependent, as such, using this approach within your stylesheets to import styles that depend on the stylesheet's cascade creates an opportunity for styles to change more unpredictably than a manually asserted order. It is recommended that you only use globbing where order is unimportant; E.g. importing of library files.

sass-globbing's People

Contributors

57u avatar antife-yinyue avatar chriseppstein avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.