Skip to content

[css-containment] Fix layout containment and fragmentainer interaction #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 7, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions css-containment/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,37 @@ Layout Containment</h3>

2. The element must be a <a>formatting context</a>.

3. If a <a>fragmentation context</a> participates in <a>layout containment</a>,
the first element with <a>layout containment</a>
affecting the <a>fragmentation context</a>
must “trap” the remainder of the <a>fragmented flow</a>.
<a>Fragmentation</a> must not continue past the <a>layout containment</a> boundary,
and the last <a>fragmentation container</a>
within the first <a>layout containment</a> boundary
is treated as if it is the last <a>fragmentation container</a>
in its <a>fragmentation context</a>.

If subsequent <a>fragmentation containers</a> in the <a>fragmentation context</a>
are only generated when more content remains in the <a>fragmented flow</a>,
then they are not generated.
If they would exist regardless,
they remain part of the <a>fragmentation context</a>,
but do not receive any content from the <a>fragmented flow</a>.

Specifically:
- <a>CSS Regions</a> following the one which traps the content
are still considered part of the <a>region chain</a>
as returned by the {{NamedFlow/getRegions()}} method
of the {{NamedFlow}} interface.
- the {{Region/regionOverset}} attribute of the {{Region}} interface
of the region which traps the content
is set to ''overset'' if the content doesn't fit,
even if it is not the last region in the region chain.
- If the computed value of the 'continue' property
on an element with <a>layout containment</a>
would otherwise have been ''continue/auto'' or ''continue/fragments'',
it must instead compute to ''continue/overflow''.

Possible optimizations that can be enabled by <a>layout containment</a> include (but are not limited to):

1. When the style or contents of a descendant of the containing element is changed,
Expand Down