Hey,

I found out that importing both @import "base/_base"; and @import "base/**/*"; declare the css out of _base twice.
Is it really needed to declare the specific _base and _typography scss files again?

Cheers,
Tom

Comments

fubhy’s picture

Category: Bug report » Support request
Status: Active » Fixed

I don't know what you mean. We never do that in Omega, Ohm or the starterkit. Where have you seen that? (First of all, where did you see the two import types (with wildcards and without for the same folder structure) in the same place and secondly, where did you see @import "base/_base"; (with the leading underscore for _base - That's not needed and certainly not used anywhere in Omega).

We always use wildcard/globbing imports. And even if we didn't we would never use @import "foo/_bar.scss"; but rather plain @import "foo/bar"; (both do the same but the second variant is the prefered syntax for importing partials (underscore prefixed files)). Those partials are special - Please read the Compass documentation on Partials for more information regarding that.

Also, I would suggest you read up on how sass-globbing works (the wildcard imports) because that's the preferred way of doing this (automagic).

betz’s picture

Very weird. I just generated a new subtheme in another drupal installation with drush.

Beginning to build libraries.make.                                                      [ok]
selectivizr downloaded from https://github.com/fubhy/selectivizr/archive/master.zip.    [ok]
html5shiv downloaded from https://github.com/fubhy/html5shiv/archive/master.zip.        [ok]
respond downloaded from https://github.com/fubhy/respond/archive/master.zip.            [ok]
matchmedia downloaded from https://github.com/fubhy/matchmedia/archive/master.zip.      [ok]
pie downloaded from https://github.com/fubhy/pie/archive/master.zip.                    [ok]
You have successfully created the theme test (test) in sites/all/themes.

Now, in the sass folder of my 'test' subtheme, I find the test.styles.scss file.
This is the content:

// Import external libraries.
@import "compass";
@import "breakpoint";
@import "singularitygs";
@import "toolkit-no-css";

// Import variables, abstractions, base styles and components using globbing.
//
// Globbing will always import files alphabetically. Optimally, all your
// components should be self-contained and explicit enough to not have any
// contained styles leak into unrelated components: The import order should not
// affect the result.
//
// If there are variables, functions or mixins that depend on each other and
// therefore need to be imported in a specific order you can import them
// directly. Variables-, function- or mixin providing partials should never
// output any styles themselves: Importing them multiple times to resolve
// dependencies shouldn't be a problem.
@import "variables/**/*";
@import "abstractions/**/*";
@import "base/**/*";
@import "components/**/*";

Here indeed isn't the _base file declared twice. Very strange, as I also changed this at my other theme.
Ignoring it now, the issue exists, we'll see later... :)

Thanks for the answer!
Tom

betz’s picture

OK, found out, the person that was working on it before me was using windows and didn't have the sass-globbing gem installed, ...

Sorry for the confusion.

Status: Fixed » Closed (fixed)

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