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

Allow more permissive globs #360

Closed
ruipserra opened this issue Jan 7, 2016 · 0 comments
Closed

Allow more permissive globs #360

ruipserra opened this issue Jan 7, 2016 · 0 comments

Comments

@ruipserra
Copy link

Hi everyone,

Currently, the README states the following:

Any valid ruby glob may be used.

In sass-rails 4.x this used to be the case. For example, we could structure our project like this:

/* application.scss */

@import "components/**/base.scss";

@media #{$small-mq} {
  @import "components/**/small.scss";
}

@media#{$medium-mq} {
  @import "components/**/medium.scss";
}

@media #{$large-mq} {
  @import "components/**/large.scss";
}

This organization let us manage our scss components quite easily and logically. Cascade order is explicitly stated, and creating a new component is just a matter of following the convention, eg. creating a file component/foo/base.scss.

However, in version 5 (actually since #284), glob syntax is limited to patterns ending in /* or /**/*. This PR provides additional context for the change.

While I understand that supporting any allowed ruby glob pattern may be tricky due to dependency tracking, it would be quite useful if the importer accepted more permissive glob patterns, such as the example above.

On the other hand, the README should clearly document glob restrictions.

Would love to get feedback on this. Thank you.

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

No branches or pull requests

2 participants