I'm developing via a fork of Ohm. While the basic main content and sidebar grid-spanning is working fine, custom use of the same singularity mixins are failing

.front .l-main.l-constrained {
  .block:nth-child(2) {
    @include grid-span(4, 1);
    }
  .block:nth-child(3) {
    @include grid-span(4, 5);
    }
  .block:nth-child(4) {
    @include grid-span(4, 9);
    }

Is producing:

.front .l-main.l-constrained .block:nth-child(2) {
  width: 100%;
  float: right;
  margin-left: 0;
  margin-right: 0;
  clear: none;
  }
.front .l-main.l-constrained .block:nth-child(3) {
  width: 100%;
  float: left;
  margin-right: -100%;
  margin-left: 106.66667%;
  clear: none;
  }

.front .l-main.l-constrained .block:nth-child(4) {
  width: 100%;
  float: left;
  margin-right: -100%;
  margin-left: 213.33333%;
  clear: none;
  }

I've tried compiling (on command line) with Sass 3.3.0.alpha.149 --compass --sourcemap --watch sass:css
and directly with Compass 0.12.2.

unfortunately neither source-maps or debugging info are working properly under omega - despite SMs working on other projects with the same config.rb - so this is difficult to debug.

Does anyone else have a similar issue or can anyone point to a way to debug/fix this?

Thanks

Comments

timoti’s picture

FWIW - on sassmeister - I get compiled:

.front .l-main.l-constrained .block:nth-child(2) {
  width: 32.20339%;
  float: left;
  margin-right: -100%;
  margin-left: 0%;
  clear: none;
  }
.front .l-main.l-constrained .block:nth-child(3) {
  width: 32.20339%;
  float: left;
  margin-right: -100%;
  margin-left: 33.89831%;
  clear: none;
  }
.front .l-main.l-constrained .block:nth-child(4) {
  width: 32.20339%;
  float: right;
  margin-left: 0;
  margin-right: 0;
  clear: none;
  }
fubhy’s picture

Issue tags: -theme, -theming, -Sass, -singularity, -omega 4, -ohm

Hey there!

Before I begin, let me point on this (@see the tags field description on the comment form)

Before adding tags read the issue tag guidelines. Do NOT use tags for adding random keywords or duplicating any other fields. Separate terms with a comma, not a space.

https://drupal.org/node/1023102

So.. To your question:

First of all, what means "Ohm Fork"? Please be careful when doing that. In general, Ohm is simply a documentation and reference theme. No more no less. Do not sub-theme Ohm as it might change, even after the stable release, for documentation purposes. It's not meant to be used in production. Not even as base theme.

You should always create your sub-themes with the Drush wizard (drush omega-wizard) and choose Omega (or your own, omeg-based base theme) as the base theme. Then, if you like certain parts of Ohm in it's current form, sure, you can copy them over, or take them as blueprints, or whatever. But don't use Ohm directly :).

Now, as it sounds that you did just that (use Ohm / copy Ohm directly), please ensure that (if you are using RVM (you should!)) that the .ruby-version and, most importantly, the .ruby-gemset file have the right content. You might be using the gems for the Ohm gemset (omega.ohm) which might be outdated if you played around with that earlier. This is just a vague guess and probably isn't correct. But everything is possible...

Also, please check the gem version of your copy of singularity, is it the same sassmeister uses?

If that is all in order, maybe you are just using the singularity functions/mixins incorrectly? Is that what you pasted here all that you are doing? Is there anything else? Any custom variables or function invocations?

timoti’s picture

Issue tags: +theme, +theming, +Sass, +singularity, +omega 4, +ohm

Thanks Sebastian, for getting back so fast.

Yes I do suspect the issue with be with my gem setup.
.

I'm a bit more designer than themer and while generally comfy CLI-wise it does seem that hardly a month goes by with yet another over arching must-have Framework To Rule Them All that must be in place before I can write a line of code. I thought I had RVM, and Bundler has never been quite right I don't think, but stuff has until now worked.

FYI My installed gems are:

