It would nice to be able to add classes to a views/scenes/fields in the builder. We are able to do by adding a span in the title or description and using the selectors ‘.kn-view:has(.class)’ or ‘.kn-input:has(.class)’ which has caused us issues and it also makes the CSS tedious. I believe this feature would save a lot of time when trying to style our app use jquery.
I had also requested t his many months ago. Brad - can you show an example of what you are putting in the View Description. I don’t understand how this is going to work - the span doesn’t envelope the view?
I tried this and it doesn’t work for me. I must be missing something. When you say ‘View Description’ - are you referring to the box labeled Description on the Settings tab of the View dialog box (used to create the view)? If so, how does this apply to the app - it doesn’t show up in the html? If this is not what you are referring to, please provide more details of where this code is placed.
Craig - I now see where the Description shows up in the HTML. However, I do not see the CSS show up anywhere in the view. Even if it were to get overwritten by another higher priority CSS, it should still show up and show it disabled.
An example is that I use jquery to add a class to certain views where I want the presentation or behavior to be different than the default, or I add a class to various input fields to hide them off-screen so that I can update them via code when a form is submitted, etc.
I finally got around to trying this again. Long story short - I came across an article on the internet that explained that this feature - :has() - is not enabled by default in Firefox - you have to enable it. It works fine in native Chrome. This would certainly provide for a significant reduction in CSS, however, unless I can find a way to force Firefox (and any other browsers that require enabling), I can’t rely on using this technique in client apps.