An example currently in the spec is the following:
@route --search-results-page {
pattern: url-pattern("/search-results");
}
@route --product-page {
pattern: url-pattern("/product/:id");
}
@navigation ((from: --search-results-page) and
(to: --product-page)) or
((from: --product-page) and
(to: --search-results-page)) {
/* These styles apply when a navigation is in progress
between a search results page and a product page (as
defined by the @route rules above), in either
direction. */
}
The @navigation query there matches navigations between --search-results-page and --product-page, regardless of its direction.
This has a bit of a smell to it, and was also brought up in #13179 (comment).
Can we simplify this scenario?
Maybe by introducing between as a <navigation-location-keyword>?
@navigation (between: --search-results-page, --product-page) {
/* … */
}
Or something else?
/cc @dbaron @noamr