addressable (2.3.4)
blend-mode (0.0.1)
breakpoint (2.0.5, 1.3)
bundler (1.3.5)
chunky_png (1.2.8, 1.2.6)
color-schemer (0.2.3)
compass (0.12.2)
compass-aurora (3.0.6, 1.1.1)
compass-normalize (1.4.3, 1.4.2)
compass-rails (1.0.3)
compass-rgbapng (0.2.1)
css_parser (1.3.4)
fssm (0.2.10, 0.2.9)
haml (4.0.3, 2.2.16)
json (1.8.0, 1.4.6)
listen (0.7.3)
modular-scale (1.0.6, 1.0.2)
rake (10.1.0)
rb-fsevent (0.9.3)
respond-to (2.6)
rubygems-update (2.0.3, 1.8.24, 1.3.7, 1.3.5)
sass (3.3.0.alpha.149, 3.2.9, 3.2.1)
sass-globbing (1.1.0)
sassy-buttons (0.1.4)
sassy-math (1.5, 1.2)
sassy-strings (0.3.1)
singularitygs (1.0.8, 0.0.17)
susy (1.0.8, 1.0.5)
term-ansicolor (1.2.1, 1.0.5)
tilt (1.4.1)
tins (0.8.0)
toolkit (1.1.1, 0.2.2)
xrefresh-server (0.3.0)
zurb-foundation (3.2.5, 3.2.4, 3.2.3, 3.0.9)

Sassmeister is singularity 1.12, and I am 1.0.8 tops - so yes that could be a problem

AND - no RVM in there - obviously, I see now that is a problem. As I said, stuff was working, I had an aversion to breaking it.
So let's see if I can manage to make this worse than it already is - But I guess that is what Time Machine is for.

I will follow up this line and make ensure the right gem versions are plugged in. It would be nice if this fixed sourcemaps too, let's see

Yes I tried the drush wizard first - really like the idea but it didn't work (can't remember the issue sorry). So I carefully forked Ohm - (not sub themed from - so I won't have a dependency there) . I had to get jiggy with Omega 4 fast (after an initial play on a side project) and I figured I could do worse than within a sample theme that has best practice OOB. And it has helped me get my head around the uber-modularity and general ethos of the thing.

But i will revisit the drush wizard later and file a separate issue if it's still less than magical.

Thanks again.

(Tags guidelines duly noted).

fubhy’s picture

Issue tags: -theme, -theming, -Sass, -singularity, -omega 4, -ohm

AND - no RVM in there - obviously, I see now that is a problem. As I said, stuff was working, I had an aversion to breaking it.
So let's see if I can manage to make this worse than it already is - But I guess that is what Time Machine is for.

The problem with "no RVM" is that it is much harder to keep a clean environment that way as everything (globally) dumps its gems in it. With RVM, every project gets its own group of gems, keeping it clean and easier to debug if things go wrong.

What system are you on? You should be able to set up the proper development stack using the documentation right here: https://drupal.org/node/1936970

There are various tutorials and walkthroughs for how to install RVM. You can find those via Google.

Note, however, that not having RVM is not the reason why the output is wrong. I guess it's the wrong singularity version. You should try to upgrade the singularity gem!

Note, too: You said "no RVM in there". I guess you meant the list of gems? Please note that RVM is not a gem. It's a wrapper around ruby and gems. You can find more information on that in the handbooks that I linked above (and on google).

But i will revisit the drush wizard later and file a separate issue if it's still less than magical.

Please do. It should fully work and it makes your life so much easier when creating sub-themes. It's also less error-prone than the manual way of doing this. If you continue to have issues, please upgrade Drush and then run "drush cc drush" (clears the drush command cache).

timoti’s picture

Cheers - and if I can just say at this point how much I'm appreciating the elegance of Omega 4.

For a variety of reasons - particularly the GUI centric approach - I was never very keen on O3, and took an unfortunate detour via one of the not-so-hot drupalisations of Zurb foundation - for a while.

But a colleague with a similar O3 aversion was forced to use O4 and came back singing it's praises - and I can see why. Great work!

fubhy’s picture

Status: Active » Fixed

Hey timoti! Did you resolve your issue? Please re-open this if it still doesn't work (just cleaning up the issue queue here and since you didn't report back recently I assume this is fixed?). :)

timoti’s picture

sorry - only just got this. Frankly no - i'm 95% sure the issue is the lack of bundler / RVM working properly on my dev platform - even if actually I'm pretty sure i'm running the right gems without the flexibility of bundler RVM. So i'm a bit stuck on that for the moment - in the meantime have been (temporarily) hacking my way around the issue.

So all I can say at this point is until my gem setup has a clean bill of health I can't say for sure where the issue really lies. Might be a few weeks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

added compass and sass versions