How to import theme SCSS files in portletHow to import theme SCSS files in portlethttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1205169092024-03-29T10:11:40Z2024-03-29T10:11:40ZRE: How to import theme SCSS files in portletsunny huanghttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1205248732020-12-31T03:35:41Z2020-12-31T03:32:28Z<p>build.gradle file add</p>
<pre><code class="language-java">buildCSS {
imports = [
new File(npmInstall.nodeModulesDir, "@clayui/css/src/scss")
]
}</code></pre>
<p> </p>sunny huang2020-12-31T03:32:28ZHow to import theme SCSS files in portletsunny huanghttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1205169082020-12-25T02:42:31Z2020-12-25T02:42:31Z<p>hi all</p>
<p>I copied the source code of the document-library-web portlet, and an
error was reported during buildCSS. the file was not found. This
file should be the default SCSS file fo liferay theme. How do I import it?</p>
<p>ERROR</p>
<pre><code class="language-javascript">> Task :modules:document-library-web:buildCSS FAILED
Using native Sass compiler
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" com.liferay.sass.compiler.jsass.internal.JSassCompilerException: io.bit3.jsass.CompilationException: Error: File to import not found or unreadable: atlas-variables.
on line 1 of build/tmp/copyCSS/META-INF/resources/document_library/css/ddm.scss
>> @import 'atlas-variables';
^
at com.liferay.sass.compiler.jsass.internal.JSassCompiler.compileFile(JSassCompiler.java:134)
at com.liferay.css.builder.CSSBuilder._parseSass(CSSBuilder.java:395)
at com.liferay.css.builder.CSSBuilder._parseSassFile(CSSBuilder.java:407)
at com.liferay.css.builder.CSSBuilder.execute(CSSBuilder.java:166)
at com.liferay.css.builder.CSSBuilder.main(CSSBuilder.java:80)
Caused by: io.bit3.jsass.CompilationException: Error: File to import not found or unreadable: atlas-variables.
on line 1 of build/tmp/copyCSS/META-INF/resources/document_library/css/ddm.scss
>> @import 'atlas-variables';
^
at io.bit3.jsass.adapter.NativeAdapter.compileFile(Native Method)
at io.bit3.jsass.adapter.NativeAdapter.compile(NativeAdapter.java:44)
at io.bit3.jsass.Compiler.compile(Compiler.java:124)
at com.liferay.sass.compiler.jsass.internal.JSassCompiler.compileFile(JSassCompiler.java:115)
... 4 more
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':modules:document-library-web:buildCSS'.</code></pre>
<p>Ho