Hi,

here is a screencast of the style editor:

   http://www.medic.chalmers.se/~jmo/nuxeo5/nxthemes-2007-02-25.html

it is not completely functional yet, it is really a preview.

I've added an optional parameter which allows to specify the view for which the style should be applied:

   <style element="page[1]/section[1]/cell[2]/fragment[3]">

     <selector path="a" view="horizontal tabs">
       <font preset="default font" />
     </selector>

     <selector path="li" view="vertical menu">
       <color preset="red" />
       <border>1px solid #9c9</border>
       <background-color>#efc</background-color>
       <padding>0.1em</padding>
       <margin>0.2em</margin>
     </selector>

   </style>

as a result, a {...} will apply to the "horizontal tabs" view only and li {...} will apply to the "vertical menu".

technically the css file will look like:

.nxStyle2088987735.horizontalTabs a {font:15px Arial;}
.nxStyle2088987735.verticalMenu li {color:#f00;border:1px solid 
#9c9;background-color:#ccc;margin:0.2em;padding:0.3em;}


The CSS selectors defined in the theme setup file (<selector ...>) will appear in the style editor, and their CSS properties can be updated via a simple HTML form. The other way of choosing a CSS selector is by clicking on the widget's preview, but there is no simple 1:1 correspondance yet.

I haven't tried the editor with the nuxeo5 application yet, but there is a way to simplify the way styles are defined, for instance we have:

<style element="page[1]/section[2]/cell[2]/fragment[1]|page[3]/section[2]/cell[1]/fragment[1]">
     <selector path=".breadcrumbs">
...
     </selector>
   </style>

this could be replaced with:

<style element="page[1]/section[2]/cell[2]/fragment[1]|page[3]/section[2]/cell[1]/fragment[1]">
     <selector path="" view="nuxeo5 breadcrumbs">
...
     </selector>
   </style>

and 'class="breadcrumbs"' could be removed from the breadcrumbs widget alltogether

Basically I think that styles should apply to fragments as much as possible and not to cells or sections, unless the cells or the sections themselves have a given style.

/JM
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to