Skip to content

Propagate Style Properties through Inset, Other Layout Specs #159

Open
@garrettmoon

Description

@garrettmoon

From @Adlai-Holler on November 18, 2016 6:7

Users are often surprised that when they set properties like flexShrink on a node, and then put that node inside an inset spec, the value they set is not used.

It might be valuable to propagate these values outward in some cases. Some initial thoughts:

  1. We will need a way to know whether a value was set explicitly or is a default.
  2. Should we propagate style for all specs that have only one child – inset, ratio, center, relative?
  3. Should we propagate style from the "main" child in overlay and background specs?
  4. Would it make sense to remove the style properties from the affected specs, so that setting the style of the affected node is the way to configure the style? If we do this, then point 1 disappears.

See also:
facebookarchive/AsyncDisplayKit#2601
facebookarchive/AsyncDisplayKit#874

Let's gather thoughts @nguyenhuy @maicki @hannahmbanana @appleguy @lappp9 @garrettmoon

Copied from original issue: facebookarchive/AsyncDisplayKit#2628

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions