From e1e643d2867045266c6fbde45e34d5920e5d1cca Mon Sep 17 00:00:00 2001 From: Connor Skees Date: Mon, 6 Jul 2020 19:47:12 -0400 Subject: [PATCH] emit `@import` when importing a url or .css file --- src/output.rs | 22 +++++++++++++++-- src/parse/import.rs | 59 ++++++++++++++++++++++++--------------------- src/parse/mod.rs | 3 +++ tests/imports.rs | 44 ++++++++++++++++++++++++++++++--- 4 files changed, 94 insertions(+), 34 deletions(-) diff --git a/src/output.rs b/src/output.rs index 8c173b0..8f7d31f 100644 --- a/src/output.rs +++ b/src/output.rs @@ -32,13 +32,16 @@ enum Toplevel { Media { query: String, body: Vec }, Supports { params: String, body: Vec }, Newline, + // todo: do we actually need a toplevel style variant? Style(Style), + Import(String), } #[derive(Debug, Clone)] enum BlockEntry { - Style(Box