chromium/third_party/blink/renderer/core/css/cssom/css_unit_values.idl

// Copyright 2017 The Chromium Authors
// 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

[
  ImplementedAs=CSSUnitValues
] partial namespace CSS {
  [NewObject] CSSUnitValue number(double value);
  [NewObject] CSSUnitValue percent(double value);

  // <length>
  [NewObject] CSSUnitValue em(double value);
  [NewObject] CSSUnitValue rem(double value);
  [NewObject] CSSUnitValue ex(double value);
  [NewObject] CSSUnitValue rex(double value);
  [NewObject] CSSUnitValue ch(double value);
  [NewObject] CSSUnitValue rch(double value);
  [NewObject] CSSUnitValue ic(double value);
  [NewObject] CSSUnitValue ric(double value);
  [NewObject] CSSUnitValue lh(double value);
  [NewObject] CSSUnitValue rlh(double value);
  [NewObject] CSSUnitValue cap(double value);
  [NewObject] CSSUnitValue rcap(double value);
  [NewObject] CSSUnitValue vw(double value);
  [NewObject] CSSUnitValue vh(double value);
  [NewObject] CSSUnitValue vi(double value);
  [NewObject] CSSUnitValue vb(double value);
  [NewObject] CSSUnitValue vmin(double value);
  [NewObject] CSSUnitValue vmax(double value);

  [NewObject] CSSUnitValue svw(double value);
  [NewObject] CSSUnitValue svh(double value);
  [NewObject] CSSUnitValue svi(double value);
  [NewObject] CSSUnitValue svb(double value);
  [NewObject] CSSUnitValue svmin(double value);
  [NewObject] CSSUnitValue svmax(double value);

  [NewObject] CSSUnitValue lvw(double value);
  [NewObject] CSSUnitValue lvh(double value);
  [NewObject] CSSUnitValue lvi(double value);
  [NewObject] CSSUnitValue lvb(double value);
  [NewObject] CSSUnitValue lvmin(double value);
  [NewObject] CSSUnitValue lvmax(double value);

  [NewObject] CSSUnitValue dvw(double value);
  [NewObject] CSSUnitValue dvh(double value);
  [NewObject] CSSUnitValue dvi(double value);
  [NewObject] CSSUnitValue dvb(double value);
  [NewObject] CSSUnitValue dvmin(double value);
  [NewObject] CSSUnitValue dvmax(double value);

  [NewObject] CSSUnitValue cqw(double value);
  [NewObject] CSSUnitValue cqh(double value);
  [NewObject] CSSUnitValue cqi(double value);
  [NewObject] CSSUnitValue cqb(double value);
  [NewObject] CSSUnitValue cqmin(double value);
  [NewObject] CSSUnitValue cqmax(double value);

  [NewObject] CSSUnitValue cm(double value);
  [NewObject] CSSUnitValue mm(double value);
  [NewObject] CSSUnitValue in(double value);
  [NewObject] CSSUnitValue pt(double value);
  [NewObject] CSSUnitValue pc(double value);
  [NewObject] CSSUnitValue px(double value);
  [NewObject] CSSUnitValue Q(double value);

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

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

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

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

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