Skip to content

[css-env] Safe Area Insets need Logical versions #6379

@jensimmons

Description

@jensimmons

Currently, the Environment Variables specification defines four variables, all physical:

safe-area-inset-top
safe-area-inset-right
safe-area-inset-bottom
safe-area-inset-left

At first glance, having physical definitions seems to be all we need. We are, after all, describing literally the top, right, bottom and left edges of a device.

However, we do need logical versions. Presumably:

safe-area-inset-block-start
safe-area-inset-block-end
safe-area-inset-inline-start
safe-area-inset-inline-end

Why? For use cases like this, where the text headline & paragraphs need an inline-start margin to push them away from the left edge.

Screen Shot 2021-06-14 at 2 52 04 PM

To support LTR + horizontal-tb, I can just write margin-left: env(safe-area-inset-left), but to support multiple writing modes, I should use margin-inline-start: env(safe-area-inset-inline-start);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions