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

New SVG tutorial #430

Open
wants to merge 31 commits into
base: gh-pages
Choose a base branch
from
Open

Conversation

brunogirin
Copy link
Contributor

A first version of an SVG tutorial to address part of issue #100 . This tutorial is set as an extension to the HTML/CSS tutorial and leverages concepts learnt there. In particular, it takes the decision to focus on embedding SVG in an HTML page rather than creating stand-alone documents. It is split into 4 lessons so far:

  1. Introduction to SVG: basic shapes and a short word on shape order
  2. Path and complex shapes: a whole lesson on the path element
  3. Groups and transforms: introduction to the g element and the transform attribute
  4. Advanced SVG: images and advanced features that use the defs tag

The complete tutorial should give students a good grounding in creating SVG documents. The lessons can be quite long despite trying hard not to get into details. I would very much welcome feedback on whether the explanations are clear.

Note that you will have to run jekyll to see the examples properly as they won't show in the GitHub markdown preview.

Note that this pull request includes an update to one of the HTML tutorial documents that I accidentally pulled from the #389 fix.

stampycode and others added 25 commits March 20, 2018 19:32
Difference between "We will be styling this page"
at https://github.com/codebar/tutorials/blob/master/html/lesson2/tutorial.md#today-we-will-be-focusing-on-fundamental-css-concepts
and "Download the files required to begin working through the tutorial from here(mac/linux) or here(windows)"
at https://gist.github.com/hundred/7332441/download
missing class from the tutorial example
Copy link

@cassieevans cassieevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is overall a great tutorial for students that want to understand the inner workings of SVG.
Great job, thanks Bruno for all the hard work that's gone into this.

However, I feel that students would benefit from stepping back a bit and learning some more everyday, practical things before deep diving into handwriting SVG paths.

e.g.
Why use SVG?
Benefits of using inline SVG vs SVG as an image
Making SVG accessible
Scaling SVG/ viewbox (such a frustrating thing if you're expecting SVG to behave like an image)
Optimizing SVG (SVGOMG)
USE/shadow DOM?
Using SVG as an Object/Data URI?

svg/lesson1/tutorial.md Outdated Show resolved Hide resolved
svg/lesson1/tutorial.md Show resolved Hide resolved
svg/lesson1/tutorial.md Outdated Show resolved Hide resolved
svg/lesson1/tutorial.md Outdated Show resolved Hide resolved
svg/lesson3/tutorial.md Show resolved Hide resolved
@brunogirin
Copy link
Contributor Author

@cassieevans regarding your general points:

Why use SVG?
Benefits of using inline SVG vs SVG as an image

Yes, I tried doing that in the first lesson and then found out that I ended up with a very long lesson so not sure how to balance it. What are the key points you think I should include?

Making SVG accessible

Definitely. The whole HTML tutorial needs a chapter on accessibility and I'd like to do that one first so that the SVG one can leverage it. At the moment I'd end up adding a lot of info that should be in the HTML tutorial.

Scaling SVG/ viewbox (such a frustrating thing if you're expecting SVG to behave like an image)

I was planning to do that in a lesson 5 but wanted to get the first 4 lessons looked at first. This is also getting to the limits of my knowledge in SVG so I would appreciate help in this area.

Optimizing SVG (SVGOMG)
USE/shadow DOM?
Using SVG as an Object/Data URI?

This is an area where I have no experience whatsoever. I'm happy to look into it but I would need help in getting it right. Regarding the shadow DOM, I feel that this would be too advanced compared to other codebar tutorials.

To give you additional context, my experience with SVG is mostly around producing dynamic content such as graphs with the d3 library so this tutorial probably skews towards that aim. One aspect that might be useful to include is how you can deal with illustrative SVG where you get SVG files exported by Illustrator or Sketch and want to include them in your design.

@cassieevans
Copy link

Yeah, agreed with a lot of your points.
My SVG experience is more illustrative/animation so I'm right the other end!

I reckon some further reading/links out to other articles would fill the gaps and then we'd be golden!

Thanks again for all the hard work 👍

@brunogirin
Copy link
Contributor Author

I reckon some further reading/links out to other articles would fill the gaps and then we'd be golden!

No problem.

Should I put those 2 in lesson 4? Maybe I can add a short "going beyond the tutorial" section that mentions all this.

@brunogirin
Copy link
Contributor Author

Added Sketch and SVGOMG to the tools section in lesson 1.
Added the two css-tricks articles to lesson 4.

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.

None yet

6 participants