0

I have applied css to my lightning Button to change the color of it. And I have class named Morning inside my button

.THIS.Morning{
    //Mornig is class inside my button
    color: red;
    }

2 Answers 2

0

You might be good with the normal button variant, have you tried it? <lightning:button variant="destructive-text"/> https://developer.salesforce.com/docs/component-library/bundle/lightning:button/example

You can use normal <button> and style it with Salesforce-defined classes + whatever else you need. Use Lightning Design System: https://www.lightningdesignsystem.com/components/buttons/

If it absolutely has to be a <lightning:button> and variant's aren't enough - look into button "styling hooks". More info:

Sign up to request clarification or add additional context in comments.

Comments

0

Please try this in your CSS :

.THIS .slds-button_brand {
    color:red;
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.