-
Notifications
You must be signed in to change notification settings - Fork 52
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
.ccs.scss stylesheets not importable #127
Comments
Hey @AlexB52, sorry for missing this for so long -- must have overlooked the notification at some point 😁 I think this issue come from as far down as the Sass filesystem importer from Sass here, which at least at one point sass-rails was patching to support the full extensions (but was subsequently dropped here). Unfortunately this seems like one of those silent caveats, and I feel like the rails team had a reason for dropping that support (haven't taken the time to dig into it). It should be possible if you wanted to register your own importer, but I don't think that's something I'd be interested in maintaining in middleman-sprockets. If you do go that route let me know if there's any interface that needs to be opened up to allow setting it :) |
Hm, how should one use |
Been a long time since I've looked at this, but I believe that this is the case
So if you want to output the file, use If you need both, it's a little convoluted, but two files would have about the same result Hopefully that answers your question 🤞 |
Thanks for the quick and extensive answer. The problem is, that I followed the advice middleman-sprocket prints to the command line on startup:
So after adding Sprockets 4.0 to the bundle, |
I can confirm that is how I ending up doing too:
|
Hmm, we just upgraded the main project to SassC. I wonder if that and sprockets may now be at odds. |
@SnijderC Go ahead and roll back your middleman version to 4.2.x |
@tdreyno this appears to be unsupported in non-sprockets 4.x as well, I *think* this worked in previous versions because of the inclusion of the https://github.com/petebrowne/sprockets-sass gem. I put together some examples stepping from 4.3.2 back through major versions to 3.4.1, but only saved the 3.5.1, 4.2.1, & 4.3.2 outputs https://github.com/stevenosloan/middleman-import-tests Importing a |
Oh, this is just importing? I misread. I think we should support the normal |
As a user of Middleman, I don't mind either way, though as it stands today, it appears to me the consistent pattern is to put the target extension followed by the file extension in Middleman. I would say it makes sense that it's either that all across the board: My workaround:
Also dug into |
The "output" extension, the I had to copy that same Error handler from Ruby Sass to Middleman to support SassC as well. Seems like that may be necessary over here too. |
- compass is now built in to middleman 4, including the old middleman-compass gem only creates issues with the dep graph - deal with .css.scss files being ignored by splitting into separate .css and .scss files. (middleman/middleman-sprockets#127) Closes #4613
- compass is now built in to middleman 4, including the old middleman-compass gem only creates issues with the dep graph - deal with .css.scss files being ignored by splitting into separate .css and .scss files. (middleman/middleman-sprockets#127) Closes #4613 Signed-off-by: Bryan McLellan <[email protected]>
- compass is now built in to middleman 4, including the old middleman-compass gem only creates issues with the dep graph - deal with .css.scss files being ignored by splitting into separate .css and .scss files. (middleman/middleman-sprockets#127) Closes #4613 Signed-off-by: Bryan McLellan <[email protected]>
- compass is now built in to middleman 4, including the old middleman-compass gem only creates issues with the dep graph - deal with .css.scss files being ignored by splitting into separate .css and .scss files. (middleman/middleman-sprockets#127) Closes #4613 Signed-off-by: Bryan McLellan <[email protected]>
Is this issue still ongoing? I just upgrade middleman from 4.2.1 to 4.3.4 and middleman-sprockets from 3.x to 4.1.1 and sass imports don't seem to be recognized any longer. I use a single all.css.scss file which only contains imports, as in
Those partials are named "_layout.scss", "_typography.scss" etc. but aren't processed at all since the upgrade. Should I roll back to older versions for the time being or did I miss some required adjustments during upgrading? |
@michaelfeihstel if you don’t need sprockets from JS modules, you can skip this old extension. Sass alone (which is supported directly in MM core) should handle your case above. |
Yes, I already noticed in another discussion that it's time to let go of sprockets. Sorry for bringing up this old and after all rather unrelated issue. |
I fixed this with the following change to config.rb:
|
middleman now natifvely supports scss, so we only need middleman-sprockets for coffeescript. As of this upgrade, relying on middleman-sprockets for CSS results in partials not being loaded--see middleman/middleman-sprockets#127 So in this commit I also enable middleman-sprockets only for JS so that CSS is processed directly by middleman.
Thank you, @betesh . However, I don't understand the reason it worked. |
* Update to middleman 4.4 * Update to middleman-blog 4.0 * Update to Ruby 3.0 * Get rid of compass/css3 (not needed anymore and no longer supported) * Update API for sitemap generator * Get rid of Google+ and Quora from about page * Rename blog file extensions so they are processed correctly in MM4 * Rename stylesheet file extensions so they are processed correctly in MM4 -- see middleman/middleman-sprockets#127 for details * Change previous_article to article_previous due to deprecation warning * Change next_article to article_next due to deprecation warning
Expected behavior and actual behavior
Importing a file with the extension
.css.scss
does not work. Same goes with.css.scss.erb
,.scss.erb
and.css.erb
However
.scss
alone works just fine.Any combination of
.js.coffee.erb
extensions works just fine for javascriptsSome could argue that this is not needed and I do not have any use for
css.scss.erb
.I thought this issue was part of a bigger one where I tried to access config variables in my javascripts. However that code solved it.
Steps to reproduce the problem (from a clean middleman installation) or example repo
Additional information
The text was updated successfully, but these errors were encountered: