Thibaut Soulcié wrote:
Le Feb 27, 2007 à 5:01 PM, Jean-Marc Orliaguet a écrit :
One thing strikes me right now in your screencast : the modified style
of the second fragment also applies to the first one (the one who was
duplicated). Why would that be? Because it is the very same fragment ?
What if the text fragment -i see a widget tab- was to be modified,
would the style only apply to this one only then?
Hi,
this is correct, when the fragment is duplicated the style is not
duplicated, i.e. both fragments point to the same style. What is
currently missing in the editor is the possibility to create a copy of
the style and reassign it to the fragment., though it is not difficult
to implement.
fragment1 \
style
fragment2 /
What about general styling such as in previous CPSSkins (font
shape/font color/etc.) ? Have you all thrown it away or is part of
your roadmap? What about a right click -> "copy style" option then
"paste" on another one then (that works pretty well in Photoshop ;-)?
"copy/paste style" is planned, that's the opposite operation. That's
planned too. Currently you achieve this in nuxeo5 app using CSS, but
here you'll get the same results using relations between fragments and
styles.
when it comes to "general styling", the idea is to use presets instead,
i.e. the same as "box styles", "font styles", but on a lower level, to
have them apply to CSS properties instead. And you have a collection of
font definitions, predefined colors to choose from, so if you change the
value of the color 'preset:red' to '#900' instead of '#c00' you won't
have to modify the styles that use that preset.
the CSS properties are defined in
org.nuxeo.theme.jsf-editor/resources/nxthemes/jsf/editor/styles/css.properties
new properties can be added
In the prospective of a project to theme, how is that file easy to
export and make it part of the project's repository ?
(by the way, move fragment from cell to cell then export the XML file
works well :-)
eventually it will contain the CSS2 (CSS3?) standard properties, so you
won't need to export/import it in your application. I was rather
thinking right now, in case you need to add properties manually that are
not in it already, you can do it...
it works with the nuxeo5 app too, but with some limitations:
- the css selectors can become very long (table tbody tr td ul li a ...)
that seems to me like just an output issue, won't affect workinf with
it or browser's rendering.
In one sense, it makes the styling more predictible, but there should be
a way to simplify the path (for instance 'tbody' in 'table tr td' is
redundant)
- to update existing style the 'style scope: all views' must be
selected, since in the current theme the styles are applied to all
the views of a fragment
is it connected to the next point, or do you plan to make it the
default view?
basically you have a choice:
- if you want to let the style be applied to all views, then check the
'all views' button. This is what you currently have in nuxeo5 web app.
It means that for instance 'h1' will have the same appearance for that
fragment no matter which view is used.
- if you want to apply the style only to a given view ('vertical menu'
and not 'horizontal menu' for instance), then check 'vertical menu'. In
fact 'vertical menu' means here the current view associated to the
fragment.
So in the end you have inside a same 'style':
- style properties that apply to all views
- style properties that apply to 'vertical menu'
- style properties that apply to 'horizontal menu'
as different layers. The 'all views' layer gets overridden by the
specific layers, and the specific layers are independent of one another.
- some css properties are defined globally, it is difficult to
override them.
just tell me when ready so we can make the whole css theme in
css.properties and get rid of the <style> part of nxthemes-setup.xml
not really, css.properties is only used by the style editor. Specific
style sheets only need to be defined in a standard .css file if you
really don't think that they are a part of the theme (.e.g the tomahawk
styles, ...) as you do already.
the problem with globally defined properties is rather a css design
issue. When you do:
li {padding: 0; margin: 0}
it will affects all 'li' in your page, so it's better to do instead:
.verticalMenu li {padding: 0; margin: 0}
- styles associated to pages / sections/ cells are not editable yet.
so will page[number] and page[number]/section[number] be stylable i
guess, is it ?
yes, but these styles should really apply to the sections, cells, pages,
... and preferably not to the fragments.
thanks a lot for all NxThemes,
++
tibo
you're welcome
/JM
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm