Struct tailwind_css::CssBundle
source · [−]pub struct CssBundle { /* private fields */ }
Expand description
A collection of css objects
Separate or merge as needed
Implementations
sourceimpl CssBundle
impl CssBundle
pub fn add_trace(&mut self, item: &CssInstance)
sourcepub fn add_inline(&mut self, item: CssInstance)
pub fn add_inline(&mut self, item: CssInstance)
insert new css instance to the html tag
pub fn obfuscate(css: &Self) -> String
sourcepub fn as_inlined(&self) -> (String, String)
pub fn as_inlined(&self) -> (String, String)
Try inline styles, keep the class name if that fails.
Returns
.0
: css classes rest, maybe empty.1
: css style
<img class="not-inlinable" style="k1:v1;k2:v2;"/>
sourcepub fn as_data_key(&self)
pub fn as_data_key(&self)
sourcepub fn as_data_value(&self)
pub fn as_data_value(&self)
pub fn set_mode(&mut self, mode: CssBundleMode)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CssBundle
impl Send for CssBundle
impl Sync for CssBundle
impl Unpin for CssBundle
impl UnwindSafe for CssBundle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more