scalatags icon indicating copy to clipboard operation
scalatags copied to clipboard

Model traversal

Open scf37 opened this issue 3 years ago • 1 comments

One of strong points of scalatags is ability to traverse, extend and transform assembled model before rendering. Unfortunately it is hacky right now - not everything is public and not everything is designed to be accessed by user code.

It could be nice to cleanup scalatags model to be proper AST (but still open for extension). Use cases:

  • collect used resources and css classes before rendering
  • declare custom tags and attributes to further control rendering. For example, adding selenium anchors only when tests are requesting the page
  • transform model before rendering. I use that for CSS renaming.

scf37 avatar Jun 09 '22 19:06 scf37