1
0
mirror of https://github.com/GenderDysphoria/GenderDysphoria.fyi.git synced 2025-11-25 12:32:42 +00:00

Move off of sass legacy api and disable deprecation warnings

This commit is contained in:
Jocelyn Badgley
2025-10-08 07:45:50 -07:00
parent 54c7b125d9
commit 6eafb7d435
2 changed files with 6 additions and 13 deletions

View File

@@ -45,21 +45,14 @@ class Sass extends File {
contents = contents.replace(match, insert); contents = contents.replace(match, insert);
} }
const sassOptions = { let { css } = await sass.compileStringAsync(contents, {
data: contents, loadPaths: [
file: resolve(this.input),
includePaths: [
resolve(this.cwd), resolve(this.cwd),
resolve('node_modules'), resolve('node_modules'),
], ],
sourceMapEmbed: true, sourceMapEmbed: true,
}; silenceDeprecations: [ 'mixed-decls', 'color-functions', 'global-builtin', 'import' ],
});
let { css } = await (new Promise((resolve, reject) => { // eslint-disable-line no-shadow
sass.render(sassOptions, (err, result) => (
err ? reject(err) : resolve(result)
));
}));
if (prod) { if (prod) {
css = (await postcss([ autoprefixer ]).process(css, { css = (await postcss([ autoprefixer ]).process(css, {

View File

@@ -224,7 +224,7 @@ body.post {
.post-link { .post-link {
flex: 1; flex: 1;
flex-basis: $sidebarWidth / 2; flex-basis: div($sidebarWidth, 2);
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -268,7 +268,7 @@ body.post {
position: relative; position: relative;
.post-tags { .post-tags {
display: grid; display: grid;
grid-template-columns: repeat( auto-fill, minmax( $sidebarWidth / 2 - 15, 1fr ) ); grid-template-columns: repeat( auto-fill, minmax( div($sidebarWidth, 2) - 15, 1fr ) );
} }
} }
} }