mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add support for user stylesheets specified on the command-line.
This commit is contained in:
parent
4bcb1dc926
commit
9317a30b91
2 changed files with 25 additions and 3 deletions
|
@ -12,6 +12,7 @@ use selectors::Element;
|
|||
use std::process;
|
||||
use smallvec::VecLike;
|
||||
use util::resource_files::read_resource_file;
|
||||
use util::opts;
|
||||
|
||||
use legacy::PresentationalHintSynthesis;
|
||||
use media_queries::Device;
|
||||
|
@ -76,6 +77,10 @@ impl Stylist {
|
|||
}
|
||||
}
|
||||
}
|
||||
for &(ref contents, ref url) in &opts::get().user_stylesheets {
|
||||
stylist.add_stylesheet(Stylesheet::from_bytes(
|
||||
&contents, url.clone(), None, None, Origin::User));
|
||||
}
|
||||
stylist
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue