This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Media Query for each custom widget

6 years ago · Last reply by Alex S 6 years ago

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

1
  1. Alex S Staff 6 years, 9 months ago

    Hi 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.

Have a different question or issue?

Start New Thread