[−][src]Struct grass::Options
Configuration for Sass compilation
The simplest usage is grass::Options::default()
;
however, a builder pattern is also exposed to offer
more control.
Implementations
impl<'a> Options<'a>
[src]
#[must_use]pub fn style(self, style: OutputStyle) -> Self
[src]
grass
currently offers 2 different output styles
OutputStyle::Expanded
writes each selector and declaration on its own line.OutputStyle::Compressed
removes as many extra characters as possible and writes the entire stylesheet on a single line.
By default, output is expanded.
#[must_use]pub fn quiet(self, quiet: bool) -> Self
[src]
This flag tells Sass not to emit any warnings
when compiling. By default, Sass emits warnings
when deprecated features are used or when the
@warn
rule is encountered. It also silences the
@debug
rule.
By default, this value is false
and warnings are emitted.
#[must_use]pub fn load_path(self, path: &'a Path) -> Self
[src]
All Sass implementations allow users to provide
load paths: paths on the filesystem that Sass
will look in when locating modules. For example,
if you pass node_modules/susy/sass
as a load path,
you can use @import "susy"
to load node_modules/susy/sass/susy.scss
.
Imports will always be resolved relative to the current file first, though. Load paths will only be used if no relative file exists that matches the module's URL. This ensures that you can't accidentally mess up your relative imports when you add a new library.
This method will append a single path to the list.
#[must_use]pub fn load_paths(self, paths: &'a [&'a Path]) -> Self
[src]
Append multiple loads paths
Note that this method does not remove existing load paths
See Options::load_path
for more information about load paths
#[must_use]pub fn allows_charset(self, allows_charset: bool) -> Self
[src]
This flag tells Sass whether to emit a @charset
declaration or a UTF-8 byte-order mark.
By default, Sass will insert either a @charset
declaration (in expanded output mode) or a byte-order
mark (in compressed output mode) if the stylesheet
contains any non-ASCII characters.
#[must_use]pub fn unicode_error_messages(self, unicode_error_messages: bool) -> Self
[src]
This flag tells Sass only to emit ASCII characters as part of error messages.
By default Sass will emit non-ASCII characters for these messages.
This flag does not affect the CSS output.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Options<'a>
impl<'a> Send for Options<'a>
impl<'a> Sync for Options<'a>
impl<'a> Unpin for Options<'a>
impl<'a> UnwindSafe for Options<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,