SharePoint 2016 on premise - Can I have a global CSS file at the site collection or site level then just apply the .CSS (SASS) classes at the web part level?

SharePoint 2016 on premise - Can I have a global CSS file at the site collection or site level then just apply the .CSS (SASS) classes at the web part level?

I am reading that SharePoint 2016 is now supporting SASS, and it looks like in all the examples each web part has its own CSS file. Is this a requirement or can I have a single global and just assign the .class to the web part?

Also is there a reason having a global .css at the site or site collection level is a bad idea?
LVL 1
sqlagent007Asked:
Who is Participating?
 
kukdaiConnect With a Mentor Commented:
You can still overwrite or write a class and as long as it is getting called then you will be able to use in across the Site.

Let's say
ms-webpart-chrome-title

 this class is for web part title which is used by every web part all over the site collection. you can modify this class and add important at the end to make sure it is getting executed
\
.ms-webpart-chrome-title{
Font-Size:28px !important;
}
which will make all the web part titles 28px large no matter what.
0
 
sqlagent007Author Commented:
Can the CSS be applied to a specific field?
0
 
sqlagent007Author Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.