[css] implement @document

Depends on pr #2161