The manakai project

Web::CSS::Props

CSS property definitions

DESCRIPTION

XXX

SPECIFICATIONS

CSSSYNTAX

CSS Syntax <http://dev.w3.org/csswg/css-syntax/#integer>.

QUIRKS

Quirks Mode <http://quirks.spec.whatwg.org/>.

CSSOM

CSS Object Model (CSSOM) <http://dev.w3.org/csswg/cssom/>.

CSSCASCADE

CSS Cascading and Inheritance <http://dev.w3.org/csswg/css-cascade/>.

CSSVALUES

CSS Values and Units <http://dev.w3.org/csswg/css-values/>.

To serialize the 'attr()' function, whether the namespace prefix is specified or not and which namespace prefix is used, MUST be preserved.

CSSCOLOR

CSS Color <http://dev.w3.org/csswg/css-color/>.

The '-webkit-opacity' property MUST be parsed as if it were the 'opacity' property.

CSSBACKGROUNDS

CSS Background and Borders <http://dev.w3.org/csswg/css-backgrounds/>.

To serialize the 'border-color' property value, follow the steps to serialize four edge values with 'border-top-color', 'border-right-color', 'border-bottom-color', and 'border-left-color' values and return the result.

To serialize the 'border-style' property value, follow the steps to serialize four edge values with 'border-top-style', 'border-right-style', 'border-bottom-style', and 'border-left-style' values and return the result.

To serialize the 'border-width' property value, follow the steps to serialize four edge values with 'border-top-width', 'border-right-width', 'border-bottom-width', and 'border-left-width' values and return the result.

To serialize 'border', 'border-top', 'border-right', 'border-bottom', 'border-left', or 'outline' property value, follow these steps:

  1. If one of <line-width>, <line-style>, and <color> values is
     missing, it can't be serialized.  Return null and abort these
     steps.

  2. Otherwise, if one of these values are CSS-wide keyword or
     function:

    1. If they are equal, return one of them and abort these steps.

    2. Otherwise, it can't be serialized.  Abort these steps.

  3. Otherwise, if <color> is the initial value of the corresponding
     longhand property, return the result of invoking serialize a
     whitespace-separated list with serializations of <line-width> and
     <line-style> values.

  4. Otherwise, return the result of invoking serialize a
     whitespace-separated list with serializations of <line-width>,
     <line-style>, and <color> values.

To serialzie four edge values /top/, /right/, /bottom/, and /left/, follow these steps:

  1. If one of four values is missing, it is not serializable.  Return
     null and abort these steps.

  2. Otheriwse, if one of four values is CSS-wide keyword or function:

    1. If serializations of four values are same, return one of them
       and abort these steps.

    2. Otherwise, it is not serializable.  Return null and abort these
       steps.

  3. Otherwise, if serializations of four values are same, return one
     of them and abort these steps.

  4. Otherwise, if serializations of /top/ and /bottom/ are same and
     serialization of /left/ and /right/ are same, return the result
     of invoking serialize a whitespace-separated list with values
     /top/ and /right/ and abort these steps.

  5. Otherwise, if serialization of /left/ and /right/ are same,
     return the result of invoking serialize a whitespace-separated
     list with values /top/, /right/, and /bottom/ and abort these
     steps.

  6. Otherwise, return the result of invoking serialize a
     whitespace-separated list with values /top/, /right/, /bottom/,
     and /left/ and abort these steps.

The 'background-position-x' property is defined as follows:

  Name:           background-position-x
  Value:          <length> | <percentage> | left | center | right
  Initial:        0%
  Applies to:     Same as 'background-position'
  Inherited:      Same as 'background-position'
  Percentages:    Same as 'background-position' (horizontal)
  Media:          Same as 'background-position'
  Computed value: Same as 'background-position' (horizontal)
  Animatable:     Same as 'background-position' (horizontal)

The 'background-position-y' property is defined as follows:

  Name:           background-position-y
  Value:          <length> | <percentage> | top | center | bottom
  Initial:        0%
  Applies to:     Same as 'background-position'
  Inherited:      Same as 'background-position'
  Percentages:    Same as 'background-position' (horizontal)
  Media:          Same as 'background-position'
  Computed value: Same as 'background-position' (horizontal)
  Animatable:     Same as 'background-position' (horizontal)

