Link to home
Start Free TrialLog in
Avatar of ocean O
ocean OFlag for United States of America

asked on

CSS/leaflet

I had a question about CSS:
I had a code like below. From browser, I can see a samll icon  and I hover on top the icon, I can see "SITE CALL".  It use ::before and ::after effect
<a class="leaflet-control-dropdown-wc fas fa-th-large site-call-icon" title="SITE CALL" style="pointer-events: auto; opacity: 1;"></a>

If I click the icon, it will open a dialog. Below is code:
$(document).on('mouseup', ".leaflet-control > a.leaflet-control-dropdown-wc", function (e) {
            
            openSites($(".leaflet-top.leaflet-left > .leaflet-control"));
      });

I have a couple questions here:
I don't see the icon in the code, but I do see glyphs under css/fonts folder, there are some woff/ttf/eot/svg files, but I can't open them.
I also see there is one fontawesome folder which also have some woff files there.
where does "leaflet-control-dropdown-wc" defined? so it can show the icon?  I can only find "leaflet-control-dropdown-wc" in this two places. There must be a way to connect to it, since I am going to add a new icon ("search" ) for it. I don't know where to define the class , like "leaflet-control-dropdown-wc" for the "search" icon.

By the way, what does > mean here? leaflet-control > a.leaflet-control-dropdown-wc  . Does it mean leaflet-control is the parent of leaflet-control-dropdown-wc?

Any inputs will appreciated
Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

"site-call-icon" is almost certainly the class that assigns the icon/glyph being used.  Both it and "leaflet-control-dropdown-wc" are probably defined in CSS somewhere.  They both look like they're part of some CSS framework (I won't hazard a guess on which one), but it's possible the CSS is compiled or otherwise obfuscated.  

I would suggest going into "developer mode" in your browser, and see if the tools there will allow you to select the element and see what CSS applies to it.
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ocean O

ASKER

Thanks for the help!