Ejemplo n.º 1
0
 /**
  * Class constructor
  *
  * @param Stylesheet $stylesheet the stylesheet this Style is associated with.
  */
 function __construct(Stylesheet $stylesheet)
 {
     $this->_props = array();
     $this->_stylesheet = $stylesheet;
     $this->_parent_font_size = null;
     $this->__font_size_calculated = false;
     if (!isset(self::$_defaults)) {
         // Shorthand
         $d =& self::$_defaults;
         // All CSS 2.1 properties, and their default values
         $d["azimuth"] = "center";
         $d["background_attachment"] = "scroll";
         $d["background_color"] = "transparent";
         $d["background_image"] = "none";
         $d["background_position"] = "0% 0%";
         $d["background_repeat"] = "repeat";
         $d["background"] = "";
         $d["border_collapse"] = "separate";
         $d["border_color"] = "";
         $d["border_spacing"] = "0";
         $d["border_style"] = "";
         $d["border_top"] = "";
         $d["border_right"] = "";
         $d["border_bottom"] = "";
         $d["border_left"] = "";
         $d["border_top_color"] = "";
         $d["border_right_color"] = "";
         $d["border_bottom_color"] = "";
         $d["border_left_color"] = "";
         $d["border_top_style"] = "none";
         $d["border_right_style"] = "none";
         $d["border_bottom_style"] = "none";
         $d["border_left_style"] = "none";
         $d["border_top_width"] = "medium";
         $d["border_right_width"] = "medium";
         $d["border_bottom_width"] = "medium";
         $d["border_left_width"] = "medium";
         $d["border_width"] = "medium";
         $d["border"] = "";
         $d["bottom"] = "auto";
         $d["caption_side"] = "top";
         $d["clear"] = "none";
         $d["clip"] = "auto";
         $d["color"] = "#000000";
         $d["content"] = "normal";
         $d["counter_increment"] = "none";
         $d["counter_reset"] = "none";
         $d["cue_after"] = "none";
         $d["cue_before"] = "none";
         $d["cue"] = "";
         $d["cursor"] = "auto";
         $d["direction"] = "ltr";
         $d["display"] = "inline";
         $d["elevation"] = "level";
         $d["empty_cells"] = "show";
         $d["float"] = "none";
         $d["font_family"] = "serif";
         $d["font_size"] = "medium";
         $d["font_style"] = "normal";
         $d["font_variant"] = "normal";
         $d["font_weight"] = "normal";
         $d["font"] = "";
         $d["height"] = "auto";
         $d["left"] = "auto";
         $d["letter_spacing"] = "normal";
         $d["line_height"] = "normal";
         $d["list_style_image"] = "none";
         $d["list_style_position"] = "outside";
         $d["list_style_type"] = "disc";
         $d["list_style"] = "";
         $d["margin_right"] = "0";
         $d["margin_left"] = "0";
         $d["margin_top"] = "0";
         $d["margin_bottom"] = "0";
         $d["margin"] = "";
         $d["max_height"] = "none";
         $d["max_width"] = "none";
         $d["min_height"] = "0";
         $d["min_width"] = "0";
         $d["orphans"] = "2";
         $d["outline_color"] = "invert";
         $d["outline_style"] = "none";
         $d["outline_width"] = "medium";
         $d["outline"] = "";
         $d["overflow"] = "visible";
         $d["padding_top"] = "0";
         $d["padding_right"] = "0";
         $d["padding_bottom"] = "0";
         $d["padding_left"] = "0";
         $d["padding"] = "";
         $d["page_break_after"] = "auto";
         $d["page_break_before"] = "auto";
         $d["page_break_inside"] = "auto";
         $d["pause_after"] = "0";
         $d["pause_before"] = "0";
         $d["pause"] = "";
         $d["pitch_range"] = "50";
         $d["pitch"] = "medium";
         $d["play_during"] = "auto";
         $d["position"] = "static";
         $d["quotes"] = "";
         $d["richness"] = "50";
         $d["right"] = "auto";
         $d["speak_header"] = "once";
         $d["speak_numeral"] = "continuous";
         $d["speak_punctuation"] = "none";
         $d["speak"] = "normal";
         $d["speech_rate"] = "medium";
         $d["stress"] = "50";
         $d["table_layout"] = "auto";
         $d["text_align"] = "left";
         $d["text_decoration"] = "none";
         $d["text_indent"] = "0";
         $d["text_transform"] = "none";
         $d["top"] = "auto";
         $d["unicode_bidi"] = "normal";
         $d["vertical_align"] = "baseline";
         $d["visibility"] = "visible";
         $d["voice_family"] = "";
         $d["volume"] = "medium";
         $d["white_space"] = "normal";
         $d["widows"] = "2";
         $d["width"] = "auto";
         $d["word_spacing"] = "normal";
         $d["z_index"] = "auto";
         // Properties that inherit by default
         self::$_inherited = array("azimuth", "border_collapse", "border_spacing", "caption_side", "color", "cursor", "direction", "elevation", "empty_cells", "font_family", "font_size", "font_style", "font_variant", "font_weight", "font", "letter_spacing", "line_height", "list_style_image", "list_style_position", "list_style_type", "list_style", "orphans", "page_break_inside", "pitch_range", "pitch", "quotes", "richness", "speak_header", "speak_numeral", "speak_punctuation", "speak", "speech_rate", "stress", "text_align", "text_indent", "text_transform", "visibility", "voice_family", "volume", "white_space", "widows", "word_spacing");
     }
 }