A link to the current page loses its Current page styling after an anchor jump or when opened with a hash. Keep the page link active, and select only the matching section link when the URL has a fragment. Ref #5377 ## Changes - Match path and query exactly. - With no current fragment, match all links with that path and query. - With a current fragment, match links without a fragment and links with that exact fragment. - Keep the existing `:local-link` polyfill to `[aria-current=page]`. An explicit `aria-current` value can override that styling. - Give static pages the browser URL after hydration and update link state on fragment changes. ## Todo - [x] Implement the mixed path, query, and fragment matching rule. - [x] Cover plain links, router links, direct fragment loads, anchor navigation, and static hydration. - [x] Document the rule and its difference from standard `:local-link` behavior, with the MDN reference. - [x] Remove the redundant CSS selector rewrite, parser dependency, generated schema snapshot, and unneeded history listener. - [x] Run focused tests, typechecks, lint, formatting, and review the final diff. - [x] Confirm required CI checks pass on the latest cleanup commit. ## Verification - SDK link URL tests: 18 passed. - Plain React Link and hydration tests: 10 passed; hydration test passed again after narrowing the subscription to fragment changes. - Router Link tests: 23 passed. - SDK, React Link, router, and CSS engine typechecks passed. - Changed code passed oxlint, oxfmt, and `git diff --check`. - Native fragment event behavior was checked in Chromium, Firefox, and WebKit; hydration behavior was checked in Chromium. - Required GitHub CI passed on `9758b19a6d92c7ab8a2efc7efa553f725a68109f`; the empty Builder core shard passed on retry. ## Behavior note This mixed rule is Webstudio behavior, not the current CSS `:local-link` draft, which ignores fragments on both URLs. Local Link styling follows this mixed match. The mixed match also sets `aria-current="page"` by default, including on section links. Authors can set another value explicitly.
description
| description |
|---|
| New to Webstudio? |
👋 Welcome
Our getting started guide will help you navigate through building your first Webstudio website. It covers the essentials of creating web designs and integrating third-party tools. You'll learn how to utilize Webstudio's unique features like Design tokens and Components, and how to contribute to the project.
{% content-ref url="basics/building-your-first-site.md" %} building-your-first-site.md {% endcontent-ref %}
{% content-ref url="university/foundations/" %} foundations {% endcontent-ref %}
{% content-ref url="university/core-components/" %} core-components {% endcontent-ref %}
{% content-ref url="university/cli.md" %} cli.md {% endcontent-ref %}
{% content-ref url="university/inception.md" %} inception.md {% endcontent-ref %}
{% content-ref url="university/radix/" %} radix {% endcontent-ref %}
{% content-ref url="university/marketplace.md" %} marketplace.md {% endcontent-ref %}
{% content-ref url="university/self-hosting/" %} self-hosting {% endcontent-ref %}
{% content-ref url="university/how-tos/" %} how-tos {% endcontent-ref %}
{% content-ref url="university/integrations/" %} integrations {% endcontent-ref %}
{% content-ref url="university/craft.md" %} craft.md {% endcontent-ref %}
{% content-ref url="basics/FAQ.md" %} FAQ.md {% endcontent-ref %}
Looking to contribute to Webstudio?
{% content-ref url="contributing/contributions.md" %} contributions.md {% endcontent-ref %}
{% content-ref url="contributing/marketplace.md" %} marketplace.md {% endcontent-ref %}