Repository navigation
Column styling, and rounded corners per viewport in the kit - #104
Merged
Merged
Conversation
The section sidebar gets a Columns style tab, one panel per column: padding per viewport, background colour, background image with its veil, rounded corners per corner and per viewport, vertical alignment. Stored under `styling` in the column's settings, so it waits for Publish, undoes, copies, exports and imports like the label. A styled column wraps its blocks in `.cb-col__inner`, since padding on the column would widen it; an unstyled column keeps its markup byte for byte. The background image goes through the section's rules (`BackgroundImage`, now shared). Covered by the asset GC, export/import, the headless tree (`columns[].styling`) and the AI content schema (`$defs.columnStyling`, derived from the tab's form, host StylingType extensions left out since a column would drop them). Also: coalesced journal entries merge their ops field by field, and cb-condition reads its own scope's controls before a nested scope's. `BoxSpacingType` / `ResponsiveBoxSpacingType` take a `corners` option.
`borderRadius` becomes `{desktop, tablet, mobile}`, each set labelled by
corner when the core offers the `corners` option. A corner left empty keeps
the wider viewport's value, at the kit's breakpoints (768 / 540).
A radius stored before, one set of corners, reads as the desktop one in the
form (model transformer), the views and the headless JSON, with no
migration. A desktop-only image radius renders as it did.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Core: style each column on its own. The section sidebar gets a Columns style tab with one panel per column:
These are stored under
stylingin the column's settings, so they wait for Publish and they undo, copy, paste, export and import like the column label..cb-col__inner, because padding on the column itself would make it wider than its neighbours. An unstyled column's markup does not change at all..cb-col > .cb-blockshould use.cb-col .cb-block, otherwise they miss the blocks of a styled column. The styling guide says so.BackgroundImageis now shared by both.columns[].styling);$defs.columnStyling). It is derived from the tab's own form, and it leaves out fields added by hostStylingTypeextensions, which a column does not keep.BoxSpacingTypeandResponsiveBoxSpacingTypetake acornersoption.cb-conditionreads the controls of its own scope before those of a nested scope.Kit: rounded corners per viewport on the image and the gallery.
borderRadiusbecomes{desktop, tablet, mobile}.cornersoption.borderRadius.topbecomesborderRadius.desktop.top.Rationale:
docs/internals/rendering.md#column-styling,docs/internals/kit.md#a-radius-per-viewport.Test plan
column-styling.spec.jsandkit-image-radius.spec.js) and Encore suite (11)