Struct tailwind_css::TailwindBuilder
source · [−]pub struct TailwindBuilder {
pub obfuscate: bool,
pub objects: BTreeSet<Box<dyn TailwindInstance>>,
pub preflight: PreflightSystem,
pub palettes: PaletteSystem,
pub screens: BreakPointSystem,
pub fonts: FontSystem,
}
Fields
obfuscate: bool
objects: BTreeSet<Box<dyn TailwindInstance>>
preflight: PreflightSystem
palettes: PaletteSystem
screens: BreakPointSystem
fonts: FontSystem
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) -> String
pub fn trace(&mut self, style: &str) -> String
Inline mode(no bundle)
Returns
- 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 try_trace(&mut self, style: &str) -> Result<String>
pub fn try_trace(&mut self, style: &str) -> Result<String>
Safe version of TailwindBuilder::trace
sourcepub fn scope(&self, style: &str)
pub fn scope(&self, style: &str)
Inline mode(no bundle)
Returns
- 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 try_scope()
pub fn try_scope()
Safe version of TailwindBuilder::scope
sourcepub fn dataset()
pub fn dataset()
Inline mode(no bundle)
Returns
- 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) -> String
pub fn inline(&mut self, style: &str) -> String
Inline mode(no bundle)
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 try_inline(&mut self, style: &str) -> Result<String>
pub fn try_inline(&mut self, style: &str) -> Result<String>
Safe version of TailwindBuilder::inline
sourcepub fn try_bundle(&self, cap: usize) -> Result<String>
pub fn try_bundle(&self, cap: usize) -> Result<String>
Safe version of TailwindBuilder::bundle
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