rajaishbt
rajaishbt

Reputation: 310

Dojo's Support towards CSS3

Does Dojo have any work around to support CSS3

  1. Gradient
  2. Box shadow
  3. Rounded Corner

cross browser support. if not what you guys will suggest with an app build on Dojo to acheive the above.

Upvotes: 1

Views: 114

Answers (1)

Philippe
Philippe

Reputation: 6828

It does for most browsers except IE (AFAIK), using the claro theme makes it easy as it's built on top of the lesscss framework and mixins are provided to make gradiends, box-shadows and Rounded corners... See http://download.dojotoolkit.org/release-1.8.3/dojo-release-1.8.3/dijit/themes/themeTester.html?theme=claro to check what it looks like in the different browsers you target...

You can easily extend those lesscss mixins to add shims for IE with whatever tricks you need (PIE for example. See http://css3pie.com/)

To get you started quickly, have a look at these files :

  • dijit/themes/claro/variables.less : that's where you put your theme's custom variables (colors, etc.)
  • dijit/themes/claro/compile.js : that's the script you launch to recompile your theme after you made modifications to your .less files. This requires you install nodejs. It's documented in the README file in the same directory.

Of course, it's better not to touch any of the claro theme's files directly as they may be overriden if you update dojo, but the compile.js script is a good starting point for creating your own theme-building script based on your own needs and structure.

Upvotes: 2

Related Questions