/* * Copyright (c) 2025, Callum Law * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Web::CSS { struct CalculationResolutionContext { using PercentageBasis = Variant; PercentageBasis percentage_basis {}; Optional length_resolution_context; static CalculationResolutionContext from_computation_context(ComputationContext const& computation_context, PercentageBasis percentage_basis = {}) { return { .percentage_basis = percentage_basis, .length_resolution_context = computation_context.length_resolution_context, }; } }; }