A new HTML `<geolocation>` element has landed in Chrome, functioning as a button that handles location permission flows including recovery from denied states. The element enforces strict CSS restrictions for security and accessibility reasons: some CSS properties are completely ignored, others are capped at safe ranges, and some are allowed but silently disable the button's functionality when they reduce contrast or visibility below acceptable thresholds. Automatic localization based on the `lang` attribute is supported. The element's content lives in a user-agent Shadow Root with no exposed `part` attributes for styling.

5m read timeFrom frontendmasters.com
Post cover image
Table of contents
You can’t change the text or the iconThere is various CSS you just can’t use .There is some CSS that is fenced.There is some CSS that is allowed, but then disables the button.It’s kinda weird.

Sort: