Struct respo::RespoStyle
source · Expand description
it provides ADT interfaces as APIs, but internally it’s maintained dynamically. it’s easily diffed in a hashmap. and when it’s sent to JS APIs, it’s still in strings, which is also dynamic. TODO order of rules might matter in edge cases
Tuple Fields§
§0: Vec<(String, String)>
Implementations§
source§impl RespoStyle
impl RespoStyle
source§impl RespoStyle
impl RespoStyle
pub fn width(&mut self, rule: CssSize) -> &mut Self
pub fn height(&mut self, rule: CssSize) -> &mut Self
pub fn margin(&mut self, m: f32) -> &mut Self
pub fn margin4(&mut self, top: f32, right: f32, bottom: f32, left: f32) -> &mut Self
pub fn padding(&mut self, p: f32) -> &mut Self
pub fn padding4(
&mut self,
top: f32,
right: f32,
bottom: f32,
left: f32
) -> &mut Self
pub fn border(
&mut self,
rule: Option<(f32, CssBorderStyle, CssColor)>
) -> &mut Self
pub fn outline(
&mut self,
rule: Option<(f32, CssBorderStyle, CssColor)>
) -> &mut Self
pub fn box_shadow(
&mut self,
x: f32,
y: f32,
blur: f32,
spread: f32,
color: CssColor
) -> &mut Self
pub fn border_radius(&mut self, r: f32) -> &mut Self
pub fn border_color(&mut self, color: CssColor) -> &mut Self
pub fn overflow(&mut self, rule: CssOverflow) -> &mut Self
pub fn max_width(&mut self, rule: CssSize) -> &mut Self
pub fn max_height(&mut self, rule: CssSize) -> &mut Self
pub fn min_width(&mut self, rule: CssSize) -> &mut Self
pub fn min_height(&mut self, rule: CssSize) -> &mut Self
pub fn opacity(&mut self, o: f32) -> &mut Self
pub fn background_color(&mut self, color: CssColor) -> &mut Self
pub fn background_image(&mut self, image: String) -> &mut Self
pub fn background_size(&mut self, size: CssBackgroundSize) -> &mut Self
pub fn background_filter(&mut self, f: String) -> &mut Self
pub fn color(&mut self, color: CssColor) -> &mut Self
pub fn font_family(&mut self, font: String) -> &mut Self
pub fn font_size(&mut self, size: f32) -> &mut Self
pub fn font_style(&mut self, style: CssFontStyle) -> &mut Self
pub fn font_weight(&mut self, weight: CssFontWeight) -> &mut Self
pub fn text_shadow(
&mut self,
x: f32,
y: f32,
blur: f32,
color: CssColor
) -> &mut Self
pub fn line_height(&mut self, height: CssLineHeight) -> &mut Self
pub fn text_align(&mut self, align: CssTextAlign) -> &mut Self
pub fn vertical_align(&mut self, align: CssVerticalAlign) -> &mut Self
pub fn text_overflow(&mut self, overflow: CssTextOverflow) -> &mut Self
pub fn cursor(&mut self, cursor: String) -> &mut Self
pub fn display(&mut self, display: CssDisplay) -> &mut Self
pub fn flex_direction(&mut self, direction: CssFlexDirection) -> &mut Self
pub fn flex_wrap(&mut self, wrap: CssFlexWrap) -> &mut Self
pub fn justify_content(&mut self, content: CssFlexJustifyContent) -> &mut Self
pub fn align_items(&mut self, items: CssFlexAlignItems) -> &mut Self
pub fn position(&mut self, position: CssPosition) -> &mut Self
pub fn top(&mut self, top: CssSize) -> &mut Self
pub fn left(&mut self, left: CssSize) -> &mut Self
pub fn right(&mut self, right: CssSize) -> &mut Self
pub fn bottom(&mut self, bottom: CssSize) -> &mut Self
pub fn z_index(&mut self, z_index: i32) -> &mut Self
pub fn transform(&mut self, transform: CssTransform) -> &mut Self
pub fn transform_origin(&mut self, origin: String) -> &mut Self
pub fn transition_duration(&mut self, duration: f32) -> &mut Self
pub fn transition_delay(&mut self, delay: f32) -> &mut Self
pub fn transform_timing_function(
&mut self,
function: CssTimingFunction
) -> &mut Self
pub fn transform_property(&mut self, property: String) -> &mut Self
pub fn box_sizing(&mut self, box_sizing: CssBoxSizing) -> &mut Self
pub fn text_decoration(&mut self, decoration: CssTextDecoration) -> &mut Self
Trait Implementations§
source§impl Clone for RespoStyle
impl Clone for RespoStyle
source§fn clone(&self) -> RespoStyle
fn clone(&self) -> RespoStyle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RespoStyle
impl Debug for RespoStyle
source§impl Default for RespoStyle
impl Default for RespoStyle
source§fn default() -> RespoStyle
fn default() -> RespoStyle
Returns the “default value” for a type. Read more
source§impl Display for RespoStyle
impl Display for RespoStyle
source§impl PartialEq<RespoStyle> for RespoStyle
impl PartialEq<RespoStyle> for RespoStyle
source§fn eq(&self, other: &RespoStyle) -> bool
fn eq(&self, other: &RespoStyle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.