NativeElixirPdfUtilities.Validators.CssCalculationValidator (native_elixir_pdf_utilities v1.1.0)
View SourceMathML compatibility interface to the shared CSS calculation validator.
Summary
Types
A shared validated length-percentage calculation.
Functions
Prepares length-percentage arithmetic through the shared CSS grammar.
Returns measured unit dependencies after the shared grammar validates their type.
Resolves the shared calculation against its actual percentage basis in points.
Types
@type calculation() :: NativeElixirPdfUtilities.Validators.CssMathValidator.length_calculation()
A shared validated length-percentage calculation.
Functions
@spec prepare(term(), term()) :: {:ok, calculation()} | :error | {:error, NativeElixirPdfUtilities.Diagnostics.detailed_error()}
Prepares length-percentage arithmetic through the shared CSS grammar.
@spec referenced_units(term()) :: {:ok, [String.t()]} | {:error, NativeElixirPdfUtilities.Diagnostics.detailed_error()}
Returns measured unit dependencies after the shared grammar validates their type.
@spec resolve(term(), term()) :: {:ok, number()} | {:error, NativeElixirPdfUtilities.Diagnostics.detailed_error()}
Resolves the shared calculation against its actual percentage basis in points.