Home > Forum > User Voice > Custom css classes for input fields

Custom css classes for input fields
4

MVP

I think it would be useful to have the ability to apply custom css classes to input fields. With the current styling options there is no way to style the "inside" of the input controls.

The last image is what I'd expect to be able to do, the first 3 images are what is currently possible with out-of-the-box functionality.

If that is already possible I'd be happy to know how without having to target precise css classes, data attributes etc.

MVP

Hi Martin

Daniel Krüger shows how to implement uniform button styling in this post:
https://daniels-notes.de/posts/2021/path-button-styling

The same approach could also be used for fields.

However, i would prefer having to possibility to add custom css classes to field name/value in addition to the current field name/value style option as you propose
To be consistent, the custom css classes option should also be added to button style of the path.

In conjunction with the global css styles it would be a huge benefit.

MVP
In reply to: Markus Jenni

Hi Martin

Daniel Krüger shows how to implement uniform button styling in this post:
https://daniels-notes.de/posts/2021/path-button-styling

The same approach could also be used for fields.

However, i would prefer having to possibility to add custom css classes to field name/value in addition to the current field name/value style option as you propose
To be consistent, the custom css classes option should also be added to button style of the path.

In conjunction with the global css styles it would be a huge benefit.

Hi Markus!

Thanks for your reply. Yes, I’m aware of Daniel’s solution and I’m already using it in all my projects. However, it’s just a workaround. As you said, it would be much easier (and correct from a developer perspective) to target and style elements based on classes (or even custom data attributes) and not by having to combine that many selectors.

Cheers,
Martin

MVP
In reply to: Markus Jenni

Hi Martin

Daniel Krüger shows how to implement uniform button styling in this post:
https://daniels-notes.de/posts/2021/path-button-styling

The same approach could also be used for fields.

However, i would prefer having to possibility to add custom css classes to field name/value in addition to the current field name/value style option as you propose
To be consistent, the custom css classes option should also be added to button style of the path.

In conjunction with the global css styles it would be a huge benefit.

That would really be nice.
The only thing left would be to have different global css styles for themes.

At least I have no idea how I could use the correct class for the correct theme.

Best regards,
Daniel

MVP
In reply to: Markus Jenni

Global css styles definable in the theme is one thing i'm waiting for a long time.
https://community.webcon.com/forum/thread/41/15

It would be the icing of the cake.

Actually I would prefer a simple bread over a cake in this case. The one thing theming is good for is creating problems, especially if you don't have full control over the website. :)

But this is beside the topic and only a personal opinion. :)

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.