The 'background-position' property is redefined as a shorthand of 'background-position-x' and 'background-position-y' properties, where the horizontal and vertical values are corresponding to them, respectively. To serialize the 'background-position' property value, follow these steps:

  1. If 'background-position-x' or 'background-position-y' property
     value is missing, it is not serializable.  Return null.

  2. Otherwise, if one of serializations of 'background-position-x'
     and 'background-position-y' property values is CSS-wide keyword
     or function:

    1. If their values are equal, return one of them and abort these
       steps.

    2. Otherwise, it is not serializable.  Return null.

  3. Otherwise, return the result of invoking serialize a
     whitespace-separated list with serializations of
     'background-position-x' and 'background-position-y' property
     values.

The canonical order of the longhand sub-properties for the 'background' property is: 'background-image', 'background-repeat', 'background-attachment', 'background-position-x' 'background-position_y', and then 'background-color'. For the purpose of serialization of the 'background' property value, they have no initial value.

CSSDISPLAY

CSS Diaplay <http://dev.w3.org/csswg/css-display/>.

CSSBOX

CSS Basic Box Model <http://dev.w3.org/csswg/css-box/>.

In 'width', 'min-width', and 'max-width' properties, keywords '-moz-available', '-moz-fit-content', '-moz-min-content', and '-moz-max-content' MUST be replaced by corresponding keywords without "-moz-" prefix at parse time.

In 'width', 'min-width', 'max-width', 'height', 'min-height', and 'max-height' properties, keywords '-webkit-fit-content', '-webkit-min-content', and '-webkit-max-content' MUST be replaced by corresponding keywords without "-webkit-" prefix at parse time.

To serialize the 'margin' property value, follow the steps to serialize four edge values with 'margin-top', 'margin-right', 'margin-bottom', and 'margin-left' values and return the result.

To serialize the 'padding' property value, follow the steps to serialize four edge values with 'padding-top', 'padding-right', 'padding-bottom', and 'padding-left' values and return the result.

CSSPOSITION

CSS Positioned Layout <http://dev.w3.org/csswg/css-position/>.

If the comma character is not used within the 'rect()' functional notation, any sequence of zero or more <whitespace> tokens between other tokens within the function's argument MUST be considered as a separator. For the purpose of serialization of the functional notation, the separator MUST be considered as a comma.

CSSOVERFLOW

CSS Overflow <http://dev.w3.org/csswg/css-overflow/>.

To serialize the 'overflow' property value, follow these steps:

  1. If 'overflow-x' or 'overflow-y' is missing, it is not
     serializable.  Return null and abort these steps.

  2. Otherwise, if serialization of 'overflow-x' is equal to
     serialization of 'overflow-y', return one of them.

  3. Otherwise, it is not serializable.  Return null.
CSSPAGE

CSS Paged Media <http://dev.w3.org/csswg/css-page/>.

If the 'size' property contains two <length>s and their serializations are equal, it MUST be serialized as a <length> whose value is equal to them.

CSSBREAK

CSS Fragmentation <http://dev.w3.org/csswg/css-break/>.

CSSWRITINGMODES

CSS Writing Modes <http://dev.w3.org/csswg/css-writing-modes/>.

CSSLISTS

CSS Lists and Counters <http://dev.w3.org/csswg/css-lists/>.

The canonical order of the longhand sub-properties for the 'list-style' property is: 'list-style-type', 'list-style-position', and then 'list-style-image'. For the purpose of serialization of the 'list-style' property, they have no initial value.

To serialize the 'counter()' or 'counters()' function, <counter-style> MUST NOT be omitted.

CSSCOUNTERSTYLES

CSS Counter Styles <http://dev.w3.org/csswg/css-counter-styles/>.

CSSUI

CSS Basic User Interface <http://dev.w3.org/csswg/css-ui/>.

The vendor prefix of '-moz-grab', '-webkit-grab', '-moz-grabbing', '-webkit-grabbing', '-moz-zoom-in', '-webkit-zoom-in', '-moz-zoom-out', and '-webkit-zoom-out' MUST be dropped at parse time.

The 'hand' keyword in the 'cursor' property MUST be replaced by 'pointer' at parse time.

Keywords 'grab' and 'grabbing' MUST be allowed as a keyword in the 'cursor' property.

CSSGCPM

CSS Generated Content for Paged Media <http://dev.w3.org/csswg/css-gcpm/>.

When serialized, keywords in the 'marks' propery MUST be sorted in order: 'crop' and then 'cross'.

CSSINLINE

CSS Line Layout <http://dev.w3.org/csswg/css-inline/>.

If the 'line-height' property value is a <number> token (with optional surrounding <whitespace> tokens), it MUST be interpreted as <number> (rather than <length>).

CSSTEXT

CSS Text <http://dev.w3.org/csswg/css-text/>.

CSSTEXTDECOR

CSS Text Decoration <http://dev.w3.org/csswg/css-text-decor/>.

When serialized, keywords in the 'text-decoration' MUST be sorted in the order: 'blink', 'underline', 'overline', and then 'line-through'.

CSSFONTS

CSS Fonts <http://dev.w3.org/csswg/css-fonts/>.

The '-webkit-xxx-large' keyword can be used as <absolute-size>.

For the 'font-weight' property, number keywords ('100' ... '900') in the grammer represent <integer> tokens whose value is equal to one of them.

A CSS-wide keyword or the keyword 'default' can't be used as the first token of <family-name>.

Each longhand sub-property of the 'font' property MUST also allow the keyword '-moz-use-system-font' as the value.

The '-x-system-font' property is defined as follows:

  Name:           -x-system-font
  Value:          none | caption | icon | menu | message-box |
                  small-caption | status-bar
  Initial:        none
  Applies to:     Same as 'font'
  Inherited:      Same as 'font'
  Percentages:    Same as 'font'
  Media:          Same as 'font'
  Computed value: Same as 'font'
  Animatable:     Same as 'font'

The '-x-system-font' property is a longhand sub-property of the 'font' property. If the 'font' property's value is a system font keyword, it MUST be interpreted as setting the '-x-system-font' property to that value and the other sub-properties to '-moz-use-system-font'. Otherwise, the 'font' property MUST be interpreted as setting '-x-system-font' property to 'none'.

The canonical order of the longhand sub-properties for the 'font' property is: 'font-style', 'font-variant', 'font-weight', 'font-stretch', 'font-size', 'line-height', 'font-family', '-x-system-font', and then 'font-size-adjust'.

SVG

SVG <https://svgwg.org/svg2-draft/text.html>.

CSS21

CSS 2.1 <http://www.w3.org/TR/CSS21/tables.html>.

CSS20

CSS 2 <http://www.w3.org/TR/1998/REC-CSS2-19980512/>.

MANAKAICSS

manakai CSS Extensions <http://suika.suikawiki.org/~wakaba/wiki/sw/n/manakai%20CSS%20Extensions>.

The '-webkit-border-horizontal-spacing' and '-webkit-border-vertical-spacing' properties are defined as follows:

  Value:          <length>
  Initial:        0px
  Applies to:     Same as 'border-spacing'
  Inherited:      Same as 'border-spacing'
  Percentage:     Same as 'border-spacing'
  Media:          Same as 'border-spacing'
  Computed value: Absolute length
  Animatable:     Same as 'border-spacing'

The 'border-spacing' property is redefined as the shorthand of these two properties. To serialize the 'border-spacing' property values, run following steps:

  1. If one of '-webkit-border-horizontal-spacing' and
     '-webkit-border-vertical-spacing' is missing, it is not
     serializable.  Return null.

  2. Otherwise, if serialization of
     '-webkit-border-horizontal-spacing' and
     '-webkit-border-vertical-spacing' are equal, return one of them.

  3. Otherwise, if one of '-webkit-border-horizontal-spacing' and
     '-webkit-border-vertical-spacing' is a CSS-wide keyword or
     function, it is not serializable.  Return null.

  4. Otherwise, return the result of invoking serialize a
     whitespace-separated list with serializations of
     '-webkit-border-horizontal-spacing' and
     '-webkit-border-vertical-spacing',

OBSOLETE FEATURES

Support for following feature has been removed: Keywords '-moz-pre-wrap', '-moz-use-text-color', '-o-pre-wrap', '-webkit-marquee', '-manakai-caption', '-manakai-icon', '-manakai-menu', '-manakai-message-box'. '-manakai-small-caption', and '-manakai-status-bar', and property '-moz-opacity'.

SEE ALSO

Web::CSS::Values.

Web::CSS::Parser, Web::CSS::Serializer.

AUTHOR

Wakaba <wakaba@suikawiki.org>.

LICENSE

Copyright 2007-2013 Wakaba <wakaba@suikawiki.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.