-- Ian Rickert <[EMAIL PROTECTED]> wrote
(on Friday, 03 October 2008, 09:39 AM -0700):
> I'm hesitant to ask this because it is maybe a little bit more of a Dojo
> question than a ZF question.  But I've had little luck with the Dojo docs
> and my googlings for this have only created more confusion.
> 
> I'm very pleased with the construction of my dojo-enabled form -- once I
> conformed my method of thinking to, you know, reality.
> 
> But now I'm stuck again -- I can't style the Dijits with CSS!  I understand
> that there are CSS files which are loaded with the Dijits, and the common
> answer is to override the settings either by changing the included files, or
> by using increased specificity in your css file.  I've also changed my
> layout file so my custom CSS comes after Dojo is loaded and output.

Dijits are styled using one of the dijit themes; tundra is the most
common. 

The best bet is to copy an existing theme CSS file and create your own
module so you can create your own theme:

    public/
        js/
            custom/
                awesome/
                    awesome.css
            dijit/
            dojo/
            dojox/

which you can then pull in as follows:

    $view->dojo()->registerModulePath('custom', '../custom')
                 ->addStyleSheetModule('custom.awesome');

Copy one of the dijit themes:

    % cd path/to/public/js
    % cp dijit/themes/tundra/tundra.css custom/awesome/awesome.css

and start customizing from there. When you encounter images, you may
need to copy these over to your new module so you can modify them.

You'll note that all the items are prefixed with .tundra -- change that
to .awesome (or whatever you pick for your theme name). Then, just make
sure that a container surrounding all your items has the class attribute
set to "awesome", and you're good to go. (You have to do this whenever
you use a theme, so get used to that aspect.)

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to