monks/max_block_size

The max-block-size CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by {{cssxref(“writing-mode”)}}. That is, if the writing direction is horizontal, then max-block-size is equivalent to {{cssxref(“max-height”)}}; if the writing direction is vertical, max-block-size is the same as {{cssxref(“max-width”)}}.

The other dimension’s maximum length is specified using the {{cssxref(“max-inline-size”)}} property.

This is useful because the max-width is always used for horizontal sizes and max-height is always used for vertical sizes, and if you need to set lengths based on the size of your text content, you need to be able to do so with the writing direction in mind.

Any time you would normally use max-height or max-width, you should instead use max-block-size to set the maximum “height” of the content (even though this may not be a vertical value) and max-inline-size to set the maximum “width” of the content (although this may instead be vertical rather than horizontal). See writing-mode examples, which show the different writing modes in action.

Values

pub const fit_content: #(String, String)
  • : Use the available space, but not more than max-content, i.e., min(max-content, max(min-content, stretch)).- fit-content(<length-percentage>) - : Uses the fit-content formula with the available space replaced by the specified argument, i.e., min(max-content, max(min-content, argument)).
pub const inherit: #(String, String)
pub const initial: #(String, String)
pub const intrinsic: #(String, String)

intrinsic value of max-block-size

pub fn length(value: monks_of_style.Length) -> #(String, String)

length value of max-block-size

pub const max_content: #(String, String)
  • : The intrinsic preferred max-block-size.
pub const min_content: #(String, String)
  • : The intrinsic minimum max-block-size.
pub const min_intrinsic: #(String, String)

min-intrinsic value of max-block-size

pub const none: #(String, String)
  • : No limit on the size of the box.
pub fn raw(value: String) -> #(String, String)

Enter a raw string value for max-block-size

pub const revert: #(String, String)
pub const revert_layer: #(String, String)
pub const stretch: #(String, String)

stretch value of max-block-size

pub const unset: #(String, String)
pub fn var(variable: String) -> #(String, String)

Enter a variable name to be used for max-block-size. It will be wrapped in var() and have -- prepended.

Search Document