Slashdot Mirror


CSS for Mobile Devices

Death of Rats writes: "The World Wide Web Consortium has finally released its working draft for Cascading Stylesheets 2 for Mobile Devices. Definitely check this out if you intend on getting in on WAP or any other form of wireless internet."

3 of 38 comments (clear)

  1. Why a different version? by waldoj · · Score: 3

    It seems strange to me that a wholly different version of CSS is required for mobile phones. Wouldn't an extension of the existing CSS definitions make more sense? The majority of these terms exist in CSS.

    I guess I'm of the school of thought that the ISPs for mobile devices ought to filter the content and rewrite it to suit mobile phones. The idea of rewriting code (ie, http://www.amazon.com/phone/) for different access devices has always struck me as somewhat foolish.

    Perhaps the only thing more foolish than that is attempting much in the way of layout on a PCS screen. :) I understand that there are more advanced devices, like the Palm VII, that can handle more than 16x3 characters (or whatever), but it still seems to be mostly about content right now.

    We can credit W3C for being forward-looking, but I expect that CSSMP will go the way of WAP.

    -Waldo

    1. Re:Why a different version? by _xeno_ · · Score: 3
      It is an extension of CSS2. CSS2 has this concept of media types, with different rules. (For example, there is a vocal media type, which has very little use for line-height and rendering things... The one thing I remember about the voice media type is that you can specify types of voices to say (render) content in.)

      All CSSMP does is say that there is now a mobil-phone media type, and that these rules are used for it. In a way, it's a completely different spec, but you'd need it to be separate. Lumping voice browsers, TV browsers, and console-browsers into one standard would get... messy. CSSMP just gives another set of rules for rendering HTML content.

      BTW, how do you expect ISP's to rewrite Amazon.com's main page to work on a cellphone? It's kinda graphically intensive... How about Slashdot? For simple pages, it'd be easy, but for complex pages like Slashdot it would be all but impossible. (Especially pages that are designed to look a certain way, which cellphones, and lynx, usually choke on. Try nVidia's webpage under Lynx some time - it's all graphics without ALT tags.)

      Actually, as it turns out, CSSMP might be exactly what you want - since a page designed with a CSS2 style sheet can have multiple media types, the cellphone section would describe how to render the page on a cellphone, while the browser sections would identify how to display it under a browser. A properly designed page would work both under a CSS2 compliant browser (there aren't any!) and under a CSS2 compliant cellphone (and... there aren't any of those, either). But it would be the same HTML document, just different styling rules for different ways of displaying the same content.

      And while you're giving the W3C credit for being forward looking, realize that there is no (finished, I think Mozilla trys to) browser that currently implements CSS2 - and the W3C is currently working on CSS3 .

      --
      You are in a maze of twisty little relative jumps, all alike.
  2. Re:What?? by _xeno_ · · Score: 3
    Given that the only browser that I'm aware of this date that even attempts to implement CSS2 (which is not the same as standard CSS which IE for Mac does right) is Mozilla. (Or, rather, Gecko, I guess. The Mozilla renderer/parser combo, which I think is Gecko - but I might be wrong... Bottom line is that all Mozilla based browsers (eg, Galeon) should pick up the ability.)

    There is currently one production browser in existance that actually implements CSS1 - Internet Explorer 5 for Macintosh. Only the Mac version of IE does CSS1 correctly. No other browsers do. This spec is designed to supplement CSS2. The W3C is actively working on CSS3 for some strange reason...

    As to why they did this, that's simple: HTML was never designed to specify the style of the document, just the structure. That's why the tags have names like Paragraph, Emphasis, and Strong. HTML was designed to structure content - it never was intended to be used to create the complex web pages we see today.

    CSS was designed to solve that problem - it would move style away from the structure. CSS2 has the idea of multiple media types - all this mobile phone implementation really does is add another media type. The idea behind media types is so that HTML+CSS2 can be used in both a browser, and then have a special set of rules for when it's printed. There's a "vocal" set of rules for blind people who use text-to-speech browsers. Now there's a WAP "media" type so that phones that support it can view content.

    Most simply, the idea behind CSS2 is to allow someone to create a webpage based on content and not on style - and to allow the CSS backend to be changed, so that the look and feel of a website isn't done in HTML as much as it's done in CSS. The mobile phone CSS spec is simply an extension of this ideal - to separate content from style. By extension, that means you don't need to rewrite the page in HDML - all you need to do is use the special cellphone CSS section, and the page is "converted." This was the basic goal behind CSS2. It's too bad no one ever really got around to using it.

    --
    You are in a maze of twisty little relative jumps, all alike.