Files
ladybird/Libraries/LibWeb/CSS/CSSNumericValue.idl
Shannon Booth cc6e048bd6 LibWeb+LibIDL: Remove support for #import directives during parsing
These no longer serve any purpose now that we run the IDLGenerator
on all of these files at once.
2026-04-24 20:08:29 +02:00

45 lines
1.3 KiB
Plaintext

// https://drafts.css-houdini.org/css-typed-om-1/#enumdef-cssnumericbasetype
enum CSSNumericBaseType {
"length",
"angle",
"time",
"frequency",
"resolution",
"flex",
"percent",
};
// https://drafts.css-houdini.org/css-typed-om-1/#dictdef-cssnumerictype
dictionary CSSNumericType {
long length;
long angle;
long time;
long frequency;
long resolution;
long flex;
long percent;
CSSNumericBaseType percentHint;
};
// https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
interface CSSNumericValue : CSSStyleValue {
CSSNumericValue add(CSSNumberish... values);
CSSNumericValue sub(CSSNumberish... values);
CSSNumericValue mul(CSSNumberish... values);
CSSNumericValue div(CSSNumberish... values);
CSSNumericValue min(CSSNumberish... values);
CSSNumericValue max(CSSNumberish... values);
[ImplementedAs=equals_for_bindings] boolean equals(CSSNumberish... value);
CSSUnitValue to(USVString unit);
// FIXME: CSSMathSum toSum(USVString... units);
[ImplementedAs=type_for_bindings] CSSNumericType type();
[Exposed=Window] static CSSNumericValue parse(USVString cssText);
};
// https://drafts.css-houdini.org/css-typed-om-1/#typedefdef-cssnumberish
typedef (double or CSSNumericValue) CSSNumberish;