• Jonathan Conway
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
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?
Is it possible to unit-test Lightning components?

Theoretically I can't see why, say,  the Controller and Renderer parts of a component couldn't be unit-tested, as they are essentially just collections of Javascript functions. However, to do this with one of the standard testing frameworks (e.g. Jasmine, QUnit) would probably require some extra pre-processing to make those functions callable, as well as mocking Lightning variables (e.g. element, etc params of controller methods).

Is there any plan on the part of the Lightning team to integrate unit-testing into the framework?
Hi everyone,

I'm working through the "Working with Custom Lightning Components" module in Trailhead.

I'm up to the challenge where you add a 'Contacts for Today' component to a page named 'MyPage'.

I have set up MyPage, installed the component, dragged it onto the page and activated the page.

But it's not working.

I get the following error message when I click 'Check Challenge':

Challenge Not yet complete... here's what's wrong: 
The 'MyData' Lightning App does not include the 'Contacts for Today' custom component.

Any ideas how I can fix this?

Thanks ahead of time.

Cheers,
Jonathan Conway | Service NSW
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?
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?
Hi everyone,

I'm working through the "Working with Custom Lightning Components" module in Trailhead.

I'm up to the challenge where you add a 'Contacts for Today' component to a page named 'MyPage'.

I have set up MyPage, installed the component, dragged it onto the page and activated the page.

But it's not working.

I get the following error message when I click 'Check Challenge':

Challenge Not yet complete... here's what's wrong: 
The 'MyData' Lightning App does not include the 'Contacts for Today' custom component.

Any ideas how I can fix this?

Thanks ahead of time.

Cheers,
Jonathan Conway | Service NSW