How to avoid .ui-btn-left and .ui-btn-right being assigned to links in header? #7209

Closed
frankie-loves-jesus opened this Issue Mar 5, 2014 · 5 comments

Comments

Projects
None yet
3 participants

How to avoid .ui-btn-left and .ui-btn-right being assigned to links in header?

These classes will position my first link to the left and my second to the right which is not what my designer had in mind when she designed my layout.

http://jsfiddle.net/fq6Zk/1/

Trying to avoid manually overriding these classes or putting my links in a wrapper to duck away from the class assignment.

gtsop commented Mar 5, 2014

If you don't mind writting some more css, you can remove the data-role="header" and assign the generated classes manually:

http://jsfiddle.net/fq6Zk/3/

Thank you, brilliant suggestion! But kinda messy. My coworkers would kill me if I did something like that.

@ugomobi @gabrielschulhof @gseguin @arschmitz -- maybe we could avoid jQuery Mobile hijacking and styling elements (despite using the structure only CSS) with something like data-structure-only="true"?

@jaspermdegroot jaspermdegroot modified the milestone: 1.5.0 Mar 10, 2014

Member

jaspermdegroot commented Mar 10, 2014

@frankie-loves-jesus

We are going to remove this feature in 1.5 (1.4.0 changelog) since it's better for performance if you add those classes in the markup yourself, and it gives the flexibility that you are looking for.
At the moment you can also prevent it by wrapping the links in a div: http://jsbin.com/AKOmUxa/138/edit
I am going to create a ticket for removing the applicable code and close this ticket as duplicate.

Member

jaspermdegroot commented Mar 10, 2014

Closing as duplicate of #7230

Excellent news @ugomobi. We are surely moving towards perfection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment