Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint Online: SharePoint Framework Webpart - select scss classes via javascript

$
0
0

Hello everybody,

at the moment I am creating a SharePoint Framework Webpart and Microsoft suggested not to use static classes or ids for the html Elements but using sass classes which I referenced via class="${styles.classname}" at the html elements.
Then the scss classname will be extended by a number to make sure that if you add the webpart on a site twice that there is no conflict with the other elements.

But now I have the problem that I would like to select some of these html Elements via script by getElementsbyId but there These "css-variables" are not working and are undefined.

Has someone an idea how I can select these html elements via script?

Thank you very much in advance!

Kind regards,
Robert.



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>