1<?php
2// $Header: /cvsroot/html2ps/css.list-style-position.inc.php,v 1.6 2006/07/09 09:07:45 Konstantin Exp $
3
4define('LSP_OUTSIDE',0);
5define('LSP_INSIDE',1);
6
7class CSSListStylePosition extends CSSSubFieldProperty {
8  // CSS 2.1: default value for list-style-position is 'outside'
9  function default_value() { return LSP_OUTSIDE; }
10
11  function parse($value) {
12    if (preg_match('/\binside\b/',$value)) {
13      return LSP_INSIDE;
14    };
15
16    if (preg_match('/\boutside\b/',$value)) {
17      return LSP_OUTSIDE;
18    };
19
20    return null;
21  }
22
23  function get_property_code() {
24    return CSS_LIST_STYLE_POSITION;
25  }
26
27  function get_property_name() {
28    return 'list-style-position';
29  }
30}
31
32?>