Thanks for your question and especially for adding the “gist” of the styles you’d like to use. Responsive styles have come before (e.g. Variable gallery columns) but I haven’t been able to give a good answer until now.
You can define a custom style template to get the results you need:
- Navigate to the Settings/Media Library Assistant Shortcodes tab.
- Click on the “Style” view below the Search Templates text box.
- Hover over the “default (default)” entry and click the “Copy” action link.
- When the page refreshes, the “Edit Template” screen will appear. Change the template Name to (for example) “mobile”.
- Scroll to the bottom of the Styles text box and add your responsive styles just above the last closing bracket. See my example styles below.
- Scroll to the bottom and click “Update”.
Here are the styles I added to the default template:
@media screen and ( max-width: 800px ) {
#[+selector+] .gallery-item {
float: left;
margin: auto;
text-align: center;
width: 50%;
}
}
@media screen and ( max-width: 768px ) {
#[+selector+] .gallery-item {
float: left;
margin: auto;
text-align: center;
width: 100%;
}
}
I threw in an intermediate step at 800px just to give an idea of what’s possible. It works quite well on my test system.
Once you have the template set up you can add an mla_style=mobile
parameter to your [mla_gallery]
shortcode to replace the default styles.
I hope that gets you started on a solution for your application. I am marking this topic resolved, but please update it if you have any problems or further questions regarding custom styles for MLA galleries. Thanks for an interesting question and for your interest in the plugin.