mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
style: Update font-weight property and descriptor to css-fonts-4.
Bug: 1454596 Reviewed-by: xidorn MozReview-Commit-ID: 27aS2UrgXjs
This commit is contained in:
parent
76a14d6a64
commit
bc1126ee8c
10 changed files with 199 additions and 141 deletions
|
@ -201,7 +201,14 @@ impl Number {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns whether this number came from a `calc()` expression.
|
||||
#[inline]
|
||||
pub fn was_calc(&self) -> bool {
|
||||
self.calc_clamping_mode.is_some()
|
||||
}
|
||||
|
||||
/// Returns the numeric value, clamped if needed.
|
||||
#[inline]
|
||||
pub fn get(&self) -> f32 {
|
||||
self.calc_clamping_mode
|
||||
.map_or(self.value, |mode| mode.clamp(self.value))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue