Class CalcCssFunction<T>

Type Parameters:
T - the element type of the DOM
All Implemented Interfaces:
CssFunction<T>
Direct Known Subclasses:
RoundCssFunction

public class CalcCssFunction<T> extends AbstractMathCssFunction<T>
Processes the calc() function.
 calc               = "calc(", calc-sum, ")" ;
 calc-sum            = calc-product ,  { [ '+' | '-' ] , calc-product } ;
 calc-product        = calc-value , { '*' , calc-value | '/' , calc-number-value } ;
 calc-value          = number | dimension | percentage | '(' , calc-sum , ')' ;
 calc-number-sum     = calc-number-product , { [ '+' | '-' ] calc-number-product } ;
 calc-number-product = calc-number-value> , { '*' , calc-number-value | '/' , calc-number-value } ;
 calc-number-value   = number | calc-number-sum ;
 
In addition, white space is required on both sides of the '+' and '-' operators. (The '*' and '/' operaters can be used without white space around them.) References:
CSS Values and Units Module Level 4. Paragraph 10.1. Basic Arithmetic: calc()
csswg.org
CSS Values and Units Module Level 4. Paragraph 10.8. Syntax
csswg.org
  • Field Details

  • Constructor Details

    • CalcCssFunction

      public CalcCssFunction()
    • CalcCssFunction

      public CalcCssFunction(String name)
  • Method Details