Open Bug 1725495 Opened 4 years ago Updated 3 years ago

[css-multicol][css-grid][css-flexbox] CSS styling of Gaps/Gutters

Categories

(Core :: Layout: Grid, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: MatsPalmgren_bugz, Unassigned)

References

Details

Attachments

(19 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

There's a discussion about extending and generalizing the column-rule feature from Multicol to allow authors to decorate the Gaps/Gutters in Grid/Flexbox layouts too:
https://github.com/w3c/csswg-drafts/issues/2748#issuecomment-621543304
(this is a commonly requested feature from authors)

I intend to experiment with implementing that here and writing up a spec proposal.

As part of this I'll also add support for images, in bug 1636298.

Depends on: 1728497
Depends on: 1735445
Depends on: 1745480

This part also adds a GapRuleUtils class for sharing various gap rule
related code, and adds ResolveInsetStartAndSize that resolves
a triplet of insets+size style values per:
https://matspalmgren.github.io/css-gap-decorations/Overview.html#resolving-position-and-size-algo
And we update nsColumnSetFrame::ForEachGapRule to use it.

Depends on D133523

NOTE: it would be better to have a nsStyleColumn member for each
axis instead but the way the VisitedDependentColor stuff is
implemented (using a pointer-to-member) makes that impossible.

Depends on D133528

 layout/generic/ColumnSetWrapperFrame.cpp                    |   247 ++++++++++++-
 layout/generic/ColumnSetWrapperFrame.h                      |    13 +-
 layout/generic/FrameGapRuleEnumerator.h                     |    39 +
 layout/generic/GapRuleDisplayItem.cpp                       |   309 +++++++++++++++
 layout/generic/GapRuleDisplayItem.h                         |    65 +++
 layout/generic/GapRuleUtils.cpp                             |    81 ++++
 layout/generic/GapRuleUtils.h                               |   245 ++++++++++++
 layout/generic/moz.build                                    |     5 +
 layout/generic/nsBlockFrame.cpp                             |    36 +-
 layout/generic/nsColumnSetFrame.cpp                         |   231 ++---------
 layout/generic/nsColumnSetFrame.h                           |    15 +-
 layout/generic/nsContainerFrame.h                           |    50 ++
 layout/generic/nsFlexContainerFrame.cpp                     |   498 ++++++++++++++++++++++++-
 layout/generic/nsFlexContainerFrame.h                       |    22 +-
 layout/generic/nsGridContainerFrame.cpp                     |  1089 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 layout/generic/nsGridContainerFrame.h                       |    55 ++-
 layout/generic/nsIFrame.cpp                                 |    33 +
 layout/painting/nsCSSRendering.cpp                          |    19 +-
 layout/painting/nsCSSRenderingBorders.cpp                   |     6 +-
 layout/painting/nsDisplayItemTypesList.h                    |     2 +-
 layout/style/ServoBindings.toml                             |     6 +
 layout/style/nsCSSVisitedDependentPropList.h                |     2 +-
 layout/style/nsComputedDOMStyle.cpp                         |    12 +-
 layout/style/nsStyleConsts.h                                |     7 +
 layout/style/nsStyleStruct.cpp                              |   148 ++++++-
 layout/style/nsStyleStruct.h                                |    87 +++-
 layout/style/nsStyleStructInlines.h                         |    41 ++
 layout/style/res/forms.css                                  |    56 ++-
 layout/style/res/ua.css                                     |    40 +-
 layout/tables/nsCellMap.h                                   |     9 +-
 layout/tables/nsTableFrame.cpp                              |   284 ++++++++++++++
 layout/tables/nsTableFrame.h                                |    17 +-
 layout/tables/nsTableRowGroupFrame.cpp                      |   395 +++++++++++++++++++
 layout/tables/nsTableRowGroupFrame.h                        |    19 +-
 modules/libpref/init/StaticPrefList.yaml                    |     7 +
 servo/components/style/properties/gecko.mako.rs             |     5 +-
 servo/components/style/properties/longhands/column.mako.rs  |   175 +++++++-
 servo/components/style/properties/shorthands/column.mako.rs |   159 ++++++-
 servo/components/style/values/computed/column.rs            |    19 +-
 servo/components/style/values/computed/length.rs            |     8 +
 servo/components/style/values/computed/mod.rs               |     7 +-
 servo/components/style/values/generics/column.rs            |    27 +
 servo/components/style/values/specified/column.rs           |   337 ++++++++++++++++-
 servo/components/style/values/specified/mod.rs              |     7 +-
 servo/ports/geckolib/cbindgen.toml                          |     5 +
 45 files changed, 4607 insertions(+), 332 deletions(-)

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: MatsPalmgren_bugz → nobody
Component: Layout → Layout: Grid
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: