You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was putting together something for #1501 to help with overflowing horizontal tabular menus (since they are not great when they overflow on a narrow screen). Though menu does not currently have a JavaScript module to extend, so throwing this in here to see if/how we could implement this kind of functionality since I do not think it can be done purely with CSS
Essentially this could add a new .menu() module which could be applied to a menu to allow a menu to allow JavaScript to set the overflow method to none, auto, dropdown, and scroll
None is essentially the current setup (too many goes offscreen)
Dropdown does some calculations and if the tab will end up overflowing, will hide them, and add them to a dropdown
Scroll essentially will allow you to scroll through them with touch (similar way to Github when viewing on mobile)
Auto is a combination of dropdown and scroll, if the device is touch, then you get scroll, otherwise have dropdown
The slightly troublesome thing is I do not know if this should be a module (one function seems a little silly), and there are probably other examples of things that could potentially be added in where JavaScript makes a bit more sense to provide the functionality
Which made me think should there be some kind of standard way of perhaps making a plugin system which could make these kinds of things available and ensuring that other modules have been included if they need them when they run?
So this could possibly instead look like .plugin('pluginname', {plugin: settings}) where plugin does all the loading of modules, and providing all the base functionality (like debugging)
The text was updated successfully, but these errors were encountered:
I was putting together something for #1501 to help with overflowing horizontal tabular menus (since they are not great when they overflow on a narrow screen). Though menu does not currently have a JavaScript module to extend, so throwing this in here to see if/how we could implement this kind of functionality since I do not think it can be done purely with CSS
Demo:
https://jsfiddle.net/awcn96p0/
Essentially this could add a new
.menu()
module which could be applied to a menu to allow a menu to allow JavaScript to set the overflow method to none, auto, dropdown, and scrollThe slightly troublesome thing is I do not know if this should be a module (one function seems a little silly), and there are probably other examples of things that could potentially be added in where JavaScript makes a bit more sense to provide the functionality
Which made me think should there be some kind of standard way of perhaps making a plugin system which could make these kinds of things available and ensuring that other modules have been included if they need them when they run?
So this could possibly instead look like
.plugin('pluginname', {plugin: settings})
where plugin does all the loading of modules, and providing all the base functionality (like debugging)The text was updated successfully, but these errors were encountered: