pub enum Preflight {
None,
Custom(Cow<'static, str>),
Full {
font_feature_settings_sans: Option<Cow<'static, str>>,
font_variation_settings_sans: Option<Cow<'static, str>>,
font_feature_settings_mono: Option<Cow<'static, str>>,
font_variation_settings_mono: Option<Cow<'static, str>>,
font_family_sans: Option<Cow<'static, str>>,
font_family_mono: Option<Cow<'static, str>>,
},
}Expand description
The set of default styles.
The default value is
Preflight::Full {
font_feature_settings_sans: None,
font_variation_settings_sans: None,
font_feature_settings_mono: None,
font_variation_settings_mono: None,
font_family_sans: None,
font_family_mono: None,
}i.e it will include the full preflight with the default values for all fields. Check the methods to see what they are.
See crate::preflight.
Variants§
None
No preflight will be generated.
Custom(Cow<'static, str>)
A custom preflight will be used.
Full
The full default preflight will be generated with some configuration options.
Fields
font_feature_settings_sans: Option<Cow<'static, str>>Set the font feature settings of the whole document for the sans-serif font.
font_variation_settings_sans: Option<Cow<'static, str>>Set the font variation settings of the whole document for the sans-serif font.
font_feature_settings_mono: Option<Cow<'static, str>>Set the font feature settings of the whole document for the monospace font.
font_variation_settings_mono: Option<Cow<'static, str>>Set the font variation settings of the whole document for the monospace font.
Implementations§
Source§impl Preflight
impl Preflight
Sourcepub fn new_none() -> Self
pub fn new_none() -> Self
Create a new Preflight::None.
Sourcepub fn new_custom<T: Into<Cow<'static, str>>>(css: T) -> Self
pub fn new_custom<T: Into<Cow<'static, str>>>(css: T) -> Self
Create a new Preflight::Custom.
Sourcepub fn new_full() -> Self
pub fn new_full() -> Self
Create a new Preflight::Full with default values for options.
Sourcepub fn font_feature_settings_sans<T: Into<Cow<'static, str>>>(
self,
new_font_feature_settings: T,
) -> Self
pub fn font_feature_settings_sans<T: Into<Cow<'static, str>>>( self, new_font_feature_settings: T, ) -> Self
Set the font feature settings of the whole document for the sans-serif font.
The default value is normal.
Sourcepub fn font_variation_settings_sans<T: Into<Cow<'static, str>>>(
self,
new_font_variation_settings: T,
) -> Self
pub fn font_variation_settings_sans<T: Into<Cow<'static, str>>>( self, new_font_variation_settings: T, ) -> Self
Set the font variation settings of the whole document for the sans-serif font.
The default value is normal.
Sourcepub fn font_feature_settings_mono<T: Into<Cow<'static, str>>>(
self,
new_font_feature_settings: T,
) -> Self
pub fn font_feature_settings_mono<T: Into<Cow<'static, str>>>( self, new_font_feature_settings: T, ) -> Self
Set the font feature settings of the whole document for the monospace font.
The default value is normal.
Sourcepub fn font_variation_settings_mono<T: Into<Cow<'static, str>>>(
self,
new_font_variation_settings: T,
) -> Self
pub fn font_variation_settings_mono<T: Into<Cow<'static, str>>>( self, new_font_variation_settings: T, ) -> Self
Set the font variation settings of the whole document for the monospace font.
The default value is normal.
Sourcepub fn font_family_sans<T: Into<Cow<'static, str>>>(
self,
new_font_family_sans: T,
) -> Self
pub fn font_family_sans<T: Into<Cow<'static, str>>>( self, new_font_family_sans: T, ) -> Self
Set the default sans-serif font family.
The default value is ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji".
Sourcepub fn font_family_mono<T: Into<Cow<'static, str>>>(
self,
new_font_family_mono: T,
) -> Self
pub fn font_family_mono<T: Into<Cow<'static, str>>>( self, new_font_family_mono: T, ) -> Self
Set the default monospace font family.
The default value is ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace.