Announcement Announcement Module
No announcement yet.
Change Dojo Css Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change Dojo Css

    If we create a project with roo it generates the UI with dojo decoration and all. How do we change the css of Dojo elements if we want as the css is not stored locally?

  • #2


    • #3
      Currently the Dojo distribution is served up out of the Spring JS dependency in Roo generated MVC applications. So replacing a CSS in that jar would be somewhat painful. However, if you create a your customized CSS under src/main/webapp/styles and into the same subdirectory which is found in the jar file it should take precedence over the resource delivered out of the jar.


      • #4
        Greetings, I'd like to make modifications to dijit.css (to make my input boxes wider). I notice that dijit.css is in spring-js-2.1.1.RELEASE.jar\META-INF\dijit\themes\. So I saved an edited version of dijit.css into src/main/webapp/styles/META-INF/dijit/themes/. (Actually, I copied it straight into /tomcat 7.0/webapps/myApp/styles/META-INF/dijit/themes/dijit.css and cycled the Win7 service. But it doesn't work. Do I have the wrong directory? Thank you --glennd


        • #5
          Replace dijit.css

          To replace any of the Spring-JS-dependencies, copy the files you'd like to replace into the same path that you find in the JAR file.

          For example, if you look in spring-js-2.1.1.RELEASE.jar, the path to the dijit.css file is


          So when the jar is loaded into memory, it's path is


          To replace the jar's copy with your own version of dijit.css, create the same directory structure under the src/main/resources directory:


          and copy dijit.css into that file.

          Once packaged and deployed, your copy of dijit.css will have the same effective path as the file in the jar:


          As Stefan notes above, your copy will take precedence over the resource delivered out of the jar.