// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://drafts.css-houdini.org/css-typed-om/#numeric-factory

[
  RuntimeEnabled=CSSTypedOM
] partial interface CSS {
  [NewObject] static CSSUnitValue number(double value);
  [NewObject] static CSSUnitValue percent(double value);

  // <length>
  [NewObject] static CSSUnitValue em(double value);
  [NewObject] static CSSUnitValue ex(double value);
  [NewObject] static CSSUnitValue ch(double value);
  [NewObject] static CSSUnitValue rem(double value);
  [NewObject] static CSSUnitValue vw(double value);
  [NewObject] static CSSUnitValue vh(double value);
  [NewObject] static CSSUnitValue vmin(double value);
  [NewObject] static CSSUnitValue vmax(double value);
  [NewObject] static CSSUnitValue cm(double value);
  [NewObject] static CSSUnitValue mm(double value);
  [NewObject] static CSSUnitValue in(double value);
  [NewObject] static CSSUnitValue pt(double value);
  [NewObject] static CSSUnitValue pc(double value);
  [NewObject] static CSSUnitValue px(double value);
  // Currently unsupported length units that are specified
  // [NewObject] static CSSUnitValue ic(double value);
  // [NewObject] static CSSUnitValue lh(double value);
  // [NewObject] static CSSUnitValue rlh(double value);
  // [NewObject] static CSSUnitValue vi(double value);
  // [NewObject] static CSSUnitValue vb(double value);
  // [NewObject] static CSSUnitValue q(double value);

  // <angle>
  [NewObject] static CSSUnitValue deg(double value);
  [NewObject] static CSSUnitValue grad(double value);
  [NewObject] static CSSUnitValue rad(double value);
  [NewObject] static CSSUnitValue turn(double value);

  // <time>
  [NewObject] static CSSUnitValue s(double value);
  [NewObject] static CSSUnitValue ms(double value);

  // <frequency>
  [NewObject] static CSSUnitValue Hz(double value);
  [NewObject] static CSSUnitValue kHz(double value);

  // <resolution>
  [NewObject] static CSSUnitValue dpi(double value);
  [NewObject] static CSSUnitValue dpcm(double value);
  [NewObject] static CSSUnitValue dppx(double value);

  // <flex>
  [NewObject] static CSSUnitValue fr(double value);
};
