-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Enhanced Elements should receive (suffixed) classes attached to original element. #3577
Comments
Good idea, maybe one of the discussions should be the order of classes. Should the user defined enhanced classes be first or the jquery mobile classes first. |
This can be solved by properly implementing the widget() method on our widgets. The widget factory uses this method when handling the setting of the disabled option, for instance: if ( key === "disabled" ) {
this.widget()
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
.attr( "aria-disabled", value ); So, by implementing widget() methods for our widgets, we could give developers the div they need to style. We should do this in addition to adding the -enhanced class. |
@gabrielschulhof that was my thinking exactly i'm going to move this to 1.4 as part of the widget review. |
We also have to look at the legend of the checkbox/radio and select controlgroups which is wrapped in a div. See #5351 |
We made it possible to use a different icon color for buttons by just adding class |
Should we do the same with ID's? |
yes ids should i think classes im less sure about i think class config On Wed, Feb 27, 2013 at 4:05 AM, Jasper de Groot
|
Do you mean option classes like we use for panel and table? |
Discussed this with @arschmitz and @gabrielschulhof today and we are all in favor of introducing Have to see what to do with the "ui-btn-left" and "-right" classes. Should we use |
this has been implemented in all reviewed widgets closing this as fixed by new data-wrapperClass option in widgets |
Note thate we decided to only implement this for classes, not IDs. |
In any case where an enhanced element is created by wrapping the original element (selects, input buttons), there’s no way of attaching a custom class to the enhanced element. This leaves authors in a position where they can only target an element by wrapping it in another element or wandering all over the DOM with their selectors.
Classes on the original element should remain in place, but a suffixed version (“-enhanced”) should be applied to the enhanced element.
The text was updated successfully, but these errors were encountered: