pub struct ResponsiveGrid {
pub columns: HashMap<Breakpoint, u32>,
pub gap: HashMap<Breakpoint, u32>,
pub row_gap: HashMap<Breakpoint, u32>,
pub column_gap: HashMap<Breakpoint, u32>,
}Expand description
Re-export core tailwind-rs functionality Responsive grid container
Fields§
§columns: HashMap<Breakpoint, u32>Number of columns for each breakpoint
gap: HashMap<Breakpoint, u32>Gap between grid items for each breakpoint
row_gap: HashMap<Breakpoint, u32>Row gap for each breakpoint
column_gap: HashMap<Breakpoint, u32>Column gap for each breakpoint
Implementations§
Source§impl ResponsiveGrid
impl ResponsiveGrid
Sourcepub fn new() -> ResponsiveGrid
pub fn new() -> ResponsiveGrid
Create a new responsive grid container
Sourcepub fn with_base(columns: u32, gap: u32) -> ResponsiveGrid
pub fn with_base(columns: u32, gap: u32) -> ResponsiveGrid
Create a responsive grid container with base values
Sourcepub fn set_columns(&mut self, breakpoint: Breakpoint, columns: u32)
pub fn set_columns(&mut self, breakpoint: Breakpoint, columns: u32)
Set number of columns for a specific breakpoint
Sourcepub fn set_gap(&mut self, breakpoint: Breakpoint, gap: u32)
pub fn set_gap(&mut self, breakpoint: Breakpoint, gap: u32)
Set gap for a specific breakpoint
Sourcepub fn set_row_gap(&mut self, breakpoint: Breakpoint, gap: u32)
pub fn set_row_gap(&mut self, breakpoint: Breakpoint, gap: u32)
Set row gap for a specific breakpoint
Sourcepub fn set_column_gap(&mut self, breakpoint: Breakpoint, gap: u32)
pub fn set_column_gap(&mut self, breakpoint: Breakpoint, gap: u32)
Set column gap for a specific breakpoint
Sourcepub fn get_columns(&self, breakpoint: Breakpoint) -> Option<u32>
pub fn get_columns(&self, breakpoint: Breakpoint) -> Option<u32>
Get number of columns for a specific breakpoint
Sourcepub fn get_gap(&self, breakpoint: Breakpoint) -> Option<u32>
pub fn get_gap(&self, breakpoint: Breakpoint) -> Option<u32>
Get gap for a specific breakpoint
Sourcepub fn get_row_gap(&self, breakpoint: Breakpoint) -> Option<u32>
pub fn get_row_gap(&self, breakpoint: Breakpoint) -> Option<u32>
Get row gap for a specific breakpoint
Sourcepub fn get_column_gap(&self, breakpoint: Breakpoint) -> Option<u32>
pub fn get_column_gap(&self, breakpoint: Breakpoint) -> Option<u32>
Get column gap for a specific breakpoint
Sourcepub fn get_columns_or_base(&self, breakpoint: Breakpoint) -> Option<u32>
pub fn get_columns_or_base(&self, breakpoint: Breakpoint) -> Option<u32>
Get number of columns for a specific breakpoint, falling back to base
Sourcepub fn get_gap_or_base(&self, breakpoint: Breakpoint) -> Option<u32>
pub fn get_gap_or_base(&self, breakpoint: Breakpoint) -> Option<u32>
Get gap for a specific breakpoint, falling back to base
Sourcepub fn to_css_classes(&self) -> String
pub fn to_css_classes(&self) -> String
Generate CSS classes for all breakpoints
Sourcepub fn to_css_classes_for_width(&self, screen_width: u32) -> String
pub fn to_css_classes_for_width(&self, screen_width: u32) -> String
Generate CSS classes for a specific screen width
Trait Implementations§
Source§impl Clone for ResponsiveGrid
impl Clone for ResponsiveGrid
Source§fn clone(&self) -> ResponsiveGrid
fn clone(&self) -> ResponsiveGrid
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more