Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== CSS3 Floats ====
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== Daniel Glazman's proposal ====
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
===== UC 2: overlapping exclusions =====
Multiple overlapping exclusions that affect each other and the content around them.
{{:ideas:css3-floats-use-cases:exclusions_overlapping.jpg?500|}}
==== CSS Exclusions and Shapes ====
magna aliqua. Ut enim ad minim ...
bore et dolore magna ...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== CSS3 Floats ====
magna aliqua. Ut enim ad minim ...
bore et dolore magna ...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== Daniel Glazman's proposal ====
Limitation: cannot add "exclusion" on a custom-shaped element. See details in the issues section.
magna aliqua. Ut enim ad minim ...
bore et dolore magna ...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
===== UC 3: repeating shapes =====
Repeating exclusion shape on x, y or both axes.
{{:ideas:css3-floats-use-cases:exclusions_repeating.jpg?500|}}
==== CSS Exclusions and Shapes ====
No support for repeating exclusion shapes. Solution:TBD
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== CSS3 Floats ====
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== Daniel Glazman's proposal ====
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
===== UC 4: disjoint shapes ======
Multiple disjoint shapes that compose an exclusion
{{:ideas:exclusions_disjoint_shapes.jpg?500|}}
==== Resources: ====
Image to determine the disjoint shapes by alpha channel transparency.
{{:ideas:css3-floats-use-cases:exclusions_disjoint_shapes_mask.png?300|}}
==== CSS Exclusions and Shapes ====
Multiple solutions possible with single image, multiple positioned images or SVG shapes.
nousmod tempor inciditunt ut...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== CSS3 Floats ====
Multiple solutions possible with single image, multiple positioned images or SVG shapes.
nousmod tempor inciditunt ut...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== Daniel Glazman's proposal ====
Multiple solutions possible with single image or multiple positioned images.
The mask and the shape of the overlying article need to be manually aligned.
This gets more complex on adaptive layouts.
nousmod tempor inciditunt ut...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
===== UC 5: reusable exclusion =====
Reuse an exclusion shape on different elements
{{:ideas:css3-floats-use-cases:exclusions_reusable.jpg?500|}}
==== CSS Exclusions and Shapes ====
* low reusability: requires duplication of markup
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== CSS3 Floats ====
* low reusability: requires duplication of markup
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== Daniel Glazman's proposal ====
good reusability of the region-image without additional placeholder markup
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
===== UC 6: shape transforms =====
Apply transformations (scale, skew, rotate) to an exclusion shape.
{{:ideas:css3-floats-use-cases:exclusions_transforms.jpg?500|}}
==== CSS Exclusions and Shapes ====
(!) Content inside the shape will have transformations applied, as well
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== CSS3 Floats ====
(!) Content inside the shape will have transformations applied, as well
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== Daniel Glazman's proposal ====
Limitation:
* Rotation: can't do programatic transforms on region-image. Need a separate image.
* Scale/size: region-size excluded from Daniel's proposal "since it could lead to extremely expensive and deep recursion"
===== UC 7: padding and margin on custom shape =====
Custom-shaped container with margin for outer content and padding for inner content
{{:ideas:css3-floats-use-cases:exclusions_padding_margin.jpg?500|}}
==== CSS Exclusions and Shapes ====
consectur adipisicing elit, sed
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== CSS3 Floats ====
consectur adipisicing elit, sed
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== Daniel Glazman's proposal ====
Limitation: region-image only affects the container, no effect on the bottom element. The "margin" is faked with another image.
Question: How does padding work? There is no explicit padding method specified. Is the standard "padding" method overloaded?
consectur adipisicing elit, sed
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
===== UC 8: background image and container shape =====
Custom-shaped container with a background image / background color.
{{:ideas:css3-floats-use-cases:exclusions_background.jpg?500|}}
==== CSS Exclusions and Shapes ====
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== CSS3 Floats ====
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
==== Daniel Glazman's proposal ====
Lorem ipsum dolor sit amet, consectetur adipisicing elit...
===== UC 9: Drop Cap =====
One exclusion along a text.
{{:ideas:css3-floats-use-cases:exclusions-dropcap.png?500|}}
==== CSS Exclusions and Shapes ====
Many instances ...
The text ....
==== CSS3 Floats ====
Many instances ...
The text ....
==== Daniel Glazman's Proposal ====
Many instances ...
The text ....
===== Issues =====
==== CSS Exclusions and Shapes ====
=== Limitations overview: ===
* [regression] no support for repeating exclusion shapes or images
* (?) [TBD: is this still applicable?] Probable dependencies on child layout to determine parent's layout and exclusion goes against classic CSS thinking / implementation.
* Possible circular dependencies
* reusability of shapes requires duplication of HTML markup
==== CSS3 Floats ====
* (?) how are overlapping shapes affecting each other?
* using z-index?
* reusability of shapes requires duplication of HTML markup
==== Daniel Glazman's proposal ====
=== Limitations overview ===
* An element can't determine a live exclusion for another. Shapes are defined on both elements and have to be kept in sync by some scripting method.
* An element can't have a shape and part of it excluded because there's only one "region-restriction" property per element.
* The following example cannot be achieved with two independent images
{{:ideas:css3-floats-use-cases:exclusions_glazman-limitation-1.jpg?340|}}
* Shapes are currently defined only by static images. Support for SVG-defined shapes (like Exclusions & CSS3Floats) would enable scripted manipulation of shapes.
* Cannot have transforms on only the exclusion image (rotation, scale)
** transforms need to happen on the entire container, thus affecting the contents, as well
* (?) How do padding and margin work with region-image? How can I affect the inside of a shape?
=== region-image ===
* (?) How do I specify the alpha channel threshold?
=== region-restriction ===
A custom-shaped element cannot be an exclusion for another.
No support for both inside shape and outside exclusion.
Currently, I need two elements with the same image shape:
* one for "content shape" on the overlapping element (top element)
* one for "exclusion" on the affected element (bottom element). **Overlapping needs to be handled manually**, probably with absolute positioning. Difficult for adaptive layout!
Currently, it is impossible to have an element shaped and part of it excluded by another element!
I can define only one region-restriction property per element.