Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Child Positioning

Jan Miksovsky edited this page Jan 4, 2017 · 3 revisions

Checklist » Styling

✓ Child Positioning

Does the component automatically calculate positions for its elements?

[This article is a stub, and is not yet complete.]

Does the component allow child elements to be positioned within it? This typically requires that the parent of a slot element have an explicit CSS position (“relative” or “absolute”) so that child elements can be positioned correctly.

A canonical situation here is a carousel that wants to lay out some children (which may or may not be images) inside a containing element (e.g., <div>) then add some elements around that container, such as arrows, dots, thumbnails, page numbers. For flexibility, the web developer using the carousel should be able to position/stretch the child elements with respect to that interior containing element. Applying position: relative to that containing element allows the web developer to position/stretch the children using absolute positioning inside that containing element.

Clone this wiki locally