CSS to Differentiate type of message(Information,Warning and Error)

0
Hi Team,   Can anyone please suggest me, is there any way to change css for mendix show message activity functionality? Right now its showing same color for all kind of messages. Expected Blue for Information,Yellow for Warning and Red for Error messages.     Regards, Swathi
asked
3 answers
1

Yes, each of the 3 message types have their own class on the outermost container. You can see this by right-clicking in your browser and choosing "Inspect Element".

The classes are:

  • mx-dialog-error
  • mx-dialog-warning
  • mx-dialog-info
answered
1

You need to target the header.

Here's a snippet I used in one of my projects (added it to the modals.scss file):

.mx-dialog-error > .modal-content {
	> .modal-header {
		background-color: $brand-danger;
	}
}

.mx-dialog-warning > .modal-content {
	> .modal-header {
		background-color: $brand-warning;
	}
}

 

answered
0

Hi Eric,

I tried applying below css but its applying background color only to body.

 .mx-dialog-info div div{
    padding: 5px 20px;
    background-color: #5bc0de;
    height: 5px;
    overflow-y: hidden;
}

I want to override the header color as well.

Regards,

Swathi

answered