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 with SCSS/LESS/Stylus-based frameworks

See original GitHub issue

First of all, thanks everyone for the project. It is awesome, the best css-in-js implementation at the moment to my mind.

But I can’t get rid of CSS frameworks written with preprocessors yet. In my case this is Zurb Foundation, it provides an awesome grid and lots of useful SCSS mixins, for example for media queries:

@media #{$medium-only} {
    hey: ho;
}

But how can I use it in conjunction with styled-components? Does anybody use such a config?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
kevinsalinascommented, Sep 9, 2019

Would be very useful to recognize variable names from a file written in one of these frameworks and use them in the styled components. In this way we can modify the look and feel of our apps easily.

For example: //variables.scss $background: red;

//index.js import ‘variables.scss’;

export default styled(App)` Background: $background; `;

2reactions
yantakuscommented, Nov 23, 2016

Ah, sorry, I meant there are difficulties, not problems. The idea itself is superb. But for developers used to CSS-preprocessors it changes the workflow significantly. So we should evolve and popularize the idea.

Also, I think using third-party components with plain stylesheets along with styled-components will be a mess. And it’s a lot of work to write all the styles from scratch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS Preprocessors – Sass vs Less vs Stylus (With Examples)
We will talk about CSS Preprocessors and will discuss the 3 most important ones i.e. Sass vs LESS vs Stylus with examples around...
Read more >
Popular CSS Preprocessors With Examples: Sass, Less & Stylus
Currently, the three most popular and stable CSS preprocessors are Sass, LESS, and Stylus, however there are many smaller ones as well.
Read more >
Less vs Sass vs Stylus | What are the differences? - StackShare
Stylus thrives over SASS and LESS in its support of seamless mixins as shown ... Compass, Bourbon, and Susy are some popular frameworks...
Read more >
An Introduction to CSS Pre-Processors: SASS, LESS and Stylus
Control directives and expressions help to build similar style definitions according to matched conditions or variables. SASS and Stylus support normal if/else ...
Read more >
CSS Preprocessors - Sass vs Less - KeyCDN
There are three primary CSS preprocessors on the market today, Sass, Less, and Stylus. In this post, we will be comparing the two ......
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