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

Change absolute units(px) to relative units(rem) #7571

Closed
wants to merge 2 commits into from
Closed

Change absolute units(px) to relative units(rem) #7571

wants to merge 2 commits into from

Conversation

Chandu-4444
Copy link
Contributor

Hey, I've changed the units mentioned here #7548 . I'm a beginner, please let me know if anything's wrong.

Copy link

@ivanetra ivanetra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes can be merged!

@jonkoops
Copy link
Collaborator

jonkoops commented Nov 4, 2021

I believe this might actually be a breaking change as the rem unit is relative to the font-size of the root element of the page. Since this can be different for each page Leaflet is embedded in this might cause unexpected side-effects.

@mourner
Copy link
Member

mourner commented Nov 4, 2021

It's also breaking because rem has no or partial support in older versions of IE, which we still formally support: https://caniuse.com/rem, so I'll close this for now and revisit once we drop the old IE versions in v2.

@mourner mourner closed this Nov 4, 2021
@jonkoops
Copy link
Collaborator

jonkoops commented Nov 4, 2021

I don't believe compatibility with Internet Explorer needs to be a problem as we can provide a fallback value.

@@ -431,7 +431,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
border-top: none;
line-height: 1.1;
padding: 2px 5px 1px;
font-size: 11px;
font-size: 0.69rem;
Copy link
Member

@Malvoz Malvoz Nov 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Chandu-4444 would you like to update all changes to also include the px unit declarations as a fallback per #7571 (comment)?

i.e. to use both, but with the rem declaration after:

font-size: 11px;
font-size: 0.69rem;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sure!

@mourner
Copy link
Member

mourner commented Nov 22, 2021

I tried reopening but it doesn't allow me to, saying that the repo of the PR has been deleted — want to update @Chandu-4444, or submit a new PR if it's not easily possible?

@Chandu-4444
Copy link
Contributor Author

I tried reopening but it doesn't allow me to, saying that the repo of the PR has been deleted — want to update @Chandu-4444, or submit a new PR if it's not easily possible?

I'll submit a new PR then.

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 this pull request may close these issues.

5 participants