You need to sign in to do that
Don't have an account?
Ordos
Lightning supresses custom styles in VisualForce page
Hi all,
I ran into an issue where a VisualForce page containing custom style classes (in the head tag), and which displays fine in Classic, gets the custom classes supressed in Lightning. If raw styles are used (without classes), then those work.
Did anyone experience this and if yes then how can custom classes be used within VisualForce under Lighting?
Thanks ahead for your freedback on this.
I ran into an issue where a VisualForce page containing custom style classes (in the head tag), and which displays fine in Classic, gets the custom classes supressed in Lightning. If raw styles are used (without classes), then those work.
Did anyone experience this and if yes then how can custom classes be used within VisualForce under Lighting?
Thanks ahead for your freedback on this.
Please do not use any tag selector, instead use scoped classes and define your own style classes and use them. The reason for doing so is, the styles for the tag selectors will already be defined in LDS because of which you custom classes are getting overridden with the styles defined in LDS.
You can replace you CSS code with the below code.
All Answers
Example : becomes
Original class did not have ".myapp" in the class definition. I then try to apply it to table cell (via JavaScript) like this:
Please do not use any tag selector, instead use scoped classes and define your own style classes and use them. The reason for doing so is, the styles for the tag selectors will already be defined in LDS because of which you custom classes are getting overridden with the styles defined in LDS.
You can replace you CSS code with the below code.