Skip to content

[css-view-transitions-2][css-conditionals] Exposing navigation/route matching #12594

@noamr

Description

@noamr

Following from a past discussion around navigation-matching for view-transitions in #8925, there is an emerging proposal to expose "routes" (URL patterns) directly in the platform, and allow CSS to respond to them.

See route matching explainer, as well as WICG/declarative-partial-updates#46 for discussing the route-map syntax.

The proposal currently is to have a <script type=routemap> that gives names to different URL(pattern)s, and then allowing to select them via CSS, for example:

<script type=routemap>
 { "article": "/article/:id" }
</script>

<style>
@route article {
  section[name=article] {
    display: block;
  }
}
</style>

Opening this issue for an introductory presentation at the F2F and see if this kind of direction resonates.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Tuesday Afternoon

    Status

    Agenda+ TPAC/FTF

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions