pub enum ResponsiveLayout {
    Tiny,
    Small,
    Medium,
    Large,
    ExtraLarge,
    UltraLarge,
}
Expand description

Responsive layout system for mainstream screen

epx

Note that mobile devices does not depend on the actual pixel, but on the equivalent pixel.

For example Phone 11Pro Max has a 1242px × 2688px @ 3x screen, the actual size is 414epx × 896epx.

For 2K screen, which has a 2560px × 1440px @ 1.5x screen, the actual size is 1706epx × 960epx.

For 4K screen, which has a 4096px × 2160px @ 2x screen, the actual size is 2048epx × 1024epx.

Variants

Tiny

width ⩽ 375epx

Devices
  • ios: 3GS, 4/4S, Phone X,Xs,11Pro

Small

width ⩽ 640epx

Devices
  • ios: Phone 6p,6sp,7p,8p, Phone 11,Xr,Phone 11Pro Max,Xs Max

Medium

width ⩽ 992epx

Devices
  • Vertical ipad

Large

width ⩽ 1366epx

Devices
  • Horizontal ipad

ExtraLarge

width ⩽ 2048epx

Devices
  • Mainstream Desktop Screen(16:10,16:9)

UltraLarge

width > 2048epx

Devices
  • Hairtail Screen(21:9)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.