pub enum Preflight {
None,
Custom(Cow<'static, str>),
Full {
ring_color: Option<Cow<'static, str>>,
border_color: Option<Cow<'static, str>>,
placeholder_color: 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.
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
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 ring_color<T: Into<Cow<'static, str>>>(self, new_ring_color: T) -> Self
pub fn ring_color<T: Into<Cow<'static, str>>>(self, new_ring_color: T) -> Self
Set the default ring color.
The default value is rgb(59 130 246 / 0.5)
.
Sourcepub fn border_color<T: Into<Cow<'static, str>>>(
self,
new_border_color: T,
) -> Self
pub fn border_color<T: Into<Cow<'static, str>>>( self, new_border_color: T, ) -> Self
Set the default border color.
The default value is currentColor
.
Sourcepub fn placeholder_color<T: Into<Cow<'static, str>>>(
self,
new_placeholder_color: T,
) -> Self
pub fn placeholder_color<T: Into<Cow<'static, str>>>( self, new_placeholder_color: T, ) -> Self
Set the default placeholder color.
The default value is #9ca3af
.
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
.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Preflight
impl<'de> Deserialize<'de> for Preflight
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Preflight
impl StructuralPartialEq for Preflight
Auto Trait Implementations§
impl Freeze for Preflight
impl RefUnwindSafe for Preflight
impl Send for Preflight
impl Sync for Preflight
impl Unpin for Preflight
impl UnwindSafe for Preflight
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.