Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a jQuery Mobile theme

Tags:

How do I create a jQueryMobile theme?

Is it overriding the CSS the best way?

like image 931
Diogo Cardoso Avatar asked Mar 16 '11 15:03

Diogo Cardoso


People also ask

What is jQuery Mobile themes?

jQuery Mobile provides two different style themes, "a" and "b" - each with different colors for buttons, bars, content blocks, and so on. To customize the look of your application, use the data-theme attribute, and assign the attribute with a letter: <div data-role="page" data-theme="a|b"> Value. Description.

Is jQuery Mobile-friendly?

It isn't just for mobile, it's 'mobile-first', NOT 'mobile-only' so it can be used as a base for responsive web design. All those great touch-friendly form inputs and widgets are fully themeable and work great no matter what the device (mobile or desktop).

Does jQuery Mobile need jQuery?

jQuery Mobile, however, is a full framework. It's intended to be your starting point for a mobile site. It requires jQuery and makes use of features of both jQuery and jQueryUI to provide both UI components and API features for building mobile-friendly sites.

What is jQuery Mobile page?

The page is the primary unit of interaction in jQuery Mobile and is used to group content into logical views that can be animated in and out of view with page transitions.


2 Answers

The best method for creating a theme is actually modifying the existing one. Just like Jquery Mobile have done with their "Valenica" Theme. Use the standard css as a starting point / reference

http://code.jquery.com/mobile/latest/jquery.mobile.css

Often the best way to work out which elements need the styling tweaks is to inspect them via Firebug


Its also worth noting, its not a great idea to try and create a theme from scratch, as a large part of what makes jquery mobile so great is the cross browser testing and developments they have already made to the css.


Update:

In the near future there will be a jquery mobile theme roller, you can track its development at github.

https://github.com/jquery/jquery-mobile


Update 2

The theme roller is ready!

http://jquerymobile.com/themeroller/

like image 177
Blowsie Avatar answered Oct 14 '22 18:10

Blowsie


Just discovered a neat tool for creating prototypes which includes its own theme-maker/roller. Worth checking out! More for the themes than the prototyping. At least until the official themeroller comes out. http://www.mobjectify.com

Allows you to easily add extra JqueryMobile themes and see it live.

like image 40
Danny C Avatar answered Oct 14 '22 17:10

Danny C