Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Work with UI team to bring the class templating feature for widgets #4630

toddparker opened this Issue · 10 comments

6 participants


Look at adding this feature because it lets people easily control what classes are added at the widget level. This would let people remove default classes for classes or shadows, or add their own custom classes.

We should also look at extending the pattern suggested below by UI to allow the default swatch value to be set and maybe even control inheritance which are unique to mobile right now but since UI will adopt the mobile theme framework, this will be helpful for that too.

Info here:

We should remove the hardcoding and add the ability to customize the style-related classes based on the functional classes.

Proposal based on idea from Doug Neiner:

$( "#dialog" ).dialog({
classes: {
"ui-dialog": "ui-corner-top",
"ui-dialog-titlebar": "ui-corner-top awesome-fade-class"
"ui-dialog-buttonpane": null

The classes option would map functional classes to additional style classes. The existing style classes would become the defaults and the user can completely override the style classes.

Use within a widget could be:

uiDialog.addClass( this._classes( "ui-dialog" ) );
where the call to ._classes() would return "ui-dialog ui-corner-top".


Moving this to 1.4 since we're going to be looking at markup and style changes globally then.

@arschmitz arschmitz was assigned

Shouldn't this issue be closed as implementation has already begun?


@toddparker @arschmitz I noticed that there hasn't been any movement on this issue in over 2 years. Is it still a problem with the latest jQM?


@ldeluca actually there are pr's currently in both mobile and ui to fully implement this :) which have updates as recently as today :-) We just have not been updating this issue see branch ui-1-12 and all the classes prs for the mobile side and jquery/jquery-ui#1369 for ui.


@arschmitz Okay, sorry about that. Didn't see any pull requests in this issue itself so I assumed no movement.


@ldeluca no problem this issue needed an update anyway


@arschmitz one of the commits in ui-1-12 should be edited to fix this issue - perhaps the commit which updates external/jquery-ui/widgets.js. That way, we'd have the needed reference.

@gabrielschulhof gabrielschulhof added this to the 1.5.0 milestone

@gabrielschulhof no because no one commit fixes this. This is a tracking ticket it will have to be closed manually.


@gabrielschulhof's suggestion of having the commit that updates jQuery UI close this ticket seems correct to me.


If you both think thats the right way i'm fine with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.