Home>Support>Compiling Less files for additional SiteOrigin Widgets

Compiling Less files for additional SiteOrigin Widgets

Hello,

Thank you for providing documentation on creating additional SiteOrigin widgets. We have been trying to get things setup but have gotten stuck on compiling the LESS files for a widget.

We have gotten to the point of having your build setup in our folder of additional site origin widgets. Right now the `extra-widgets/uu-team-widget/styles/uu-team-widget-style.less` gets recompiled to `extra-widgets/uu-team-widget/styles/uu-team-widget-style.css`.

In the main widget file within the SiteOrigin_Widget class we set:

function get_style_name($instance) {
		return 'uu-team-widget-style';
	}

Following these instructions for widget styles.

However, the new .css file does not get read by the widget. Where is the widget expecting to find it’s .css files?

Thanks in advance for your help. Also, if we purchased SiteOrigin Premium would that include additional support for SiteOrigin widget development?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 6 years, 10 months ago Alex S
    Hi, I Work Here

    This thread is being handled by premium support.

  2. 6 years, 10 months ago Alex S
    Hi, I Work Here

    This is a copy of my premium suport reply.

    Hi Rachel,

    The widgets Less file will be compiled at runtime (as in, when the page itself is viewed) as it may need specific values from the user’s selected settings. To clarify, this LESS file are less (no pun intended) about your development workflow and more about allowing your widget to generate custom CSS based on selections. Does that make sense? To clarify, have you read this document? https://siteorigin.com/docs/widgets-bundle/templating/less-stylesheets/

    To answer your SiteOrigin Premium question, yes – we provide some development support but please note that we aren’t able to assist with custom development.

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.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More