Skip to content

positioned elements provide the context #16

@scottkellum

Description

@scottkellum

Element queries (and other element logic) should only be relative to the nearest positioned element. This gives authors more control over what the context is. It also slightly reduces, but not eliminates, issues of shifting contexts causing styling thrashing.

This is particularly useful for a few different scenarios:

  • It allows you to style inline and inline-block elements that might not return a reliable width to be queried.
  • It allows you to create a component and style the internal layout based on that component’s sizing properties. Especially helpful if the internal layout is split into two or more columns but you still want to style based on the component width.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions