diagrams-svg-1.3.1.10: SVG backend for diagrams drawing EDSL.

Copyright | (c) 2015 Diagrams team (see LICENSE)
License | BSD-style (see LICENSE)
Maintainer | diagrams-discuss@googlegroups.com
Safe Haskell | None
Language | Haskell2010

Diagrams.Backend.SVG.Attributes

Contents

- Id
- Class

Description

Attributes that are specific to the SVG backend. The intent of this module is to allow adding the attributes class, and id attributes to an SVG. For those embedding the resulting SVG into a webpage, this allows some interactivity with javascript and stylesheets.

Synopsis

- newtype SvgId = SvgId {
  - getSvgId :: String
  }
- svgId :: HasStyle a => String -> a -> a
- newtype SvgClass = SvgClass {
  - getSvgClass :: String
  }
- svgClass :: HasStyle a => String -> a -> a

# Id

newtype SvgId Source

The SVG id attribute.

Constructors

SvgId |

Fields

getSvgId :: String

Instances

Semigroup SvgId Source |
AttributeClass SvgId Source |

svgId :: HasStyle a => String -> a -> a Source

Set the Id attribute.

# Class

newtype SvgClass Source

The SVG class attribute.

Constructors

SvgClass |

Fields

getSvgClass :: String

Instances

Semigroup SvgClass Source |
AttributeClass SvgClass Source |

svgClass :: HasStyle a => String -> a -> a Source

Set the class attribute.