<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How can I create a theme contributor in 7.3.10 that uses bootstrap mixins</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121132657" />
  <subtitle>How can I create a theme contributor in 7.3.10 that uses bootstrap mixins</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121132657</id>
  <updated>2026-04-07T08:23:11Z</updated>
  <dc:date>2026-04-07T08:23:11Z</dc:date>
  <entry>
    <title>RE: How can I create a theme contributor in 7.3.10 that uses bootstrap mixins</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121441531" />
    <author>
      <name>Rob Hazel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121441531</id>
    <updated>2022-06-13T12:57:02Z</updated>
    <published>2022-06-13T12:50:48Z</published>
    <summary type="html">&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have just found a solution for this. For anyone else who wants to
  know how to do this, this is what you do:&lt;/p&gt;
&lt;p&gt;1. Create a Theme Contributor (Liferay module project).&lt;/p&gt;
&lt;p&gt;2. Add a package.json to your module project. I'm using atlas
  variables form the @clayui/css npm package:&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;//Package.json
{
    &amp;quot;name&amp;quot;: &amp;quot;my-theme-contributor&amp;quot;,
    &amp;quot;version&amp;quot;: &amp;quot;1.0.0&amp;quot;,
    &amp;quot;dependencies&amp;quot;: {
        &amp;quot;@clayui/css&amp;quot;: &amp;quot;latest&amp;quot;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;3. Import the files into your build.gradle cssBuild task:&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;//build.gradle

dependencies {
	cssBuilder group: &amp;quot;com.liferay&amp;quot;, name: &amp;quot;com.liferay.css.builder&amp;quot;, version: &amp;quot;3.0.2&amp;quot;
}

repositories {
	maven {
		url &amp;quot;https://repository-cdn.liferay.com/nexus/content/groups/public&amp;quot;
	}
}

buildCSS {
    dependsOn &amp;quot;:yarnInstall&amp;quot;

    imports=[
        new File(npmInstall.nodeModulesDir, &amp;quot;@clayui/css/src/scss&amp;quot;)
    ]
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note: We are using yarn as a package manager. The line 'dependsOn
  &amp;quot;:yarnInstall&amp;quot; ensure that the npm package is installed
  before running the CSS builder. If you are using npm as a package
  manager I think it would be 'dependsOn &amp;quot;:npmInstall&amp;quot;.&lt;/p&gt;
&lt;p&gt;4.  Import 'atlas-variables' into your scss file:&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;// main.css

@import 'atlas-variables';

body {
    background-color: lightblue !important;
    @include media-breakpoint-up(md) {
        background-color: blue !important;
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Rob Hazel</dc:creator>
    <dc:date>2022-06-13T12:50:48Z</dc:date>
  </entry>
  <entry>
    <title>How can I create a theme contributor in 7.3.10 that uses bootstrap mixins</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121132656" />
    <author>
      <name>Rob Hazel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121132656</id>
    <updated>2021-09-16T20:10:32Z</updated>
    <published>2021-09-07T16:48:50Z</published>
    <summary type="html">&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I would like to create a theme contributor in 7.3 that can use the
  bootstrap mixins (e.g. media-breakpoint-up(md)); these are available
  to use in a theme, but not in a theme contributor. Looking at the &lt;a
    href="https://github.com/liferay/liferay-portal/tree/7.3.x/modules/apps/product-navigation/product-navigation-control-menu-theme-contributor"&gt;Product
    navigation theme contributor&lt;/a&gt;, it uses the @clayui/css npm
  module, and then imports the atlas_variables in the main scss file.  I
  have tried copying the logic into my code, but I cannot get it to work.&lt;/p&gt;
&lt;p&gt;Does anyone know of an example where this is done, or can tell me how
  I can configure my module to get it working? The examples that I have
  found on the clay-ui site and the docs for the liferay-npm-bundler
  focus on JS modules, but I want to import the atlas variables into a
  scss file.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;br /&gt; Rob.&lt;/p&gt;
&lt;p&gt;Disclaimer: this question was previously posted &lt;a
  href="https://liferay-community.slack.com/archives/CB2QQ3M5F/p1628602301014400"&gt;here&lt;/a&gt;
  on Slack.&lt;/p&gt;</summary>
    <dc:creator>Rob Hazel</dc:creator>
    <dc:date>2021-09-07T16:48:50Z</dc:date>
  </entry>
</feed>
