Skip to content

Commit

Permalink
fix: clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Sep 28, 2024
1 parent 6d3f615 commit 80dc486
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src-tauri/src/processors/css_preprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pub fn localize_imports(win: tauri::WebviewWindow, css: String, name: String) ->
#[cfg(target_os = "windows")]
#[tauri::command]
pub fn localize_imports(_win: tauri::WebviewWindow, css: String, _name: String) -> String {
log!("Windows no longer requires CSS imports to be localized");
log!("Windows no longer requires CSS imports to be localized, but it does require import shuffling!");

// We do still need to shuffle the @import statements to all be at the top
let mut new_css = css.clone();
Expand All @@ -181,8 +181,6 @@ pub fn localize_imports(_win: tauri::WebviewWindow, css: String, _name: String)
continue;
}

log!("Importing: {}", &url);

if seen_imports.contains(&url) {
// Remove the import statement from the css
new_css = new_css.replace(full_import, "");
Expand All @@ -194,7 +192,6 @@ pub fn localize_imports(_win: tauri::WebviewWindow, css: String, _name: String)

// Now add all the @import statements to the top
for import in seen_imports {
log!("Appending import: {}", &import);
let import = format!("@import url(\"https://{}\");", import);
new_css = format!("{}\n{}", import, new_css);
}
Expand Down

0 comments on commit 80dc486

Please sign in to comment.