×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    4

    Aptana WRTKit and CSS and Device Themes

    I finally figured out where the CSS definitions were coming from when I make a new WRTKit project in Aptana: WRTKit/Resources/UI.css. What I can't seem to find is the "best practices" way to override these CSS defintions. I don't really want my widgets to look just like the Nokia default ones, but I'm running into some issues with being able to assign IDs and classes to elements when I create all of the visual elements via the toolkit calls.

    So is it appropriate to edit hte UI.css file? (I bet not). Is it appropriate to override it in my widget-specific CSS file? Or is it better to delete or bypass it, and start from scratch, in my widget's own CSS file?

    Also, are there any guidelines detecting and tapping into a device's current theme to make the widget conform to the theme?

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Aptana WRTKit and CSS and Device Themes

    Hi liberal_hippie,

    this is a good question! My personal advice, being that file really project-specific, is to directly edit it without worrying too much.. Of course, if there are any better solutions, I'd be glad to know them as well

    Pit

  3. #3
    Regular Contributor
    Join Date
    Apr 2003
    Location
    Akron Ohio USA
    Posts
    229

    Re: Aptana WRTKit and CSS and Device Themes

    No need to change the underlying ui.css document.

    I used my own css file with the same class, tag and id selector names as those in the UI.css that I needed to override. Make sure your custom .css loads after the WRTKit files and the browser will use the cascade rules to override the UI.css.

  4. #4
    Registered User
    Join Date
    Jan 2009
    Posts
    4

    Re: Aptana WRTKit and CSS and Device Themes

    Thanks, both are helpful suggestions. I like the idea of just overriding them, for now. It's good to know the selectors that the kit uses by default, as well.

  5. #5
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Aptana WRTKit and CSS and Device Themes

    If you want different styles for controls of the same type (e.g.: you want 2 Labels with 2 different styles), or just change the default class names, you could also try to play with Control setClassName(element, className) method.

    Pit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •