-
Notifications
You must be signed in to change notification settings - Fork 132
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
Allow for something other than MDL icons for the menu button. #165
Comments
As a work-around for now in your site CSS you can override the those to make them invisible and add an :after element that adds whatever you need for a font (via some parent div with, say, a some[data-myicon] > selector {
make it invisible however you want, like width=0px should work and put the :after in the right place
}
some[data-myicon] > selector:after {
content: attr(data-badge);
} I doubt that is the right setting or if the attr works from a parent, but there is always some way to do it via css. |
@Lattyware: This is something we'd like to do, but a little time might pass before anyone gets around to it. (We'd take a PR, of course.) In the short term, is @OvermindDL1's workaround an option for you? @aforemny: Is this something you'd be interested in looking at? |
@debois Yes I am! :) |
In the mean-time, here is a more elaborate example of @OvermindDL1's work-around. You hide the menu's icon using CSS and add a pseudo element that references the FontAwesome icon by it's UTF-8 code and apply the |
When allowing menus to be opened by arbitrary elements, the tooltip implementation comes to mind. Menus are different from tooltips in that on opening they are decoding information from the element that opens them as well as the menu itself. However, if we are requiring menus to be the next sibling of whatever opens them, the current implementation adapts easily. I hesitated to implement menus like this because of this implicit assumption. Do you agree that it is sensible for menus to be the next sibling of whatever opens them? If so, I will go ahead and implement that. |
Yes! Very neat. I made some comments directly on the commit. |
I personally would very much like |
@debois I'll probably just hold off on the transition over using the workaround - it's not being done out of necessity, just to move away from some custom code elm-mdl could replace. Great to see the activity on this project - looks like this is being handled already, but I'll look for chances to contribute myself if and when I get the time. |
I am currently porting a project (massivedecks) to use elm-mdl (from muicss integrated manually) - we used fontawesome for icons in the past, and the material design icon set is missing a number of icons used, so I have stuck with fontawesome and simply not included the MDL icons - that all seems fine and is working well, except the menu, which appears to only have support for MDL icons for the menu button.
It would unblock us to allow arbitrary content for the menu button as a replacement for the icon (I can also see this holding value for those that want text instead of an icon, for example). Otherwise we have to include two icon fonts, when one would do fine.
The text was updated successfully, but these errors were encountered: