public function css(string $name, $val=null)
    {
        if ($val !== null) { // set css for all nodes
            foreach ($this->getElements() as $node) {
                $style = self::parseStyle($node->getAttribute('style'));
                $style[$name] = $val;
                $node->setAttribute('style', self::getStyle($style));
            }
            return $this;
        }
        if ($node = $this->getFirstElmNode()) { // get css value for first element
            $style = self::parseStyle($node->getAttribute('style'));
            if (isset($style[$name])) {
                return $style[$name];
            }
        }
    }