Remove whitespace from caption-less buttons to allow :empty selectors - Mendix Forum

Remove whitespace from caption-less buttons to allow :empty selectors

1

Right now (or so at least in Mx9.24.35), a button without a caption still has a whitespace character in the HTML markup. A caption-less button is fairly common, as it's often an icon button, instead. To differentiate a button with a caption, caption and icon or a button without any caption, the CSS selector :empty can normally be used. However, since a button without a caption is still presented with a single whitespace character, this selector doesn't work.

 

While I cannot foresee the consequences of removing said whitespace character, it would allow front-end developers to use the :empty selector to improve the UI design. This feature will have more positive impact than you can imagine :)

asked
1 answers

Also remove the warning if applicable (for example if an icon selected)

Created