Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we reset inheritable CSS properties? #140

Closed
Malvoz opened this issue Aug 17, 2020 · 0 comments · Fixed by #141
Closed

Should we reset inheritable CSS properties? #140

Malvoz opened this issue Aug 17, 2020 · 0 comments · Fixed by #141

Comments

@Malvoz
Copy link
Member

Malvoz commented Aug 17, 2020

(Background/reference: https://developers.google.com/web/fundamentals/web-components/shadowdom#reset)

By default, some (author provided) CSS properties are inherited from body/html elements into the map element, e.g. text-transform, letter-spacing, font-size etc.

This may cause unexpected issues in the map layout or its components. The following CSS is applied in both cases as shown below, whereas in the bottom map elment :host { all: initial; } is applied:

html {
  letter-spacing: 5px;
}

As such we may want to reset everything before leaflet.css/mapml.css/other :host styles are applied (result would be that of the bottom map), by setting the all property to initial. Of course, in some cases we may want to explicitly allow inheritance if we find use cases for it by setting {property}: inherit in mapml.css/:host.

@Malvoz Malvoz changed the title Should we reset inherited CSS properties? Should we reset inheritable CSS properties? Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant