Why doesn RAP simply use CSS for styling, such as e.g. GWT?
In GWT for example, every widget has a configurable style name that is rendered as class attribute. Styling is done by adding a CSS file to the target HTML document. Although this is a simple technique, it does not work out for RAP for a number of reasons: 1. One of the main objectives of RAP is to prevent vendor lock-in by allowing for exchangeable client implementations. Although our current client-side technique is based on JavaScript, there are completely different technologies out there that might be interesting candidates for RAP clients (GWT, Flex, Silverlight …). Not all of those technologies can necessarily deal with CSS. 2. In RAP, all layouts are computed on the server side, thus the server also needs to know about any variable dimensions like paddings and borders. This is not possible if a style sheet is applied only on the client side. 3. Due to browser bugs and differences, writing cross-browser CSS code is a complex task. Client technologies may work around those brows