Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7590719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:28:31+00:00 2026-05-30T20:28:31+00:00

We’ve recently started a small-ish project for a mobile site demo w/.NET4; jquery-mobile has

  • 0

We’ve recently started a small-ish project for a mobile site demo w/.NET4; jquery-mobile has been sensibly chosen to be in charge of client-side functionality and UI interactions.

Requested branding is to differ quite significantly from anything that can be built with a ThemeRoller as it goes beyond the basic color change; this is where (I think) I’m about to hit a dead end.

It is currently my understanding that there is virtually no separation between element presentation and function on pretty much every interactive object, at least with the out-of-the-box library.

Consider the following scenario: we have rounded off-gray gradient tabs that I, with my executive decision (yeah, right), want to make into neat solid pink square (not really, but this should make my question more engaging 🙂

I’d normally add a css rule like .tab-container .tab {background-color:pink;} and be done with it; however given application of data-role attribute to the html element containing those tabs the following happens on the client at runtime (from the jquery-ui…js):

this.element.addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" );
this.list.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" );
this.lis.addClass( "ui-state-default ui-corner-top" );
this.panels.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" );

…and, when rendered, I’ll get my pink tabs but with all the styling that comes by default. Say, I really want those rounded corners gone; out of the box I have these options:

  • add “ui-corner-none” class to the element – bad given that this would have to be manually done for every instance, and also for every property I want overridden making this approach unmaintainable; this would also marginally bloat css etc. etc.
  • go into the jquery.ui…css and remove the “ui-corner-all” declaration – bad given that this would affect everything previously relying on the class; also the classes would continue being added at runtime although without visible effect
  • go into the jquery-ui…js and remove the class reference from the section as quoted above – bad practice modifying the library itself, what if I want the corners back? likely unmaintainable too it would contribute to non-separation of concerns
  • go into the main.css and add semantic classes overriding jquery styling above – solid approach except that every single property will need to be overridden quickly bloating into .tab-container .tab {background-color:pink; -moz-border-radius:0;-webkit-border-radius:0;border-radius:0;} etc.

Currently leaning towards having the majority of semantically agnostic styles removed – I’m a believer that mini-classes are bad and come with similar maintainability issues to those of inline styling.

Quite tempted to look into having brand-specific widgets introduced at least for some elements (i.e. <ul data-role=”awesomebrand-customtabs”>), but it will require a lot more effort and is outside of the scope for this question.

I’m sure something obvious is being overlooked here – please steer me right!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T20:28:32+00:00Added an answer on May 30, 2026 at 8:28 pm

    You’re right, in that the way jQuery Mobile uses classes feels a lot like it’s one step away from inline styling. The problem with changing jQuery Mobile’s JS is that it breaks your upgrade path.

    This is kind of ugly, but what about our good friend the star selector and !important? For example, to give the entire app a flat, square look, could be fairly straightforward:

    *{ 
      border-radius: 0 !important;
      box-shadow: none !important; 
      text-shadow: important!; 
      background-gradient: !important; 
      /* etc... */
    }
    

    If the star selector is too heavy-handed for your uses, you could always specify everything to overwrite as comma-separated selectors (.ui-tabs-panel, .ui-tabs-nav). No significant CSS bloat, clean upgrade path, and no manually wrangling classes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.