Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
class CSSFontWeight extends CSSSubFieldProperty {
4
  function default_value() {
5
    return WEIGHT_NORMAL;
6
  }
7
 
8
  function parse($value) {
9
    switch (trim(strtolower($value))) {
10
    case 'inherit':
11
      return CSS_PROPERTY_INHERIT;
12
    case 'bold':
13
    case '700':
14
    case '800':
15
    case '900':
16
    case 'bolder':
17
      return WEIGHT_BOLD;
18
    case 'lighter':
19
    case 'normal':
20
    case '100':
21
    case '200':
22
    case '300':
23
    case '400':
24
    case '500':
25
    case '600':
26
    default:
27
      return WEIGHT_NORMAL;
28
    };
29
  }
30
 
31
  function get_property_code() {
32
    return CSS_FONT_WEIGHT;
33
  }
34
 
35
  function get_property_name() {
36
    return 'font-weight';
37
  }
38
}
39
 
40
?>