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.

Sass architecture

See original GitHub issue

Summary

I’d like to discuss updating the Sass files to be more flexible for extending and white labelling Carbon components. Issues we are currently running into:

  • More component specific variables to be available to extend Carbon.
    • e.g. We wanted to create a new scenario for button but the icon size was hard-coded so we had to copy and paste the value. If carbon were to update this we’d have to manually update our code as well. I’d like to see variables like $carbon-button-icon-size so that I can reference a variable in my Sass files.
  • All colors for a component are defined in mixins
    • we need to change colors on a component by component basis, not just global UI tokens to allow for white labelling. Right now most of the colors for a button are defined in a mixin but the disabled, hover, focus states are not always in these mixins. I’d like all colors to be defined in a mixin for a given component/variant of a component so that I can easily define new colors for a component.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:24 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
aagonzalescommented, Feb 12, 2019

Another concept we’re working on is theme zones. So you can target different areas within the page page that calls a different theme (still just a concept). Kind of sounds like what your second comment was about.

1reaction
asudohcommented, Feb 2, 2019

Cool, please work with @mattrosno so he can connect you and our designers and get a common understanding of what our designers/developers think of the new theming architecture and outline the system design based on it. They as well as @mattrosno are busy with v10 work, and I suspect the substantial collaboration comes after. I understand you feel blocked on this, but I’d like careful work on creating the system design, which may be time-consuming.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7-1 Sass Architecture - LearnHowToProgram.com
7-1 Sass Architecture. One popular and effectively modular way to structure Sass projects is the 7-1 pattern. If your internship or eventual place...
Read more >
Sass Guidelines
Sass is an extension of CSS that adds power and elegance to the basic language. ... Keeping the architecture consistent and meaningful is...
Read more >
SASS Architecture | 7-1 Pattern - Kiran Workspace
7-1 SASS Pattern means 7 Folders and 1 FIle. 7 Folders have their meaningful labels which include sass snippets or partials. Outside the...
Read more >
Structuring your Sass Projects - ITNEXT
The architecture known as the 7–1 pattern (7 folders, 1 file), is a widely-adopted structure that serves as a basis for large projects....
Read more >
A Simple SCSS Architecture, and Best Practice Playbook
I decided to write my own playbook that covers Scss file structure standards - I ... at different Sass/Scss formatting, naming, and architecture...
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