Help styling input fields. - Mendix Forum

Help styling input fields.

3

I am trying to create a default style for input fields.

"input:first-child" selector doesn't work because inputs are nested in classless divs. Neither does "input + input" selector.
I am curious to know why mendix does this?
Is this how mendix inserts context? or is this an oversight somewhere in development (can it be flagged as a bug)?

Is there a better way of solving this then adding a class on every input field within the application?

asked
1 answers
0

Indeed style the 'form-control'. To not have to use !important add another class to the input-field that you want customised. To customize only the first input maybe this will work as selector:

div :nth-child(1 of input.yourclass)

And it is not a bug but rather a design choice that has as drawback that it increases the difficulty of creating a selector to get the element you want.

answered