Undefined mixin 'grid-toggle': SGS 1.2.1 - singularitygs

I'm currently on the 1.2.1 version of SGS and finding that the grid-toggle mixin is failing for me.
According to the current WIKI docs it states:
If you'd like to be able to toggle your grid on and off, the grid-toggle mixin can be used. The grid-toggle mixin should not be used from within a selector; it will write its own.
To me the most important part is the entire 2nd sentence which states…
The grid-toggle mixin SHOULD NOT be used from within a selector.
When I run compass:dist I get the following…
Undefined mixin 'grid-toggle'
Here's a codeshare of my current SGS Sass file http://codeshare.io/Ek0sH and here's another codeshare of my gems in use w/versions of each listed. http://codeshare.io/NEzzr

grid-toggle has been removed.
Sam 'Snugug' Richards, the maintainer of Singularity, claims that it never worked properly anyway.
The docs are to be updated.
See the corresponding discussion: https://github.com/Team-Sass/Singularity/issues/195

Related

What is this odd SASS property syntax?

I'm working with some SASS code, written for ruby-sass v3.2. In some of the stylesheets, property declarations are written like:
.something
:height 10em
:width 100%
:font-size 1.5em
This compiles and appears to be valid, but I can't find reference to it anywhere. Is this just a quirk of Ruby parsing them as symbols, or something in SASS I've never seen before?
I had to use Wayback Machine to find the "official" information, and it seems that it is just the old SASS way to write a declaration:
Property Syntax
The indented syntax supports two ways of declaring CSS
properties. The first is just like CSS, except without the semicolon.
The second, however, places the colon before the property name. For
example:
#main
:color blue
:font-size 0.3em
By default, both ways may be used. However, the :property_syntax option may be used to specify that
only one property syntax is allowed.
I also found some others mentions of this syntax here:
Using colon syntax and variables in Sass
Convert Sass stylesheets from the old colon syntax
Deprecate old-style property syntax
Edit : there is also an online reference about this here.

Using a class inside module

I am new to ruby and trying to use a facility provided by a ruby gem 'combine_pdf'. As described in the documentation, I am trying to do a CombinePDF.load("file1.pdf").
However , I am getting an error
Uninitialized constant CombinePDF in X::Y ( or something similar).
The class inside which I am using combine pdf is present inside a module X::Y. And ruby is somehow also trying to look for CombinePDF in the same package. This is actually a rails project and I have combinepdf in the gemfile.
Use double colon:
::CombinePDF
It is all about constants resolution mechanizm - double colon means, you want to reference the constant, defined in the outermost scope.
It sounds like although you included combine_pdf in the Gemfile, you did not require it in the file in which you use it. You should have this in that file:
require 'combine_pdf'
Do you?

Style switching by interpolating a variable value

I'm trying to create a variable that will switch styles by changing it's value.
something like:
$style: 1;
$color1: #f60;
$color2: #096;
$color: $color#{style};
.a{
color: $color;
}
Unfortunately the result is: Undefined variable: "$color".
Could someone explain to me why this doesn't work?
Seems like this feature got added in SASS 3.3
When we released Sass 3.02, we added support for SCSS, which meant we had to actually parse all the selectors in the document. This meant that you couldn't just plop the parent selector, &, anywhere in a selector. Overall this was an improvement: it caught more errors and encouraged users to write more flexible mixins.
Unfortunately, it also made one important use-case harder. With the rise in popularity of BEM, OOCSS, and SMACSS, people became more and more interested in adding suffixes to classes. When using Sass, they wanted to write mixins to do this, and the restrictions on & made that very hard to do.
In Sass 3.3, we're loosening these restrictions. You can now write &-suffix (or &_suffix, or even &suffix if you really want) and Sass will make it work. If this fails to apply—for example, if & is * —Sass will print a helpful error message.
source

Pull - Push mixins function with singularity

In the singularity demo, there are a few samples using a push and pull mixin. When used they adjust content placement across the gutter. Looking high and low, I could not find any documented reference to these mixins. Are they part of the long term feature set or a leftover? If not, what is the recommended way to do this sort of gutter shift?
Found the answer here
Push/Pull are currently non-documented features that are being deprecated in Singularity 1.2.0. They make sense when using float output method and symmetric grids, but don't make sense for any other combination we can think of. Instead, we recommend utilizing the isolation output style (or, if you're feeling adventurous, the new calc output style in Singularity Extras)
The other option is to write your own mixin with the use of the grid-span, column-span, and gutter-span functions.
Having read about the deprecation of push/pull in Ver 1.2.0, I have just swapped my pull spans for isolation spans. It was so easy, I can't imagine why I hadn't used that method before. A lot of Singularitygs has to be learnt by trial and error, but perhaps the next set of docs will be better. I have also seen that they are removing the grid-overlay and grid-toggle from Ver 1.2.0. That's a shame. I got them working beautifully despite the lack of documentation. Still, the background-grid works well.

Sass mixin does not work

=rounded(!rad)
:-moz-border-radius = !rad
:-webkit-border-radius = !rad
:border-radius = !rad
I have this mixin defined in a .sass file. When I try to compile it with sass style.sass style2.css, I get this error:
Syntax error on line 2: Undefined constant: "!rad".
I've looked through the docs and can't find what I am doing wrong. If I reduce the sass file to just this section, the error still happens. I am not using it with Ruby/
That mixin looks absolutely correct to me. Is that in style.sass or style2.sass? I'm guessing you're defining it in one, and using it in the other.The first thing to check would be that when you're mixing it in, you're not forgetting to pass an argument. For instance:
.round_div
+round // will not work
Instead of
.round_div
+round(1em) // should work
If that's not the case, try updating Sass. The ability to pass arguments to mixins was added in 2.2.0.
I've got a gist a put up a few days ago for a slightly more complex version of the same mixin. It's working fine for me as long as I mix it in with an argument, and have a new enough version of Sass.

Resources