Media Query for each custom widget
Hello,
I’ve created custom widget called “spacer widget” to SiteOrigin.
I’ve added two inputs in widget’s form. One for dekstop height and second for mobile height.
I’d like to manipulate height property depending on media queries. One for desktop breakpoint and one for mobile breakpoint.
I ask for help how to do it or at least where should I look in order to achieve it foreach spacer widget.
Ps.: I think that I need:
1. store variables “widget_ID” and “mobile_height” from $instance variable in widget template.
2. In order to do this I need to add inline css in head section.
I greatly appreaciate all help.
Greetings
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
1Hi Pawel,
You can dynamically apply media queries using LESS Styling functionality. As an example of this, we do this with the SiteOrigin Features widget to allow users to adjust the collapse point.
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.