Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish SVG attributes that do not overlap with HTML attributes #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deterdw
Copy link

@deterdw deterdw commented May 30, 2015

This simple change creates a SVGOnlyAttrs trait that contains all the attributes that are unique to SVG (in the sense of not being members of the Attrs trait). The existing SVGAttrs trait is then formed by extending this trait with the few overlapping members.

In this way SVGAttrs remains fully backwards-compatible, but we are able to define a single object to hold all attributes, e.g. (where ST is scalatags.Text):

object * extends ST.Cap with ST.Attrs with ST.SvgOnlyAttrs

with is useful when working with SVG embedded in HTML. (One can alias all tags as <, all styles as ^ and all attributes as *, for example.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant