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

Border around layercontrol not consistent with border around zoom control on mobile #2012

Closed
ICarryTheDustOfAJourney opened this issue Sep 8, 2013 · 5 comments
Assignees
Labels
Milestone

Comments

@ICarryTheDustOfAJourney
Copy link

On a full up-to-date Galaxy S3, S2 and Nexus 7 (Chrome and Firefox) the borders around the +- zoom control are transparent, but around the layer control its completely opaque.

@mourner
Copy link
Member

mourner commented Nov 6, 2013

I don't understand how that can be possible, as there's only one CSS line related to both zoom control and layers control and it sets the same border for them: https://github.com/Leaflet/Leaflet/blob/master/dist/leaflet.css#L392

Maybe it's something on your app side?

@mourner mourner closed this as completed Nov 6, 2013
@ICarryTheDustOfAJourney
Copy link
Author

Maybe it's something on your app side?

I don't think so. Even if I modified the CSS, it would apply to both controls.
Am I the only one seeing this?

Meanwhile I found a solution:

.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
    border: 4px solid rgba(0,0,0,0.3);
background-clip: content-box;   
    }

I suppose its an inherited problem, but I haven't dug further.

Update:
Careful, this now leads to an strange effect when opening the layer list.

Update 2:

background-clip: padding-box;

doesn't mess up the layer list but draws a decent transparent border around it.

@mourner
Copy link
Member

mourner commented Nov 7, 2013

@Grundguetiger that's really weird! I don't understand what's going on here.

@mourner mourner reopened this Nov 7, 2013
@ICarryTheDustOfAJourney
Copy link
Author

I don't understand what's going on here.

...welcome to my club ;)

I think it inherits an implicit property change from somewhere.
Probably correct behaviour, all browsers show the effect.


...after taking a closer look at the scale control:

May be consider removing the hardly visible but rather expensive box & text shadow effect on mobiles?

Edit:
and the transparencies. The control is on mobiles mostly hidden behind the semi-transparent attribution div.
Imagine the ROPs required here. I would trade in matter-of-taste eyecandy for more snappiness .

The class is .leaflet-control-scale-line and .leaflet-control-scale-line:not(:first-child)

just a thought.

@mourner
Copy link
Member

mourner commented Nov 13, 2013

All right, improved mobile styles significantly, fixed the border alpha, and remove text shadow.

@ghost ghost assigned mourner Nov 13, 2013
ddproxy added a commit to ddproxy/Leaflet that referenced this issue Nov 10, 2016
Issue Leaflet#2012 covers mobile devices

Leaflet/Leaflet.draw#629 detected an issue with svg in .leaflet-bar for retina or 'zoomed in' on chrome that would ignore scaling when using negative background positions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants