𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Mastering SVG: Ace web animations, visualizations, and vector graphics with HTML, CSS, and JavaScript

✍ Scribed by Rob Larsen


Publisher
Packt Publishing Ltd
Year
2018
Tongue
English
Leaves
305
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Take the plunge and develop cross-browser-compatible and responsive web designs with SVG

Key Features

  • Master the art of custom animations and visualizations with SVG, CSS, and JavaScript
  • Combine SVG with third-party libraries and frameworks such as React, JQuery, D3, and Snap.svg for GUI-rich apps
  • Create an awesome user experience with high-performance graphics for your web applications

Book Description

SVG is the most powerful image format in use on the web. In addition to producing resolution-independent images for today's multi-device world, SVG allows you to create animations and visualizations to add to your sites and applications. The simplicity of cross-platform markup, mixed with familiar modern web languages, such as CSS and JavaScript, creates a winning combination for designers and developers alike.

In this book, you will learn how to author an SVG document using common SVG features, such as elements and attributes, and serve SVG on the web using simple configuration tips for common web servers. You will also use SVG elements and images in HTML documents.

Further, you will use SVG images for a variety of common tasks, such as manipulating SVG elements, adding animations using CSS, mastering the basic JavaScript SVG (API) using Document Object Model (DOM) methods, and interfacing SVG with common libraries and frameworks, such as React, jQuery, and Angular.

You will then build an understanding of the Snap.svg and SVG.js APIs, along with the basics of D3, and take a look at how to implement interesting visualizations using the library. By the end of the book, you will have mastered creating animations with SVG.

What you will learn

  • Deliver the elements that make up an SVG image
  • Replace your old CSS sprites with SVG
  • Understand animation and data visualization with SVG are explained in pure JavaScript and using common libraries
  • Use SVG to scale images across multiple devices easily
  • Harness the power of CSS animations and transformations to manipulate your SVG images in a replicable, remixable way
  • Interface SVG with common libraries and frameworks, such as jQuery, React, and Angular

Who this book is for

This book is for web developers and designers looking to add animation to their projects. Some experience with HTML, CSS, and JavaScript is required.

✦ Table of Contents


Cover
Title Page
Copyright and Credits
PacktPub.com
Contributors
Table of Contents
Preface
Chapter 1: Introducing Scalable Vector Graphics
Creating a simple SVG image
Using SVG as a content image
Drawing with code
Scalable + vector graphics
Using SVG in CSS
Gradients in SVG
Directly embedding SVG in an HTML document
Feature detection and Modernizr
Summary
Chapter 2: Getting Started with Authoring SVG
Positioning in SVG
viewBox and viewport in SVG
Introducing paths
More on basic shapes
The line element
The ellipse element
The polygon element
The polyline element
More on fills and strokes
stroke-dasharray
stroke-dashoffset
stroke-linecap
stroke-linejoin
stroke-opacity
linearGradient and radialGradient
The pattern element
Authoring programs
Summary
Chapter 3: Digging Deeper with SVG Authoring
Transformations
translate
scale
rotate
skew
Clipping and masking
Clipping
Masking
Importing images into SVG
Filters
Serving SVG on the web
Apache
nginx
IIS
Summary
Chapter 4: Using SVG in HTML
SVG, HTML, and accessibility
SVG as an image src
Inline SVG
SVG and responsive web design
The srcset attribute
The srcset and sizes attributes
The picture element
Additional details on inline SVG in an HTML document
Caching
Complexity
Authoring
TheΒ Document Object Model
Summary
Chapter 5: Working with SVG and CSS
CSS background images
Data URLs for SVG background images
SVG sprites and icon sets
Styling inline SVG
Using common CSS properties to manipulate SVGs
Basic font properties
Text properties
Miscellaneous CSS properties
Using SVG-specific CSS properties to manipulate SVGs
Color and painting properties
Stroke properties
Text properties
Compositing properties
Interactivity properties
Styles in standalone SVG images
Basic CSS animations and transitions with SVG
CSS animationsΒ 
Basic animation format
Animating a clip path
Animating multiple properties and assigning multiple animations to an element
CSS transitions
Summary
Chapter 6: JavaScript and SVG
JavaScript Versions and tools
JavaScript Versions
ECMAScript 5
ECMAScript 2015Β 
TypeScript
Tooling
The DOM interface to SVG
Initial exploration
The SVG DOM manipulatorΒ 
Summary
Chapter 7: Common JavaScript Libraries and SVG
Manipulating SVG with jQuery
Working with AngularJS and SVG
Manipulating SVG with Angular
Getting started with Angular
Installing Node, npm, and Angular Cli
Working with React and SVG
Summary
Chapter 8: SVG Animation and Visualizations
Creating an SVG data visualization
General techniques for animating SVG
Animating with pure JavaScript
Animating with CSS
Animating SVG with SMIL
Animating SVG with Vivus
Animating SVG with GSAP
Summary
Chapter 9: Helper Libraries Snap.svg and SVG.js
Working with Snap.svg
Getting started with Snap.svg
Animation with Snap
Snap.svg utilities
Snap.svg events
Custom data visualization with Snap.svg
Working with SVG.js
Getting started with SVG.js
Animation with SVG.js
SVG.js utilities
SVG.js events
Custom data visualization with SVG.js
Summary
Chapter 10: Working with D3.js
Getting started with D3
D3's enter and exit
Implementing a donut chart with D3
Implementing a chord diagram in D3
Summary
Chapter 11: Tools to Optimize Your SVG
Serving compressed SVG
gzipping SVG on Apache
SVG compression on nginx
SVG compression on IIS
SVGO
SVGOMG
SVGO authoring plugins
svgcleaner
Summary
Other Books You May Enjoy
Index


