pub struct ClassBuilder { /* private fields */ }
Expand description
Builder for creating class sets
Implementations§
Source§impl ClassBuilder
impl ClassBuilder
Sourcepub fn classes(self, classes: impl IntoIterator<Item = String>) -> Self
pub fn classes(self, classes: impl IntoIterator<Item = String>) -> Self
Add multiple base classes
Sourcepub fn responsive(
self,
breakpoint: Breakpoint,
class: impl Into<String>,
) -> Self
pub fn responsive( self, breakpoint: Breakpoint, class: impl Into<String>, ) -> Self
Add a responsive class
Sourcepub fn conditional(
self,
condition: impl Into<String>,
class: impl Into<String>,
) -> Self
pub fn conditional( self, condition: impl Into<String>, class: impl Into<String>, ) -> Self
Add a conditional class
Sourcepub fn custom(
self,
property: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn custom( self, property: impl Into<String>, value: impl Into<String>, ) -> Self
Add a custom CSS property
Sourcepub fn custom_variant(
self,
variant: impl Into<String>,
class: impl Into<String>,
) -> Self
pub fn custom_variant( self, variant: impl Into<String>, class: impl Into<String>, ) -> Self
Add a custom variant class (Tailwind v4.1.13 @custom-variant support)
Sourcepub fn aria(
self,
aria_attr: impl Into<String>,
class: impl Into<String>,
) -> Self
pub fn aria( self, aria_attr: impl Into<String>, class: impl Into<String>, ) -> Self
Add an ARIA variant class
Sourcepub fn data(
self,
data_attr: impl Into<String>,
value: Option<String>,
class: impl Into<String>,
) -> Self
pub fn data( self, data_attr: impl Into<String>, value: Option<String>, class: impl Into<String>, ) -> Self
Add a data variant class
Sourcepub fn supports(
self,
feature: impl Into<String>,
class: impl Into<String>,
) -> Self
pub fn supports( self, feature: impl Into<String>, class: impl Into<String>, ) -> Self
Add a supports variant class
Sourcepub fn build_string(self) -> String
pub fn build_string(self) -> String
Build the class set and convert to CSS string
Source§impl ClassBuilder
Convenience methods for space-between utilities
impl ClassBuilder
Convenience methods for space-between utilities
Source§impl ClassBuilder
Convenience methods for divide utilities
impl ClassBuilder
Convenience methods for divide utilities
Sourcepub fn divide_x_2(self) -> Self
pub fn divide_x_2(self) -> Self
Add horizontal divider between child elements with value 2
Sourcepub fn divide_x_4(self) -> Self
pub fn divide_x_4(self) -> Self
Add horizontal divider between child elements with value 4
Sourcepub fn divide_y_2(self) -> Self
pub fn divide_y_2(self) -> Self
Add vertical divider between child elements with value 2
Sourcepub fn divide_y_4(self) -> Self
pub fn divide_y_4(self) -> Self
Add vertical divider between child elements with value 4
Source§impl ClassBuilder
Convenience methods for aspect-ratio utilities
impl ClassBuilder
Convenience methods for aspect-ratio utilities
Sourcepub fn aspect_square(self) -> Self
pub fn aspect_square(self) -> Self
Add aspect-square utility
Sourcepub fn aspect_video(self) -> Self
pub fn aspect_video(self) -> Self
Add aspect-video utility
Sourcepub fn aspect_4_3(self) -> Self
pub fn aspect_4_3(self) -> Self
Add aspect-[4/3] utility
Source§impl ClassBuilder
Convenience methods for positioning utilities
impl ClassBuilder
Convenience methods for positioning utilities
Trait Implementations§
Source§impl AlignContentUtilities for ClassBuilder
impl AlignContentUtilities for ClassBuilder
fn align_content(self, align: AlignContent) -> Self
Source§impl AlignItemsUtilities for ClassBuilder
impl AlignItemsUtilities for ClassBuilder
fn align_items(self, align: AlignItems) -> Self
Source§impl AlignSelfUtilities for ClassBuilder
impl AlignSelfUtilities for ClassBuilder
fn align_self(self, align: AlignSelf) -> Self
Source§impl AnimationUtilities for ClassBuilder
impl AnimationUtilities for ClassBuilder
fn animation(self, animation: Animation) -> Self
Source§fn animation_with_duration(self, animation: Animation, duration_ms: u32) -> Self
fn animation_with_duration(self, animation: Animation, duration_ms: u32) -> Self
Source§fn animation_once(self, animation: Animation) -> Self
fn animation_once(self, animation: Animation) -> Self
Source§fn animation_repeat(self, animation: Animation, count: u32) -> Self
fn animation_repeat(self, animation: Animation, count: u32) -> Self
Source§fn slide_in_left(self) -> Self
fn slide_in_left(self) -> Self
Source§fn slide_in_right(self) -> Self
fn slide_in_right(self) -> Self
Source§fn slide_in_top(self) -> Self
fn slide_in_top(self) -> Self
Source§fn slide_in_bottom(self) -> Self
fn slide_in_bottom(self) -> Self
Source§fn hover_animation(self, animation: Animation) -> Self
fn hover_animation(self, animation: Animation) -> Self
Source§fn focus_animation(self, animation: Animation) -> Self
fn focus_animation(self, animation: Animation) -> Self
Source§fn animation_pause(self) -> Self
fn animation_pause(self) -> Self
Source§fn animation_resume(self) -> Self
fn animation_resume(self) -> Self
Source§impl ArbitraryValueUtilities for ClassBuilder
impl ArbitraryValueUtilities for ClassBuilder
Source§fn arbitrary_value(
self,
property: impl Into<String>,
value: impl Into<String>,
) -> Self
fn arbitrary_value( self, property: impl Into<String>, value: impl Into<String>, ) -> Self
Source§fn w_arbitrary(self, value: impl Into<String>) -> Self
fn w_arbitrary(self, value: impl Into<String>) -> Self
Source§fn h_arbitrary(self, value: impl Into<String>) -> Self
fn h_arbitrary(self, value: impl Into<String>) -> Self
Source§fn p_arbitrary(self, value: impl Into<String>) -> Self
fn p_arbitrary(self, value: impl Into<String>) -> Self
Source§fn m_arbitrary(self, value: impl Into<String>) -> Self
fn m_arbitrary(self, value: impl Into<String>) -> Self
Source§fn bg_arbitrary(self, value: impl Into<String>) -> Self
fn bg_arbitrary(self, value: impl Into<String>) -> Self
Source§fn text_arbitrary(self, value: impl Into<String>) -> Self
fn text_arbitrary(self, value: impl Into<String>) -> Self
Source§fn border_arbitrary(self, value: impl Into<String>) -> Self
fn border_arbitrary(self, value: impl Into<String>) -> Self
Source§fn text_size_arbitrary(self, value: impl Into<String>) -> Self
fn text_size_arbitrary(self, value: impl Into<String>) -> Self
Source§fn leading_arbitrary(self, value: impl Into<String>) -> Self
fn leading_arbitrary(self, value: impl Into<String>) -> Self
Source§fn tracking_arbitrary(self, value: impl Into<String>) -> Self
fn tracking_arbitrary(self, value: impl Into<String>) -> Self
Source§fn rounded_arbitrary(self, value: impl Into<String>) -> Self
fn rounded_arbitrary(self, value: impl Into<String>) -> Self
Source§fn shadow_arbitrary(self, value: impl Into<String>) -> Self
fn shadow_arbitrary(self, value: impl Into<String>) -> Self
Source§fn opacity_arbitrary(self, value: impl Into<String>) -> Self
fn opacity_arbitrary(self, value: impl Into<String>) -> Self
Source§fn z_arbitrary(self, value: impl Into<String>) -> Self
fn z_arbitrary(self, value: impl Into<String>) -> Self
Source§fn top_arbitrary(self, value: impl Into<String>) -> Self
fn top_arbitrary(self, value: impl Into<String>) -> Self
Source§fn right_arbitrary(self, value: impl Into<String>) -> Self
fn right_arbitrary(self, value: impl Into<String>) -> Self
Source§fn bottom_arbitrary(self, value: impl Into<String>) -> Self
fn bottom_arbitrary(self, value: impl Into<String>) -> Self
Source§fn left_arbitrary(self, value: impl Into<String>) -> Self
fn left_arbitrary(self, value: impl Into<String>) -> Self
Source§impl AspectRatioUtilities for ClassBuilder
impl AspectRatioUtilities for ClassBuilder
Source§fn aspect_ratio(self, ratio: &str) -> Self
fn aspect_ratio(self, ratio: &str) -> Self
Source§impl BackgroundAttachmentUtilities for ClassBuilder
impl BackgroundAttachmentUtilities for ClassBuilder
fn background_attachment(self, attachment: BackgroundAttachment) -> Self
Source§impl BackgroundBlendModeUtilities for ClassBuilder
impl BackgroundBlendModeUtilities for ClassBuilder
fn background_blend_mode(self, mode: BackgroundBlendMode) -> Self
Source§impl BackgroundClipUtilities for ClassBuilder
impl BackgroundClipUtilities for ClassBuilder
fn background_clip(self, clip: BackgroundClip) -> Self
Source§impl BackgroundColorUtilities for ClassBuilder
impl BackgroundColorUtilities for ClassBuilder
fn background_color(self, color: Color) -> Self
fn background_transparent(self) -> Self
fn background_current(self) -> Self
fn background_black(self) -> Self
fn background_white(self) -> Self
Source§impl BackgroundImageUtilities for ClassBuilder
impl BackgroundImageUtilities for ClassBuilder
fn background_image(self, image: BackgroundImage) -> Self
Source§impl BackgroundOriginUtilities for ClassBuilder
impl BackgroundOriginUtilities for ClassBuilder
fn background_origin(self, origin: BackgroundOrigin) -> Self
Source§impl BackgroundPositionUtilities for ClassBuilder
impl BackgroundPositionUtilities for ClassBuilder
fn background_position(self, position: BackgroundPosition) -> Self
Source§impl BackgroundRepeatUtilities for ClassBuilder
impl BackgroundRepeatUtilities for ClassBuilder
fn background_repeat(self, repeat: BackgroundRepeat) -> Self
Source§impl BackgroundSizeUtilities for ClassBuilder
impl BackgroundSizeUtilities for ClassBuilder
fn background_size(self, size: BackgroundSize) -> Self
Source§impl BlurUtilities for ClassBuilder
impl BlurUtilities for ClassBuilder
Source§impl BorderColorUtilities for ClassBuilder
impl BorderColorUtilities for ClassBuilder
fn border_color(self, color: Color) -> Self
fn border_transparent(self) -> Self
fn border_current(self) -> Self
fn border_black(self) -> Self
fn border_white(self) -> Self
Source§impl BorderRadiusUtilities for ClassBuilder
impl BorderRadiusUtilities for ClassBuilder
fn border_radius(self, radius: BorderRadius) -> Self
fn border_radius_t(self, radius: BorderRadius) -> Self
fn border_radius_r(self, radius: BorderRadius) -> Self
fn border_radius_b(self, radius: BorderRadius) -> Self
fn border_radius_l(self, radius: BorderRadius) -> Self
fn border_radius_tl(self, radius: BorderRadius) -> Self
fn border_radius_tr(self, radius: BorderRadius) -> Self
fn border_radius_br(self, radius: BorderRadius) -> Self
fn border_radius_bl(self, radius: BorderRadius) -> Self
Source§impl BorderStyleUtilities for ClassBuilder
impl BorderStyleUtilities for ClassBuilder
fn border_style(self, style: BorderStyle) -> Self
Source§impl BorderWidthUtilities for ClassBuilder
impl BorderWidthUtilities for ClassBuilder
fn border_width(self, width: BorderWidth) -> Self
fn border_width_x(self, width: BorderWidth) -> Self
fn border_width_y(self, width: BorderWidth) -> Self
fn border_width_t(self, width: BorderWidth) -> Self
fn border_width_r(self, width: BorderWidth) -> Self
fn border_width_b(self, width: BorderWidth) -> Self
fn border_width_l(self, width: BorderWidth) -> Self
Source§impl BoxShadowUtilities for ClassBuilder
impl BoxShadowUtilities for ClassBuilder
fn box_shadow(self, shadow: BoxShadow) -> Self
Source§impl BrightnessUtilities for ClassBuilder
impl BrightnessUtilities for ClassBuilder
fn brightness(self, brightness: Brightness) -> Self
Source§impl ClearUtilities for ClassBuilder
impl ClearUtilities for ClassBuilder
Source§impl Clone for ClassBuilder
impl Clone for ClassBuilder
Source§fn clone(&self) -> ClassBuilder
fn clone(&self) -> ClassBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more