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 thefit-contentformula with the available space replaced by the specified argument, i.e.,min(max-content, max(min-content, argument)).
pub fn length(value: monks_of_style.Length) -> #(String, String)
length value of max-block-size
pub const revert_layer: #(String, String)