thomthom / SKUI

Ruby wrapper of classes that maps to GUI controls in SketchUp's UI::WebDialogs
MIT License
26 stars 14 forks source link

Added custom css class identifier #103

Open janbrouwer opened 9 years ago

janbrouwer commented 9 years ago

Gives the option to add specific styling to each control

Feel free to reject this pull request if it's not in line with your ideas for SKUI. I wanted additional css-classes in my theme-stylesheet with specific formatting for some controls and I couldn't find a built-in method to accomplish this.

thomthom commented 9 years ago

Can you provide some examples to when you needed to use custom CSS classes?

janbrouwer commented 9 years ago

I used it for styling specific buttons ( a more general approach to create image buttons, for which I have not yet found a satisfactory solution) but this could also be used to make a specific element "pop out". Like "don't forget to click me! I have a blinking edge!" or something... I first tried specific styling through javascript and the css-id, but that only seems to work AFTER the window is shown. This seemed like a very simple solution to add some specific styling for an element. But it could be that I'm missing an already working method for this. ;-)