1<?php 2// $Header: /cvsroot/html2ps/css.min-height.inc.php,v 1.3 2006/11/11 13:43:52 Konstantin Exp $ 3 4require_once(HTML2PS_DIR.'value.min-height.php'); 5 6class CSSMinHeight extends CSSPropertyHandler { 7 var $_defaultValue; 8 9 function CSSMinHeight() { 10 $this->CSSPropertyHandler(true, false); 11 $this->_defaultValue = ValueMinHeight::fromString("0px"); 12 } 13 14 /** 15 * 'height' CSS property should be inherited by table cells from table rows 16 * (as, obviously, ) 17 */ 18 function inherit($old_state, &$new_state) { 19 $parent_display = $old_state[CSS_DISPLAY]; 20 if ($parent_display === "table-row") { 21 $new_state[CSS_MIN_HEIGHT] = $old_state[CSS_MIN_HEIGHT]; 22 return; 23 } 24 25 $new_state[CSS_MIN_HEIGHT] = 26 is_inline_element($parent_display) ? 27 $this->get($old_state) : 28 $this->default_value(); 29 } 30 31 function _getAutoValue() { 32 return $this->default_value(); 33 } 34 35 function default_value() { 36 return $this->_defaultValue->copy(); 37 } 38 39 function parse($value) { 40 return ValueMinHeight::fromString($value); 41 } 42 43 function get_property_code() { 44 return CSS_MIN_HEIGHT; 45 } 46 47 function get_property_name() { 48 return 'min-height'; 49 } 50} 51 52CSS::register_css_property(new CSSMinHeight); 53 54?>