Remove access to  document `css` method
Improve document test
Merge branch 'refactor-document' into fix-template-parsing