Skip to content
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

Question: Are these examples for SASS only? #3

Open
jlap opened this issue Feb 9, 2015 · 7 comments
Open

Question: Are these examples for SASS only? #3

jlap opened this issue Feb 9, 2015 · 7 comments
Labels

Comments

@jlap
Copy link

jlap commented Feb 9, 2015

Hello!

I was wondering if the examples in this repo are meant for SASS only. I never tried it so I can't recognize its syntax, but the nesting, classes beginning with "&." and things like that don't seem like regular CSS (Although it might simply be things I didn't know about !)

Thanks

@rstacruz
Copy link
Owner

rstacruz commented Feb 9, 2015

& is something that exists in Sass, Stylus and Less. @extend exists in Sass and Stylus. :-)

@jlap
Copy link
Author

jlap commented Feb 9, 2015

Ah ok thank you. I was reading it and it wasn't clear the examples weren't in pure css so it got me confused.

@jlap jlap closed this as completed Feb 9, 2015
@rstacruz
Copy link
Owner

Ah yes... definitely needs some annotations. I'm leaving this open for now until I get some time to clarify it.

@rstacruz rstacruz reopened this Feb 10, 2015
@lijunle
Copy link

lijunle commented Feb 10, 2015

any similiar feature like @extend in SASS?

@visualcookie
Copy link

@lijunle Mixins and Functions etc. For full list check http://sass-lang.com/documentation/file.SASS_REFERENCE.html

@lijunle
Copy link

lijunle commented Feb 11, 2015

I suppose the @extend will modify the DOM class. After read its document, I
find I am wrong. LESS mixin and function is the same thing to this.

On Tuesday, February 10, 2015, Dean Hidri [email protected] wrote:

@lijunle https://github.com/lijunle Mixins and Functions etc. For full
list check http://sass-lang.com/documentation/file.SASS_REFERENCE.html


Reply to this email directly or view it on GitHub
#3 (comment).

@jamen
Copy link

jamen commented Nov 13, 2015

Just to clarify for OP (@jlap), & refers to the parent selector. For instance, say we have this:

.foo-bar {
  // styles #1 ...

  &.-baz {
    // styles #2 ...
  }
}

It would compile to (or something similar to):

.foo-bar {
  /* styles #1 ... */
}

.foo-bar.-baz {
  /* styles #2 ... */
}

I think RSCSS is more about the structure rather than how you type it. So both are valid ways to practice RSCSS .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants