Skip to content

Commit

Permalink
Fixup: box_sizing methodo
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jul 7, 2024
1 parent 25c1c36 commit 0ed937f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/style/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ pub trait CoreStyle {
fn is_block(&self) -> bool {
false
}
/// Which box do size styles apply to
#[inline(always)]
fn box_sizing(&self) -> BoxSizing {
BoxSizing::BorderBox
}

// Overflow properties
/// How children overflowing their container should affect layout
Expand Down Expand Up @@ -522,6 +527,10 @@ impl CoreStyle for Style {
matches!(self.display, Display::Block)
}
#[inline(always)]
fn box_sizing(&self) -> BoxSizing {
self.box_sizing
}
#[inline(always)]
fn overflow(&self) -> Point<Overflow> {
self.overflow
}
Expand Down

0 comments on commit 0ed937f

Please sign in to comment.