Login | About | Page IndexHome | Manual | Publications | Download | Support

Styling

Styling of WebDSL pages is done using CSS. In the application directory add the following directory and file:

stylesheets/common_.css

This css will be automatically included when deploying the application. When the application is deployed you can edit the CSS file directly in the tomcat directory (don't forget to also save the CSS file back to your project):

tomcat/webapps/appname/stylesheets/common_.css

The Firebug add-on for Firefox can be very helpful in figuring out the page structure, other browsers have similar development tools.

Templates automatically receive a span with the template name as class, this can be disabled by adding the no-span modifier to the template definition:

define no-span someTemplate(){ "no span around me" }

More explicit hooks can be added using the XML embedding:

define someOtherTemplate(){ 
  <div class="mydiv">
    "content of mydiv"
  </div>
}

Note that the "mydiv" is a WebDSL expression, so this could also be stored in an entity and retrieved using a field access:

<div class=user.cssclass>

Classes for styling can also be added in a template call:

input[class := "mynameinput"](u.name)

powered by WebDSL