Skip to content

Marker labels invisible on Safari / Firefox (no CSS Anchor Positioning) #116

Description

@Yeom-JinHo

v2's bindable markers rely on CSS Anchor Positioning, which only Chromium ships today. On Safari, Firefox, and every iOS browser (Chrome, Edge, Firefox on iOS all use WebKit per App Store policy), anchor() is silently ignored and labels collapse — they have no way to find the marker's screen position.

This isn't a "use a different browser" workaround on iOS, since there isn't one.

Desktop Chrome (works)

Image

iOS Chrome / Safari (broken)

Image Image

Proposal

cobe already computes each marker's screen position and writes it to an invisible anchor div as style.left/top. Publishing the same values as global CSS variables would let users author a one-line

fallback:

.label {
  /* Chromium */
  position-anchor: --cobe-sf;
  bottom: anchor(top); left: anchor(center);

  /* Safari / Firefox / iOS */
  @supports not (anchor-name: --x) {
    left: var(--cobe-sf-x); top: var(--cobe-sf-y);
    transform: translate(-50%, -100%);
  }
}

~6 lines of runtime change, additive, no API/type changes.
Happy to send a PR if the direction looks good.

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions