Skip to content

Support for height media queriesΒ #427

Description

@Simon-Tang

πŸš€ Feature Proposal

I think it would be useful for xstyled to provide styling utils based on viewport height, as it does with viewport width.

Motivation

  • Users would benefit from having this out of the box with xstyled, instead writing media queries + maybe even Window.matchMedia()
  • Users would be able to write the same code to handle both viewport width and height

Example

To be honest, I'm not sure how the API would handle both width and height rules at the same time.

// Viewport width
<x.div minWidth={{ xs: 1, md: 1 / 2 }} />

// Viewport height
<x.div minWidth={{ hxs: 1, hmd: 1 / 2 }} />

// Width and height rules at the same time
???

Pitch

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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