Hello again, I realise we're not yet at this point, but starting a discussion early never hurt. Currently: 1) All CSS defined skins inherit from Simple. 2) XSS skins can inherit from something else using <import href="base-desktop.xss"/>
In the future, all skins should have the possibility to inherit from another one. At first, it may seems logical to add a new CSS instruction looking like -extends. However, after thinking about it, I believe it should be implemented another way, that is adding a <parent> element to adf-faces-skins.xml <skin> entry. It would be technically harder to implement, but it provides much more flexibility. Among other thing, it allows to create a kind of skin "mask". Imagine someone creating a quite simple skin that simply use bigger font. Now imagine the same person creating a very rich and large skin for his site. If -extends is not hardcoded in the CSS itself, it would be possible for him to easily define three skins in adf-faces-skins.xml <skins xmlns="http://myfaces.apache.org/adf/view/faces/skin"> <skin> <id>bigger.desktop</id> <family>bigger</family> <render-kit-id>org.apache.myfaces.adf.desktop</render-kit-id> <parent-id>simple.desktop</parent_id> <style-sheet-name>skins/bigger/bigger.css</style-sheet-name> </skin> <skin> <id>mycompany.desktop</id> <family>mycompany</family> <render-kit-id>org.apache.myfaces.adf.desktop</render-kit-id> <parent-id>simple.desktop</parent_id> <style-sheet-name>skins/mycompany/mycompany.css</style-sheet-name> </skin> <skin> <id>mycompanyBigger.desktop</id> <family>mycompanyBigger</family> <render-kit-id>org.apache.myfaces.adf.desktop</render-kit-id> <parent-id>bigger.desktop</parent_id> <style-sheet-name>skins/mycompany/mycompany.css</style-sheet-name> </skin> </skins> Then the developer could add an "Increase font size" button to his site to change the skin family used by the current user to mycompanyBigger. If the skin requires a modification, only one CSS needs to be modified, as opposed to two if the same result is required using -extends inside the CSS itself. On the same subject, should multiple inheritance be supported or not ? The priority rules would have to be well defined, like the last parent specified has the maximum priority or something, but other than that I don't see any technical limitation about it. Furthermore, this can improve even further the "mask" idea since many of them could be applied on any given skin. Anyone got some additional input and/or suggestions? Regards, Simon Lessard Fujitsu Consulting
