public function CSSClasses($stopAtClass = self::class)
    {
        $classes       = [];
        $classAncestry = array_reverse(ClassInfo::ancestry(static::class));
        $stopClasses   = ClassInfo::ancestry($stopAtClass);

        foreach ($classAncestry as $class) {
            if (in_array($class, $stopClasses)) {
                break;
            }
            $classes[] = $class;
        }

        // optionally add template identifier
        if (isset($this->template) && !in_array($this->template, $classes)) {
            $classes[] = $this->template;
        }

        // Strip out namespaces
        $classes = preg_replace('#.*\\\\#', '', $classes);

        return Convert::raw2att(implode(' ', $classes));
    }