-- Ian Rickert <[EMAIL PROTECTED]> wrote
(on Friday, 03 October 2008, 10:58 AM -0700):
> Matthew Weier O'Phinney-3 wrote:
> > -- Ian Rickert <[EMAIL PROTECTED]> wrote
> > (on Friday, 03 October 2008, 09:39 AM -0700):
> > 
> > > 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.
> > 
> > 
> > The best bet is to copy an existing theme CSS file and create your own
> > module so you can create your own theme: --snip--
> > 
> > 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.)
> 
> 
> Wow!  Well, thanks for the quick response, Matthew.  Yowzers, though, that
> sure is a lot of work just to change the width of a text input.  And what
> happens when I want an exception to my custom style?  I guess I'll go with
> the class selectors (or just not change the width!). 

One technique is to keep the same namespace (e.g., tundra), and simply
override individual selectors:

    /* public/js/custom/awesome/awesome.css */
    @import "../../dijit/themes/tundra/tundra.css"
    .tundra .dijitTextBox {
        width: 16em;
    }

> Yes... now that I think about it, I *LOVE* the class selectors.  We doin'
> this!

And, honestly, if you only want to affect a few, this is probably the
easier way. :)

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

Reply via email to