white-space: pre-line

0
In a feedback portal, I want to trim the description to max 2 lines of text. This works perfectly with my CSS, but Mendix applies a "white-space: pre-line;" to every text object. My CSS: A screenshot of the unwanted white-space:   As you can see, I've tried to overwrite the white-space property to normal, but it will still overwrite to pre-line.  Any ideas? :-)
asked
2 answers
3

Hi Bas,

Based on a quick test I did, you should be able to do this with your css file. It looks like you have a feedback-description class on the h5 element, so adding this to your custom CSS will override the inline styling added by the platform:

.feedback-description{
     white-space: pre-line !important;
}

You need the !important to take precedence over inline styling.

answered
2

Hi Bas,

An idea would be to add an additional attribute e.g. TrimmedContent that is trimmed in a microflow and is later shown on the page instead of the original $Content attribute. (this could a calculated attribute or something that you set in a BCo

-Andrej

answered