Re: CSS aims

On Thu, Jan 23, 2014 at 12:23 PM, Karl Dubost <karl@la-grange.net> wrote:

>
> Le 15 janv. 2014 à 04:29, Brian Kardell <bkardell@gmail.com> a écrit :
> > Is it plausible to imagine a clean/reasonably complete decoupling of
> presentation from structure without adding dubious amounts of complexity?
>
> It depends on what you are meaning by structure, what you mean by
> presentation, and what you mean by… meaning. :)


Given where we are in Web history, doesn't it feel like there should be a
fairly simple canonical definition we can point to to answer that question?
 Where is it?  Does it exist?

If you were creating an interface that includes, say, a list of folks I
know who are online, you might just have a list (<ul> or <li>).  Simple
enough.

Now let's say you want to add an icon to the left of that - is that style
or structure?  With CSS, if you had data in an attribute or something you
could use ::before to pick an attribute value and display a particular
'kind' of image (online/offline).   Still, seems reasonably simple and
fairly clear cut.

But -- what if I decide I might want to interact with it somehow?  Does
that change its nature?  Now I need it to be a real element and -- seems
legit.

But then later - meh - maybe I don't want that listener after all... Now am
I mixing structure and presentation because there is an element in there
which I am still using to attach the icon?

And what if that thing is just slightly more complicated than that - like,
it involves some kind of relationship with other data which exists, but
isn't expressed in the structure as it stands today... Say maybe the user's
profile image or gravatar.  Even if I don't want to interact with it and it
really is just for display purposes, I really need a way to get that data
into a usable form (basically, I need data bound into the DOM)...

I don't think the line is always clear...  Maybe I am over-muddying with
simpleish examples, but it seems hard to express another way:  The very
foundations of CSS are built around the DOM.  Rules choose what to style by
using a selector -- on the DOM.  Many properties inherit -- from their
relationships in the DOM.  The document order is the render order  (there
are notable exceptions for abs positioning, but for the most part)... I'm
not aware of any intermediary mapping to "renderables that re not DOM" or
anything that is explained, thus they cannot be manipulated either.  And if
they could - how?






> That was the sense of my link earlier today to Robin Berjon. It's not  a
> new topic. 10 years ago, I was musing more or less jokingly about it with
> http://www.la-grange.net/web/cow
>
> Maybe the question is not the right one. We often ask ourselves (myself
> first) how to preserve the idea of a semantics HTML. Maybe the question is
> the opposite one, how do we pull out the semantics of HTML so it's more
> flexible. The cow proposal was about that: Using CSS selectors to attach
> semantics to a node.
>
> And instead of waiting for the standardization of new formal elements for
> let's say poetry, etc. to make this association possible through an
> external mechanism. I think we are afraid of this way of thinking, because
> we are afraid that not many people will care enough about semantics.
> Fighting our own demons.
>
>
> --
> Karl Dubost 🐄
> http://www.la-grange.net/karl/
>
>


-- 
Brian Kardell :: @briankardell :: hitchjs.com

Received on Thursday, 23 January 2014 17:57:36 UTC