Re: How could total separation of content (xhtml/xml) and presentation (CSS) be achieved with the Bitflux Editor (or Mozile)?
DrSlump <[email protected]> Sat, 05 Mar 2005 01:05:26 +0100
| Newsgroups | gmane.editors.bitflux.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Now I see what you mean, you want to 'attach' css properties to elements
instead of selectors and classes. I never needed or even thought about
such functionality, I guess it's too fine-grained and IMHO 95% of the
time the same can be accomplished with properly designed css stylesheets.
Even if you allow to define custom css properties to an element, based
on some restriction rules, you'll need create a css file with those
properties classes or add them as inline styles (not so good).
I still think that a best aproach would be to let the designer add some
extra css rules to allow the editor some margin of decission on the
final result's design. The only thing needed is some mechanism to
present the editor valid css classes for the current element, as
described in my previous mail.
Back to your idea, I think the original xml based representation of the
rules makes more sense and even if more verbose is clearer than css like
syntax.
By the way, you'll have to use xpath (doing it by regexp could be much
slower and error prone) to check which properties can be used for the
current element.
ciao, Iván
> On Mar 4, 2005, at 16:41, DrSlump wrote:
>
> Hi!
>
> I don't have any experiance with XPath, but after looking a little in
> a book I think I understood your example.
> Anyway I don't think it would have the same functionality as the XML i
> proposed, correct me if I'm wrong. (Sorry for now explaining my
> example properly.)
>
> The thing I described would work like this:
> The first rule would allow the editor to assign the a "float: right"
> or "float: left" property to either "div#main img" or "p.editable".
> The second rule would allow the editor to assign "text-align: justify"
> or "text-align: left" and/or "font-family: serif" or "font-family:
> sans-serif" to any (*) property but not "div#main".
> So how I imagined it could look for the editor would be that he/she
> would be offered a set of choises for each property, i.e. in a popup
> menu.
>
> I don't know if it'd make things any better to have a CSS-kind of
> syntax, because it'd require some new way of thinking anyway. Maybe an
> XML-format would be even less confusing because of that. It could be a
> bit easier to grasp the CSS-like syntax, but on the other hand the
> performance could be suffering and the coding would be more
> complicated (I guess I'd have to start playing with them regular
> expressions :-).
>
> When I wrote that it'd be for designers I didn't expect it to be for
> code-fearing designers, such designers can't work with templating and
> stuff associated with a CMS anyway.
> In that case it'd have to look something like this:
>
> div#main img, p.editable {
> float: right;
> float: left;
> }
>
> *, !div#main {
> text-align: justify;
> text-align: left;
> font-family: serif;
> font-family: sans-serif;
> }
>
> Comments or ideas anyone?
>
> cheers, Simon
--
bx-editor-users mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-users