Problem importing

107 views
Skip to first unread message

Justin Louie

unread,
May 22, 2012, 11:15:47 PM5/22/12
to Compass
Hey Guys,

I'm using compass with my Rails 3.2.1 app. Everything installed great
but when I try to import:

@import compass/reset
@import compass/utilities
@import compass/utilities/general/float

Only compass/reset actually produces anything, works great actually.
I've noticed:

- No errors or problems are thrown.
- If I try to change `general/float` to something random, it properly
complains

Any ideas as to why compass utilities might not load? I feel it's
simple I just don't know.

For good measure, Gemfile:

group :assets do
gem 'compass-rails'
gem 'compass_twitter_bootstrap'
gem 'sass-rails', '~> 3.2.3'
...

Thanks!
Justin

Eric Meyer

unread,
May 22, 2012, 11:49:18 PM5/22/12
to compas...@googlegroups.com
What exactly do you mean by "produces anything"? compass/reset is the only module in compass that actually has css output. The other modules simply provide you with variables, functions, and mixins. A successful import wont create any output, but it allows you to use those features.

Also: "compass/utilities" is a general import that includes "compass/utilities/general/float" - you can import one or the other, depending if you need the general or the specific, but you don't need both. Try:

@import compass/reset
@import compass/utilities

article {
  @include float(left);
}

If that works without errors, everything is as it should be.

Cheers,
-e

Alan Hogan

unread,
May 22, 2012, 11:50:32 PM5/22/12
to compas...@googlegroups.com
So Justin, would I be correct in assuming that if your application.css.sass file includes these line:

.rounded
@include border-radius(8px)

then you’ll get an error indicating that border-radius is not a defined mixin?

Or will it silently fail?

Whenever a rails 3.1 or newer app just. won’t. update. your styles, the case is usually that you did an asset precompilation and never cleared those precompiled files, which are being served as static files from /public/assets. `rake assets:clean` and `rake tmp:clear` should fix that.

Alan
> --
> You received this message because you are subscribed to the Google Groups "Compass" group.
> To post to this group, send email to compas...@googlegroups.com.
> To unsubscribe from this group, send email to compass-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/compass-users?hl=en.
>

Michael Del Tito

unread,
Jun 25, 2012, 2:40:53 PM6/25/12
to compas...@googlegroups.com
Eric,

You are correct - that syntax would be for the SASS dialect only. Using @include should work assuming you have added your imports properly. Importing  'compass/utilities' will include the definitions you are after, though if you want to be more specific you can be.

See here for more information on properly using these constructs: http://compass-style.org/reference/compass/utilities/general/float/



On Sunday, June 24, 2012 11:42:24 AM UTC-4, eric milford wrote:
I'm just starting out with Compass/SCSS and found this thread thinking that the blank import of compass/utilities might have been my issue.  I'm still trying to figure out how to include Compass' float-right on an element.  When I try +float-right, I get an error about expecting { but received ";".  Is that + syntax SASS-only?  If I try the @include approach as mentioned above, I get undefined mixing float.

section#posts {
  article {
    time {
      // float: right;
      // +float-right;
      @include float(right);
> To unsubscribe from this group, send email to compass-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages