+ Start a Discussion
Ryan GRyan G 

Developer Console errors out on SLDS classes with "--" in the class name.

Hi Folks,

This is more of an FYI post and for those of you who have not noticed it yet. The developer console comments in component markups interers with the SLDS classes with "--" in the class name.

Temporary solution - Change/remove all the "--"'s from the class name in the markup for the code you are trying to comment.

Example:
The below code cannot be commented with <!-- code -->
<div class="slds-spinner--inverse slds-spinner slds-spinner--large" aria-hidden="false" role="alert">
You will need to remove the "--" from the class name inorder for the comment to work in dev console.
<!-- changed "--inverse" to "-inverse" and "--large" to "-large"
  <div class="slds-spinner-inverse slds-spinner slds-spinner-large" aria-hidden="false" role="alert">
-->
Cheers!
SandhyaSandhya (Salesforce Developers) 
Hi Ryan Goveia ,

I Appreciate your information.

The use of double dashes/hyphens inside comments is invalid in HTML, XML, and XHTML:

SLDS uses XML, so these are not supported.

Below link has some discussions on the same issue which might help other to know about it.

http://salesforce.stackexchange.com/questions/96936/why-is-not-permitted-in-lightning-components-comments-in-markup-how-to-to


Thanks and Regards
Sandhya