Struct tailwind_css::TailwindBuilder
source · [−]pub struct TailwindBuilder {
pub obfuscate: bool,
pub objects: BTreeSet<CssInstance>,
pub preflight: PreflightSystem,
pub palettes: PaletteSystem,
pub screens: BreakPointSystem,
pub fonts: FontSystem,
}
Fields
obfuscate: bool
Whether to enable class name confusion
objects: BTreeSet<CssInstance>
preflight: PreflightSystem
palettes: PaletteSystem
All dynamic color properties
Only determined when packing
screens: BreakPointSystem
All dynamic break points
Only determined when packing
fonts: FontSystem
All dynamically registered font properties
Only determined when packing
Implementations
sourceimpl TailwindBuilder
impl TailwindBuilder
sourcepub fn preflight(&mut self) -> &mut PreflightSystem
pub fn preflight(&mut self) -> &mut PreflightSystem
Config for preflight progress
sourcepub fn preflight_addition(&mut self, custom: impl Into<String>)
pub fn preflight_addition(&mut self, custom: impl Into<String>)
Add custom preflight information
sourceimpl TailwindBuilder
impl TailwindBuilder
sourcepub fn trace(&mut self, style: &str) -> CssBundle
pub fn trace(&mut self, style: &str) -> CssBundle
Trace mode
Returns
Not all instructions can be inline, if not, it will fall back to trace mode
- Anonymous style sheets, which can be placed inside
style
tags
Example
- input
<div class="p-auto px-px pt-2 pb-2">Test</div>
- output
<div class="p-auto px-px pt-2 pb-2">Test</div>
<style> {} </style>
sourcepub fn inline(&mut self, style: &str) -> CssBundle
pub fn inline(&mut self, style: &str) -> CssBundle
Inline mode
Returns
Not all instructions can be inline, if not, it will fall back to trace mode
- Anonymous style sheets, which can be placed inside
style
tags
Example
- input
<div class="p-auto px-px pt-2 pb-2">Test</div>
- output
<div class="p-auto px-px pt-2 pb-2">Test</div>
<style> {} </style>
sourcepub fn interpret(
&mut self,
style: &str,
mode: Option<InlineMode>
) -> Result<CssBundle>
pub fn interpret(
&mut self,
style: &str,
mode: Option<InlineMode>
) -> Result<CssBundle>
Safe version of TailwindBuilder::inline
Trait Implementations
sourceimpl Debug for TailwindBuilder
impl Debug for TailwindBuilder
Auto Trait Implementations
impl RefUnwindSafe for TailwindBuilder
impl Send for TailwindBuilder
impl Sync for TailwindBuilder
impl Unpin for TailwindBuilder
impl UnwindSafe for TailwindBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more