A Modifier which contains a String which will not be escaped.
A Modifier which contains a String.
Convenience object for importing all of Scalatags' functionality at once
Common attributes.
Convenience object for only importing Scalatag's implicits, without importing any of the tags, styles or attributes themselves.
Convenience object for only importing Scalatag's implicits, without importing any of the tags, styles or attributes themselves. This includes conversions to Modifier, typeclass instances for treating strings and numbers as attributes or style values, and other things.
Convenience object for importing only Scalatags' tags (e.g.
Convenience object for importing only Scalatags' tags (e.g. div
, p
)
into the local namespace, while leaving Styles and Attributes accessible
via the *
object
Common styles
Less common styles
SVG only attributes
SVG only tags
Common tags
Less common tags
(Since version ) see corresponding Javadoc for more information.
An abstract representation of the Scalatags package. This allows you to customize Scalatags to work with different backends, by defining your own implementation of
Tag
, and specifying how the various Attrs and Styles contribute to construct the Builder. Apart from satisfying the default String/Boolean/Numeric implementations of Attr and Style, you can also define your own, e.g. ScalaJS ships with an implicit conversion fromjs.Any
toAttr
, so that you can attach objects to the resultantdom.Element
without serializing them.By default, Scalatags ships with scalatags.Text:
Bundle[StringBuilder]
on all platforms, and scalatags.JsDom:Bundle[dom.Element]
on ScalaJS.It is possible to write entirely backend-agnostic Scalatags code by making your code parametric on a Bundle (or some subclass of it), and importing from that rather than importing directly from scalatags.JsDom or scalatags.Text. You will naturally only be able to use functionality (e.g. implicit conversions to Attrs and Styles which are present in the common interface.
The type to which Attrs and Styles are applied to when the
Tag
is being rendered to give a final result.