1

After salesforce gave us the winter 18 App I saw that many css classes which i were relied on were changed\deleted. Suddenly I saw that a lot of components in my App are css broken.

I've tried to look for the specific css updates in winter 18 release although, I haven't found the specific css changes.

For example:

<button class="uiButton" type="button" onclick="{!c.doSearch}">
...

The uiButton does not exist anymore in winter 18.

Are there suggestion on how to deal with that or any helpful information would be helpful.

3
  • The uiButton class is not an available Lightning class. The Lightning Design System specifies all the styles available. Commented Sep 11, 2017 at 13:38
  • It seems that it is part of forceCommunityOmniBox, In winter 18 it does not exist, before it does. @MartinLezer Commented Sep 11, 2017 at 13:44
  • 2
    I don't know what is a forceCommunityOmniBox but if you want your button to keep its Lightning style through the new versions, you'll have to use the Lightning Design System. Commented Sep 11, 2017 at 13:45

2 Answers 2

9

When Lightning was introduced, it had a lot of styles which were undocumented, primarily as placeholders for what later would become SLDS. Anything not starting with slds was never meant to be a permanent style developers/customers could use. You should never have used those styles to begin with. They're not documented in the release notes, because they were never documented to begin with, and not meant to be used in any context. As said by @MartinLezer, you'll need to convert your code to SLDS, and use it consistently.

4
  • I see.. so what you are saying is that in winter 18 release they eliminated the support for those "mysterious" styles? @sfdcfox Commented Sep 11, 2017 at 14:38
  • 1
    There never was support for those styles to begin with. Any undocumented styles are subject to change at any time, and as a result, you should not use them in production code. Commented Sep 11, 2017 at 14:41
  • @battery.cord , I understood that. Although it did worked in the latest release. winter 18 is the first release that those styles does not work. so I asked whether they did it on purpose in winter 18 release. Commented Sep 11, 2017 at 14:44
  • 3
    @omri_saadon The removal of the styles was surely intentional. I would guess that the developers probably didn't realize that people were using their styles, or they probably would have announced that the styles were changing. I was simply saying that the use of undocumented CSS is always a risk, because those styles can, and do, change.
    – sfdcfox
    Commented Sep 11, 2017 at 14:48
3

You'll probably want to look at the Lightning Design System Documentation for Buttons, Button Icons, and Button Groups where the applicable CSS resides that applies to Lightning Components and Pages. Whether you've used it in your code or not, those can wind up being applied to your components implicitly by the platform via inheritance.

You may also want to refer to these two documents: Winter 18 Release Notes and Lightning Components Roadmap for additional information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .