question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using @for loop will generate styles w/out component namespacing

See original GitHub issue

With this in styles.scss:

@for $i from 1 through 3 {
  &.column-#{$i} {
    @include column($i, 7, 0);

    display: flex;
    flex-direction: column;
  }
}

Styles that are generated do not have component namespacing (order-confirmation):

screenshot_2017-02-23_10 05 32_360

Workaround so far is to include @for loop inside of parent selector

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
webarkcommented, Feb 24, 2017

@bttf version v0.2.12 has been released. I added an acceptance test to ensure that the functionality remains.

0reactions
webarkcommented, Feb 24, 2017

@topaxi you are a gentleman and a scholar sir! Thanks for you quick turn around.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Global namespace · Issue #613 · styled-components ... - GitHub
The background is papayawhip . So far we're handling it by adding to each styled component a class self in order to style...
Read more >
Namespaces and Scope in Python
This tutorial covers Python namespaces, the structures used to organize the symbolic names assigned to objects in a Python program.
Read more >
Loops in CSS Preprocessors | CSS-Tricks
I use incremental loops occasionally in my abstract Sass toolkits, but almost never in actual stylesheets. The one common exception is ...
Read more >
Sass: @use
The @use rule loads mixins, functions, and variables from other Sass ... By default, the namespace is just the last component of the...
Read more >
Style React Components: 7 Ways Compared - SitePoint
Understand the best ways to style React components. We compare regular CSS with preprocessors like Sass and CSS-in-JS libraries like ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found