Updated a few more things

This commit is contained in:
QuiteAFancyEmerald 2022-02-08 00:43:17 -08:00
parent c827e9f7e1
commit 73cdcb3186
47 changed files with 35805 additions and 1102 deletions

14
lib/css/import.js Normal file
View file

@ -0,0 +1,14 @@
module.exports = {
type: 'Atrule',
condition: node => node.name == 'import' && node.prelude && node.prelude.type == 'AtrulePrelude' && node.prelude.children.head.data.type == 'String',
rewrite: ({ prelude }, data) => {
const head = prelude.children.head.data;
const quote = head.value.substring(0, 1);
head.value = quote + data.ctx.url.wrap(head.value.slice(1).slice(0, -1), data.meta) + quote;
},
source: ({ prelude }, data) => {
const head = prelude.children.head.data;
const quote = head.value.substring(0, 1);
head.value = quote + data.ctx.url.unwrap(head.value.slice(1).slice(0, -1)) + quote;
},
};