/* 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 app_units::Au; use cssparser::{Parser, Token, BasicParseError}; use parser::ParserContext; use std::ascii::AsciiExt; use std::fmt; use style_traits::{ToCss, ParseError, StyleParseError}; use style_traits::values::specified::AllowedLengthType; use values::{CSSInteger, CSSFloat}; use values::computed; use values::specified::{Angle, Time}; use values::specified::length::{FontRelativeLength, NoCalcLength, ViewportPercentageLength}; /// A node inside a `Calc` expression's AST. #[derive(Clone, Debug)] pub enum CalcNode { /// `` Length(NoCalcLength), /// `` Angle(Angle), /// `