Module Html_Overrides

HTML Node Display Overrides

This module provides display override versions of Html_Nodes, specifically for the generic containers:

The reason why display overrides aren't provided for all html elements is because it's generally considered an antipattern. The same functionality can be achieved with the recommended flex or grid layouts.

Note: If you're passing in a css_module for inline-block overrides, make sure that the css module includes the display rule (ie: Css.inline_block ~display:() ...).

module Body : sig ... end
module Div : sig ... end
module Section : sig ... end
module Span : sig ... end
val with_flex_css : ?⁠style:Css_Property.flex_item Css_Style.t -> ?⁠css_module:Css_Property.flex_item Css_Module.t -> [< _ Html_Node.element ] Html_Node.t -> [> Html_Node.flex_item ] Html_Node.t

Create a new flex_item html node with the provided flex_item css. Note: this shouldn't clash with any existing css_module or styles on the element