Re: [css-regions] Expose info about line breaks, overflow to JS

Another limitation would be that you cannot have a contenteditable element
that spans between several regions, and text selection from one region to
another would not work cleanly without a considerable amount of javascript
to clean things up.

It's certainly not as nice as the CSS Region specification.

However, it is a lot better than nothing. It is really bad to have to
guestimate + use trial and error to find out where one reggion ends and
where one needs to cut of for hte next one to start. This is the reality
currently, and given that at least Mozilla, Google and Opera won't ship
anything as advanced as CSS Regions due to concerns of slowing things down,
it will stay like this in the future as well.

That's why I think this would be much better than not having anything at
all.


On Wed, Jan 29, 2014 at 5:31 PM, Mihai Maerean <mmaerean@adobe.com> wrote:

> I'm bringing up a sample html content to the discussion about doing
> fragmentation using this method to show some of its limitations.
>
> If you have a div that has styling that you don't want applied to each of
> its words (padding, margin, box-shadow) and this div gets fragmented, it's
> hard if not impossible to fragment that div correctly.
> For the margins (that a paragraph has), the JS code could simulate the
> margin collapsing of the fragments with the fragment containers (to be
> spec compliant and to look good), but for properties like box-shadow I
> don't see how that could be implemented in JS.
>
> Large parts of the css-break spec are going to be ignored by such an
> implementation.
>
>
> Mihai Maerean
>
>
> From:  Johannes Wilm <johannes@fiduswriter.org>
> Date:  Wednesday 29 January 2014 17:20
> To:  "www-style@w3.org" <www-style@w3.org>
> Subject:  [css-regions] Expose info about line breaks, overflow to JS
> Resent-From:  "www-style@w3.org" <www-style@w3.org>
> Resent-Date:  Wednesday 29 January 2014 17:21
>
>
> >Hey,given that there is still so much disagreement with CSS Regions on
> >the part of Opera, Firefox and lately also from Chrome, based on supposed
> >performance issues, it was mentioned that the rendering engines,
> > according to the view of some, should just be the basis of applications
> >that can then take care of fragmentation.
> >
> >In order to be able to do that half-way efficiently, it would be an
> >advantage for the Javascript to know where fragmentation occurs: 1. line
> >breaks and 2. how much of a node could be rendered without causing
> >overflow.
> >
> >With this info (which the browser should have anyway) available in
> >Javascript it should be a lot less time spent on trying to recreate what
> >happens when creating the javascript.
> >
> >
> >--
> >Johannes Wilm
> >
> >Fidus Writer
> >http://www.fiduswriter.com <http://www.fiduswriter.com/>
>
>


-- 
Johannes Wilm
Fidus Writer
http://www.fiduswriter.com

Received on Wednesday, 29 January 2014 16:47:43 UTC