Skip to Main Content
JavaScript: The Definitive Guide, Fourth Edition
book

JavaScript: The Definitive Guide, Fourth Edition

by David Flanagan
November 2001
Intermediate to advanced content levelIntermediate to advanced
936 pages
68h 43m
English
O'Reilly Media, Inc.
Content preview from JavaScript: The Definitive Guide, Fourth Edition

Name

CSSPrimitiveValue — a single CSS style value

Availability

DOM Level 2 CSS

Inherits from/Overrides

CSSValue CSSPrimitiveValue

Constants

The following constants are the legal values for the primitiveType property. They specify the type of the value and, for numeric values, the units in which the value is represented.

unsigned short CSS_UNKNOWN = 0

The value is not recognized, and the implementation does not know how to parse it. The textual representation of the value is available through the cssText property.

unsigned short CSS_NUMBER = 1

A unitless number. Query with getFloatValue( ).

unsigned short CSS_PERCENTAGE = 2

A percentage. Query with getFloatValue( ).

unsigned short CSS_EMS = 3

A relative length measured in ems (the height of the current font). Query with getFloatValue( ).

unsigned short CSS_EXS = 4

A relative length measured in exs (the “x-height” of the current font). Query with getFloatValue( ).

unsigned short CSS_PX = 5

A length measured in pixels. Query with getFloatValue( ). Pixel lengths are relative measurements, in the sense that their size depends on the display resolution, and they cannot be converted to inches, millimeters, points, or other absolute lengths. However, pixels are also one of the most commonly used units, and they are treated as absolute values for the purposes of AbstractView.getComputedStyle( ), for example.

unsigned short CSS_CM = 6

An absolute length measured in centimeters. Query with getFloatValue( ).

unsigned short CSS_MM = 7 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaScript: A Beginner's Guide, Fourth Edition, 4th Edition

JavaScript: A Beginner's Guide, Fourth Edition, 4th Edition

John Pollock
Coding with JavaScript For Dummies

Coding with JavaScript For Dummies

Chris Minnick, Eva Holland

Publisher Resources

ISBN: 0596000480Supplemental ContentCatalog PageErrata