function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jonathan ConwayJonathan Conway 

Lightning support for SASS

Currently the Lightning SLDS is written in SASS and utilises SASS Variables in order to maintain consistent fonts, colours, sizes, paddings, etc. However, custom styling of Lightning components can only be done in plain-CSS, and doesn’t support SASS.

This means that when styling components, we have to duplicate fonts, colours, sizes, paddings, etc. in each individual component (as SASS variables can’t be utilised). This will inevitably result in inconsistencies and duplication of code.

So in order to properly promote re-use and consistency, it would be great if you could improve Lightning to fully support SASS in individual component styles.

Is there any chance of this happening in the near future?
Jonathan ConwayJonathan Conway
I noticed that one StackOverflow answer recommends modifying or adding classes on top of the SLDS, which is written in SASS. I would like to be able to re-use and built-upon these styles with my own custom configuration. Is this the recommended approach? If not, is there a recommended approach for customizing SLDS styling while maintaining re-usability as described above?