πŸ“œ SIMILAR VOLUMES


Mastering SVG ace web animations, visual
✍ Larsen, Rob πŸ“‚ Library πŸ“… 2018 πŸ› Packt Publishing 🌐 English

Take the plunge and develop cross-browser-compatible and responsive web designs with SVG Key Features Master the art of custom animations and visualizations with SVG, CSS, and JavaScript Combine SVG with third-party libraries and frameworks such as React, JQuery, D3, and Snap.svg for GUI-rich apps C

Mastering SVG: Web Animations, Visualiza
✍ Rob Larsen [Larsen, Rob] πŸ“‚ Library πŸ“… 2018 πŸ› Packt Publishing 🌐 English

<span><p><strong>Master the image format of the modern web</strong></p><h4>Key Features</h4><ul> <li>Master the art of creating responsive and interactive graphics with SVG, CSS, and JavaScript</li> <li>Combine SVG with popular animation libraries and frameworks for GUI rich applications</li> <li

Using SVG with CSS3 and HTML5: Vector Gr
✍ Amelia Bellamy-Royds, Kurt Cagle, Dudley Storey πŸ“‚ Library πŸ“… 2016 πŸ› O'Reilly Media 🌐 English

<div> <p>Unlike other image formats, SVG can be an interactive part of your web site, integrated in HTML5 markup or created dynamically using JavaScript. It can be styled by CSS to instantly adapt to changes in your site's design. Flexible metadata options can make the graphics accessible to screen

Using SVG with CSS3 and HTML5: Vector Gr
✍ Amelia Bellamy-Royds, Kurt Cagle, Dudley Storey πŸ“‚ Library πŸ“… 2017 πŸ› O’Reilly Media 🌐 English

<div><p>Using Scalable Vector Graphics (SVG) for illustrations only scratches the surface of this format’s potential on the web. With this practical guide, you’ll learn how to use SVG not only for illustrations but also as graphical documents that you can integrate into complex HTML5 web pages, and

Using SVG with CSS3 and HTML5: vector gr
✍ Bellamy-Royds, Amelia;Cagle, Kurt;Storey, Dudley πŸ“‚ Library πŸ“… 2018;2017 πŸ› O'Reilly Media, Inc. 🌐 English

Using Scalable Vector Graphics (SVG) for illustrations only scratches the surface of this format's potential on the web. With this practical guide, youll learn how to use SVG not only for illustrations but also as graphical documents that you can integrate into complex HTML5 web pages, and style wit