mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-11-25 20:42:40 +00:00
Move off of sass legacy api and disable deprecation warnings
This commit is contained in:
@@ -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, {
|
||||||
|
|||||||
@@ -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 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user