pub struct QueryLengths {
pub font_size: f64,
pub viewport: (f64, f64),
pub container: (f64, f64),
pub vertical: bool,
}Expand description
What a query’s relative lengths are relative to. For a media query
that’s all the environment; a container query’s em is the
container’s, and its cq* units are the container’s own query
containers’.
Fields§
§font_size: f64For em and rem, in pixels.
viewport: (f64, f64)The viewport’s width and height, for vw and the rest.
container: (f64, f64)The width and height cqw and cqh are 1% of.
vertical: boolWhether the writing mode is vertical, so cqi is of the height.
Implementations§
Source§impl QueryLengths
impl QueryLengths
Sourcepub fn of(env: &Environment) -> QueryLengths
pub fn of(env: &Environment) -> QueryLengths
A media query’s: with no containers, cq* units are the small
viewport’s, CSS Conditional 5 §6.3.
Trait Implementations§
Source§impl Clone for QueryLengths
impl Clone for QueryLengths
impl Copy for QueryLengths
Source§impl Debug for QueryLengths
impl Debug for QueryLengths
Source§impl PartialEq for QueryLengths
impl PartialEq for QueryLengths
impl StructuralPartialEq for QueryLengths
Auto Trait Implementations§
impl Forget for QueryLengths
impl Freeze for QueryLengths
impl Move for QueryLengths
impl RefUnwindSafe for QueryLengths
impl Send for QueryLengths
impl Sync for QueryLengths
impl Unpin for QueryLengths
impl UnsafeUnpin for QueryLengths
impl UnwindSafe for QueryLengths
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more