In MX Studio you can call a javascript action in a nanoflow. You will ofc need a user action or dataview to call the nanoflow.
https://docs.mendix.com/howto/extensibility/write-javascript-actions
https://appstore.home.mendix.com/link/app/109788/Mendix/JavaScript-Actions-How-To-Advanced
You can still use the mxui/dom client api to find and manipulate dom elements.
For simple stuff you could use the css selector helper widget: https://appstore.home.mendix.com/link/app/35039/
This will help you set styling based on enums, booleans etc.
Is this possible for Mendix native? Can I change the css of an app with the help of a javascript action? For example the font size on click of a button?