/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! [Calc expressions][calc]. //! //! [calc]: https://drafts.csswg.org/css-values/#calc-notation use cssparser::{Parser, Token}; use parser::ParserContext; use std::ascii::AsciiExt; use std::fmt; use style_traits::{ToCss, ParseError, StyleParseErrorKind}; use style_traits::values::specified::AllowedNumericType; use values::{CSSInteger, CSSFloat}; use values::computed; use values::specified::{Angle, Time}; use values::specified::length::{AbsoluteLength, FontRelativeLength, NoCalcLength}; use values::specified::length::ViewportPercentageLength; /// A node inside a `Calc` expression's AST. #[derive(Clone, Debug)] pub enum CalcNode { /// `` Length(NoCalcLength), /// `` Angle(Angle), /// `