Changing background color of jquery-ui button? - jquery-ui

I'm using jquery-ui for buttons. The default theme looks great, but I'd like to apply a different background color to a few specific buttons. Is there a way I can easily add another css class to my buttons to just change the bg color of them, without changing any other properties of the button?
Thanks

Just add it to the button's HTML and when the button is created it will get all of the existing classes.

Related

How to determine the colors in a Custom style so I can apply them to a Custom Title Bar

I am using a Custom Title bar (TTitleBar) primarily to place the Main Menu and a couple of drop downs onto the title bar. This works without applying styles to my app but not when I apply Styles.
How can I discover the colors defines in a custom style so I can apply them to my CustomTitleBar.
I'm using Delphi 11.1
TStyleManager.ActiveStyle.GetSystemColor(clActiveCaption) does the trick.

Vaadin Grid Drag&Drop change drop target highlighting color

I need to change the color of the highlighting of possible drop targets in a Vaadin 14 Grid. To illustrate, I am using the drop mode "between", which results in a purple line:
How do I change the color of that purple line?
Vaadin Tutorials are not easy to understand and suggest using a CSS selector ending with -drag-center (Vaadin 8) or using .v-drag-over-target.card selector. But this does not seem to work, maybe I need to replace "v" in the second suggestion with something else?
Due to the purple color I'm assuming that you are using the Material theme. I'll also assume that you have a custom theme set up, as is described here. If not, that page explains how to set up a custom theme.
To customize the color of the grid row drag indicator:
In your project folder, create a file frontend/themes/<your-custom-theme-name>/components/vaadin-grid.css
Add the following contents to the CSS file:
[part~='row'][dragover] [part~='cell']::after {
background: green; /* replace with the color you want */
}

different colors on radio buttons when they are active in Jquery mobile

I have three radio buttons which have the same theme in jquery. If I select one of them, the color of the button will change to the color specified in my .ui-btn-active class in the css. My radio buttons are named Can meet, not sure and Decline. I want my Decline radio button to have a different color than the two others when it is selected (the color red).
I'm using Jquery mobile and have customized the css for which colors I want to have on the different themes and I have changed the .ui-btn-active to .ui-btn-active-a and .ui-btn-active-b and made them with different values. I have tried to switch between the two ui-btn-active classes without no luck, and I have tried the addClass(..) and removeClass(..) without luck. I made a method in my jquery-mobile.js which look like this:
$.mobile.changeAction = function( activeBtn){
$.mobile.activeBtnClass = activeBtn;
}
where my activeBtn parameter will be a string to choose which activeBtnClass I want to have. I think the problem is that I have problems refreshing the activeBtnClass after overriding it, I have tried some refreshing methodes without no luck.
As long as the radio buttons have different colors when active I will be very thankful.
Following styles should do the trick:
.ui-radio:nth-child(1) .ui-icon-radio-on.ui-icon{
background-color:green;
}
.ui-radio:nth-child(2) .ui-icon-radio-on.ui-icon{
background-color:grey;
}
.ui-radio:nth-child(3) .ui-icon-radio-on.ui-icon{
background-color:red;
}​
Sample jsfiddle.
To style Horizontally stacked select options:
.ui-radio:nth-child(1) .ui-radio-on span.ui-btn-inner{
background-color:green;
}
.ui-radio:nth-child(2) .ui-radio-on span.ui-btn-inner{
background-color:grey;
}
.ui-radio:nth-child(3) .ui-radio-on span.ui-btn-inner{
background-color:red;
}​
Sample jsfiddle.
Why not just create custom themes for all of the states that you might want? You can have multiple custom themes, and only use them when you'd like. I have 7 themes in my CSS, and this way you can always incorporate them later if you'd like without having to do so much custom coding.
You can just apply the theme with the data-theme="f" (or other letter swatch) element attribute.
Here's jQuery ThemeRoller 1.1.1 http://jquerymobile.com/themeroller/index.php. If you're just making small changes to the theme, such as an active state, just copy the theme, and make the changes and save as a new swatch. You can go from A-Z :)

Change SC.say("hello") Alert window border colour

How to change the border color of SC.say() popup window in smartgwt.Do i have to create a custom window and specify all edge images to change border colour.
Yes, according to me, you should use com.smartgwt.client.widgets.Dialog, if you want customized look or widgets in place of SC class. You can have all the properties that will make your dialog looks the same such as:
dialog.setIsModal(isModal);
dialog.setMessage(message);
dialog.setMessageStyle(messageStyle);
dialog.setIcon(icon);
dialog.setButtons(buttons);
dialog.setTitle(title);

Cant change button colors and list-dividers jquery mobile

http://getwiddly.com/dm/index.html
I am having issues changing the color of the buttons when clicked. It seems its inheriting the default theme when you let go of the buttons click, as it turns blue. I would like it the "g" theme color or the color set of my own, not blue.
http://getwiddly.com/dm/index.html#lunchmenu
I want to set the list-divider color but I can customize the color. I want it green but when I apply the "g" theme for data-dividertheme it uses some other light color part of the theme instead the green part....So I applied it to the and it works....only after you highlight/hover the title, for example "SMALL PLATES...." if you highlight/hover this, it changes to the right color.
I would suggest rolling your own theme as editing the current jQM CSS can be cumbersome and you might overlook something:
http://jquerymobile.com/themeroller/

Resources