Open khalyomede opened 4 years ago
Thanks for detailed explanation!
Overall this sounds like a good idea and reasonable feature request. My only worry is that it leads to CSS bloat which will be unused. Grid List component only provides foundation for consumers to create their own utility classes when it fits.
PR Welcome!
Thought of the same about the CSS load...
I'll try to come up with a PR, for the moment I guess it remains user-land, and folks can inspire from the description if needed.
Happy new year to you and the whole Material team!
Feature Request
Currently, one can customize by how many columns the Images List is displayed, by using the following example (quoted from the official GitHub documentation):
(source: https://github.com/material-components/material-components-web/tree/master/packages/mdc-image-list
However, this task can be hard (or impossible?) for components developer (Angular, VueJS, React, ...) to use Javascript variables in SCSS.
Here is what I propose
To have classes that let us "tell" how the components should expand in the different devices sizes (
mdc-image-list--span-<NUMBER_OF_COLUMNS>-<TYPE_OF_DEVICE>
).Proposed solution
Here is an example of how we could use the class I mentioned above (using HTML).
Note proposed available classes would be
Alternatives considered
I handcrafted these classes for my Vue.js image list component, using these classes names above.
Additional context
Here is how we (developer of components) could easily expose a components for a user.
Below an example of Vue.js page, made by the end user.
And here is the component developed by the Vue.js component developer.