On 2 juil. 2011, at 16:03, T <[email protected]> wrote:

> I have 2 questions:
> 1.In the getting Started tutorial (http://www.iui-js.org/documentation/
> 0.50/getting-started.html) it is written that
> "Line 8 contains the link to the javascript file, which is responsible
> for the native looking transitions and governs the behavior of links,
> buttons, etc." so JavaScript is responsible for the Look and Feel.
> What funtion do the CSS-files have? I thought that they are responsible for 
> creatingg the native look and feel.

Nope, it means it deals with transitions, replacing href="page.html" by an ajax 
call that get the page content, add it to the dom and make a sliding effect 
between actual page and this new one, deal with back button history array, form 
processing,........ all that make iUI that damn easy to use.
CSS is there for what it should: colors, font size, background, padding, 
margin, css3 effects (where JS do the same as a fallback if css3 is not 
supported - specially for sliding transitions), .... graphical stuffs.


> 2.Moreover it is written:
> "Line 6 and 7 are the CSS styles. First one is iUI defining all
> globals, second is iOS default theme."
> 
> What does it mean when it is said that "First one is iUI defining all globals"
> 

Glad you ask :)
If you look at iUI 0.40 themes CSS files, you'll notice some duplicate code in 
iui.css and default-theme.css. Even worse, you'll see some !important at some 
weird places.
That's because theme support was is new in 0.40 and its iui.css code still 
contains some code that works good for default iOS theme, but not with 
others... so creating a theme is a nightmare: you always have to check if a 
padding isn't declare somewhere in both files about your colors, padding, 
float, height, ...
In 0.50, i've cut 'n paste all those iOS specifics to its own default-theme.css 
so now you can start from a blank canvas when you create yours.

This makes iui.css only contains selectors, transitions, ... kind of default 
things to at least make it works. But all the rest has been transfered to the 
theme file.

R.

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to