mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: closes #11559, fix some rtl issues
This commit is contained in:
@@ -161,18 +161,21 @@ actions.buildCSS = async function buildCSS(data) {
|
|||||||
const scssOutput = await sass.compileStringAsync(data.source, {
|
const scssOutput = await sass.compileStringAsync(data.source, {
|
||||||
loadPaths: data.paths,
|
loadPaths: data.paths,
|
||||||
});
|
});
|
||||||
|
let css = scssOutput.css.toString();
|
||||||
|
|
||||||
async function processScss(direction) {
|
async function processScss(direction) {
|
||||||
const postcssArgs = [autoprefixer];
|
|
||||||
if (direction === 'rtl') {
|
if (direction === 'rtl') {
|
||||||
postcssArgs.unshift(rtlcss());
|
css = await postcss([rtlcss()]).process(css, {
|
||||||
|
from: undefined,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
const postcssArgs = [autoprefixer];
|
||||||
if (data.minify) {
|
if (data.minify) {
|
||||||
postcssArgs.push(clean({
|
postcssArgs.push(clean({
|
||||||
processImportFrom: ['local'],
|
processImportFrom: ['local'],
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
return await postcss(postcssArgs).process(scssOutput.css.toString(), {
|
return await postcss(postcssArgs).process(css, {
|
||||||
from: undefined,
|
from: undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user