As designers, we work mostly with form, color, and typography to express meanings and communicate ideas, messages, or concepts. Writers also have some core tools that they use for storytelling. Archetypes are one of these tools.
First described by Swiss psychologist Carl Jung, archetypes are symbolic images recognized in the collective unconscious of all people. Using archetype characters in storytelling is a more subtle way for writers to use symbols and expressing ideas without explicitly writing those ideas.
The infographic
Published on Point Park University, a detailed infographic has been making the rounds on the Internet. It takes the most common characters a hero usually meets in an adventure and details it in a short text and a great illustration.
The Illustrations
In the detailed presentation of the infographic, you can discover the illustrations one-by-one by hovering each archetype image. In a clever twist, each archetype is presented as a tarot character, making each illustration a tarot card. The cards are simple vector illustrations that use the world surrounding each character to represent each archetype. Each card’s color scheme was carefully studied to match the universe we could imagine for each archetype. The use of tarot card was very clever, as it is one of the best examples of archetype use in design.
The archetypes
The archetypes presented are the following: the Hero, the Herald, the Mentor, the Threshold Guardian, the Shapeshifter, the Ally, the Trickster, and the Shadow. Discover each archetype’s description in the infographic below or in this detailed article.
In this tutorial, you’ll learn to draw an adult sheep and a lamb, find out if all sheep have horns, and explore the distinctive appearance features that are typical for these animals. You don’t need any special knowledge of animal anatomy to complete the drawings!
Did you know that a sheep can not only recognize up to 50 other sheep faces and remember them for two years, but it also recognizes human faces? That’s truly incredible!
The sheep is a key animal in the history of farming; we can’t imagine our culture without this wonderful animal.
You may also be interested in these drawing tutorials:
You will need the following equipment to complete this project:
An HB graphite pencil
A 3B graphite pencil
An eraser
Drawing paper
1. How to Draw an Adult Sheep
Step 1
Let’s start with the general shape of the head; I outline it, using the HB pencil. Please be sure to leave enough space for the rest of the sheep’s body on the sheet of paper.
Step 2
I add an oblong shape for the sheep’s body. Don’t overthink the process at this stage of drawing; we’ll make the refinements later.
Actually, it’s useful to see the shapes that we are drawing as something three-dimensional in their core essence. For example, the body can be presented as a shape that has a rounded foundation and a top plane.
You don’t have to draw these ovals as I did—this is just an illustration.
Step 3
I add the framework of the limbs—this is a simple stylized version that captures just the main anatomical features. I use the small circles to mark the elbows, knees, and ankles of the forelimbs.
The structure of the hind legs is slightly different—the upper bones create a peculiar angle. One of the hind legs isn’t fully visible because of the foreshortening, so I’ll leave it without the upper round mark.
The feet have circles at the base to create an illusion that the animal is actually standing on the ground.
Step 4
I add rough shapes to add some thickness to the legs, creating the bulk. We’ll refine the contours later.
Step 5
I add the shapes of the ears to the head; their tips are slightly rounded.
Step 6
I draw the neck. Imagine that this shape is three-dimensional; adding the subsidiary circles may help.
I also erase the lines of the limbs’ framework; they can be distracting, and we don’t need them anymore.
Step 7
I draw the eyes. They are relatively small, located at a distance from each other, and have horizontal pupils.
I also add the inner openings of the ears.
Let’s add the details to the bottom part of the face.
I draw the nose and the mouth; sheep have divided upper lips, which makes them different from goats. Also, they don’t have a beard (and goats do).
Depending on the breed, domestic sheep may have no horns at all, or horns in both sexes, or in males only. The horns usually are quite large and often form a lateral spiral.
Let’s assume that the sheep we are drawing is hornless, but if you are interested in drawing a sheep with horns (or a ram, which is a male sheep), we have an in-depth tutorial on drawing the horns. Just add the shapes of the horns to the top of the animal’s head!
Step 8
I refine the contours of the limbs, accenting the elbows and knees of the forelegs and the hocks of the hind legs. Sheep have cloven hooves and dew claws, so I add these features of the limbs’ bottom parts, too.
The foreshortening of this sheep doesn’t allow us to see its hocks fully; we can add just a hint at them. In the illustration below you can observe a sheep in a side view.
I recommend paying attention to the tail of the sheep; these animals have tails that hang down. Some breeds demonstrate short tails that don’t require docking (this is the name of the process when a tail is shortened); in other cases, the tail of a domestic sheep may be cut.
In the corner of the image, you’ll find a sample of the line that I used for drawing the wool. Such scrawl-like lines work perfectly and can also save you much time.
Step 9
Let’s add the outer covering of the sheep’s body and refine it. I extend the contours; a sheep’s body usually creates a solid impression, partially because of a thick layer of wool, so feel free to make it really bulky.
I also add some folds in the neck area to emphasize the wool covering. Then I draw just a couple of other anatomical details: an udder and a tail.
Step 10
Now we have a line sketch that actually resembles a sheep, but we can make it more realistic and interesting. With the 3B pencil, I add some graphite shading to the head of the sheep, accentuating its sides, and darken the folds of wool in the neck area.
It’s important to make the main facial features contrasting, so I emphasize the eyes, the nose, and the mouth.
Step 11
I use the HB pencil to add hatches to the upper part of the sheep’s body.
If we stylize the shape of the body, the back will demonstrate a top plane—it is spotlit and should be slightly lighter than the sides of the body.
Step 12
I work on the bottom part of the sheep’s body, including the limbs and tail. I darken the belly and the sides of the legs and body, using the 3B pencil.
As a finishing touch, I add soft graphite strokes to create a blurry drop shadow under the animal.
2. How to Draw a Lamb
Step 1
In this part of the tutorial, we’ll sketch a lamb—a younger sheep. We’ll also explore its distinctive features.
With the HB pencil, I draw the shape of the head; it is wider in the upper part.
I add the shapes of the ears, making them slightly asymmetrical on purpose.
Step 2
I add the rough shape of the lamb’s body. It is quite small in relation to the head; this feature is common for baby animals.
Step 3
I join the head and the body, drawing the cylindrical form of the neck between them.
Step 4
I draw the framework of the limbs, using small circles and lines. Regarding the direction of the bones, a lamb is similar to an adult sheep, but its limbs are shorter and more slender.
Step 5
I add the rough shapes of the legs’ parts. The simpler your drawing is at this stage, the better.
Step 6
I draw the eyes of the lamb. The eyes of a baby animal are bigger than the eyes of an adult sheep; you can make them even bigger to add cuteness to your sketch.
I draw the nose and an open mouth; let’s imagine that this lamb is happy and wants to tell us something!
Step 7
I refine the forelimbs of the lamb. They have more smoothed contour lines than the legs of an adult sheep, but the dew claws and knees should be observable.
It’s also a nice idea to add a covering of short wool in the breast area.
I refine the contours of the hind legs, accentuating the dew claws and the hocks.
Step 8
I extend the contours of the lamb’s body just a little bit, using a wavy line that is imitating the wool covering. I also add the tail and the marks that split the hooves.
Step 9
Let’s add some graphite shading. I mark the darker areas of the drawing (the sides of the head, body, and the limbs), using the HB pencil.
Step 10
I increase the contrast by adding the darker 3B pencil hatches. I make sure that the facial features of the lamb attract the viewer’s attention, and the belly and the hooves are dark enough.
A soft drop shadow is a nice addition; if you are in the mood, you can draw some grass blades or another texture.
Your Drawings Are Complete
Congratulations! You’ve created two beautiful drawings of wonderful happy sheep. I hope you’ve enjoyed the process, and no animal seems too difficult to draw now!
If you’re a creative type, making money on the internet has become markedly easier in the last two decades. Thanks to the power of the internet, those with an idea can turn it into an income if it captures the imagination of the masses. For example, if you design a WordPress template, you can sell it to others and earn some cash. If you’re a YouTuber, your content can reach one billion people every month.
However, as easy as it’s become to make money online, many creatives don’t get the compensation they deserve. There are even some internationally renowned recording artists that don’t feel as though they’re being paid in the right way. The most famous example of this is Taylor Swift. After disagreeing with Spotify’s payment scheme, Swift removed her content from the site. Although she’s since resolved her issues with the streaming service, the issue of content control and compensation is still one that looms large online. Blockchain Code by methodshop.com
Fortunately, as it often does, technology has stepped into the breach to offer a solution. With the emergence of bitcoin changing the game in 2009, developers are now finding clever ways to use blockchains. Essentially the underlying system that makes cryptocurrency transactions possible, blockchains have made it possible to store, process and track data in new ways.
What does this have to do with creative content, though? Well, thanks to a new altcoin known as Tron, individuals can cut out the middleman and have more control over their content. In simple terms, a user can join the peer to peer distribution platform known as Exodus. From here, they can share content using personal tokens. These tokens will be based on the Tron 20 system and basically allow people to track where their content is being used. Because the system is decentralized, only the individual creator has the power to earn revenue from their product. In other words, the tokens create a direct link between the creator and their audience, rather than a company like Google or Apple (or even a record company) standing in the middle of the process.
Although Tron is still in its early stages of development, it already has an exchange unit known as Tronix. With a tradeable coin in place, supporters of Tron can purchase credits and trade them like any other commodity. For example, by visiting Coinlist, a user can learn more about Tronix coins and about ways to invest in it using an exchange or a broker. TRON (TRX) Blockchain by Descryptive
On the one hand, Tronix coins have the ability to increase in value as the underlying technology becomes popular. Therefore, from an investment perspective, these coins can be a way to make some money. On the other hand, buying Tronix coins is a way of supporting the development of the Tron system. Indeed, if you’re a creative type that wants to see this technology proliferate and change the way people get paid, trading Tronix coins is a way to help.
At this stage, the future of Tron is far from certain. Revolutionizing how content is distributed and controlled online is no mean feat. However, if the technology can prove it works and people support it, Tron has the ability to give creative types more power over their creations which can only be a good thing.
As Brad does, he clearly outlines his struggles point-by-point:
I have invested enough time learning it
React and ES6 travel together
Syntax and conventions
Getting lost in this-land
I haven’t found sample projects or tutorials that match how i tend to work
I’m less competent at JS than HTML and CSS
It seems that Brad’s struggles resonated with others as well, inspiring empathy and help from the community. For example, Kevin Ball touches on the second and third frustrations by supplying a distinction between React and ES6 and examples of the syntax and conventions of each:
For each feature, I show a couple examples of what it might look like, identify where it is coming from, give you a quick overview of what is called and what it does, and link off to some resources that can help you learn about it.
Super awesome!
Shortly following Brad’s post was this tweet from Sara Soueidan:
Speaking of jQuery, Sarah Drasner had written a post a little while ago that showed how Vue can be used as a jQuery replacement and requires no build process at all. Well, the same can be true of React, despite the fact that both frameworks are predominantly used in complex app environments.
And, if all this talk about moving away from jQuery and into complex app environments sounds scary, then maybe this interview with Bruce Lawson will be reassuring to you. After all:
The end user doesn’t care whether your website is made with React or Angular or webpack or Broccoli or Grunt or whatever. They just want it to work in their damn browser.
But, still, there may be circumstances where React will be the right tool for the job and you’ll want it in your toolbox. For example, WordPress is using it as the basis for it’s upcoming Gutenberg editor meaning WordPress developers (and that’s a lot of us) will want to heed Matt Mullenweg’s advice to „learn JavaScript deeply.” Our guide on developing for Gutenberg might be a great place for you to start that journey.
In this tutorial, you will learn how to create a summer vacation illustration in Adobe Illustrator. To be more exact, we will create an image of a woman sitting on a bunch of suitcases. We will use basic shapes, warp effects, and the Scissors Tool to create our illustration. This tutorial is broken down into clear, simple steps, making it suitable for beginners.
If you love vacation and travel and want to find tons of amazing images online, then go to GraphicRiver. They have an amazing selection of images there, including some vacation ones.
So, let’s get started!
1. How to Create the Woman’s Head and Hat
Step 1
After opening your Adobe Illustrator, let’s start to create the woman, beginning with her head. Take the Ellipse Tool (L) and draw an ellipse that is almost a circle. Delete the stroke color if you have one, and set the fill color shown below.
Then we want to give her a smiley mouth, so draw an ellipse again and set a white fill color. Add a new ellipse overlapping this one—it should cover just the top part of the previous ellipse. In the image below, you can see how the shapes need to overlap each other. They’re marked with a black stroke, which you don’t actually need in your illustration.
Select the two white ellipses, go to the Pathfinder panel (Window > Pathfinder), and click on the Minus Front button. You’ll end up with a crescent shape, which is the smiley mouth!
Step 2
Sunglasses are a mandatory attribute of summer vacations, and we will start to create them by using the Rounded Rectangle Tool. Set a dark grey fill color and no stroke.
While keeping it selected, go to Effect > Warp > Bulge. A new dialogue window will pop up, where you want to enter the options presented below. Then press OK. The first lens of the sunglasses is ready.
Now we want to create another lens for the sunglasses. Select the first one and, while holding the Shift and Alt keys on your keyboard, move this shape to the right. Holding these two keys will help you to create a copy (Alt), which will be perfectly aligned horizontally (by the Shift button).
Now we want to create the bridge of the sunglasses. Press the Swap Fill and Stroke button on the Tools panel (Shift-X), and the fill color you had will transform into the stroke color. That’s exactly what we need. Hit the Arc Tool and draw a curve between the two glasses. Now the sunglasses are ready!
Give them to the woman, who looks more like an alien now!
Step 3
We will create the woman’s hair from a few parts. First, draw an ellipse using the Ellipse Tool (L). Be sure you delete the stroke color and set the necessary fill color.
While keeping it selected, go to Effect > Warp > Arc and in the new dialogue window enter the options shown below. Then, press OK.
Finally, expand this shape (Object > Expand Appearance). As we will rotate this shape later on, we must expand it first in order not to deform it.
Step 4
After this, place this shape on the woman’s head. Notice that it has to stay behind the glasses. After you’ve placed the left part of the hair on the woman’s face, select the glasses, cut (Control-X), and place them over the hair (Control-F).
So now we have the left part of the hair, and we want to create the right part. Select the left part and hit the Reflect Tool (O). Then, while keeping the Alt key pressed, click on the woman’s forehead. A new dialogue window will pop up, where you need to enter Axis Vertical, Angle 90 degrees, and then press Copy. You’ve just created a vertical copy of the left part to get the right part.
Finally, we want to create the hair at the back. Draw a darker ellipse behind the head using the Ellipse Tool (L). Remember, to place something behind everything, you need to cut it (Control-X), and then place it behind (Control-B).
The last effect we must apply to the back hair is the Inflate effect. While keeping the back hair selected, go to Effect > Warp > Inflate, and then enter the options shown in the image below.
Step 5
After that, we are going to create the hat. Using the Ellipse Tool (L), draw a red ellipse on the woman’s forehead. Warp it (Effect > Warp > Arc), and enter the options shown below.
Finally, add a big red ellipse behind everything. The hat is done!
2. How to Create the Woman’s Body
Step 1
Let’s start to create the body from a circle. It doesn’t have to be an even circle. While keeping it selected, go to Effect > Warp > Inflate, and enter the necessary options. You don’t need to expand this shape, but you can if you want to (Object > Expand Appearance). If you do not want to expand, it means you can edit the options later in the Appearance panel (Window > Appearance).
Finally, add the neck using the Rectangle Tool (M), by creating a small rectangle under the head. You don’t actually need the stroke that is shown below.
Step 2
To create the dress, we need a white fill color and the Rectangle Tool (M). The black stroke you see below is presented just for better visibility, and you don’t actually need it in your final illustration. So draw a rectangle and then apply the Bulge effect to this shape (Effect > Warp > Bulge).
Step 3
Place the upper part of the dress on the woman’s body.
To add the first strap, draw a small rectangle using the Rectangle Tool (M) with white fill color and no stroke. Place the strap on the left shoulder and rotate it a little bit to the left.
Select the left strap and hit the Reflect Tool (O). Then, while keeping the Alt key pressed, click just under the woman’s neck. A new dialogue window will pop up, where you need to enter Axis Vertical, Angle 90 degrees, and then press Copy. Remember that the stroke is there only for better visibility. Now she has two dress straps.
Step 4
Add a tiny ellipse where the hand should be. Then take the Direct Selection Tool (A), and select the top and bottom anchor points on the ellipse. Pressing the Up Arrow on your keyboard, move these anchor points up just a little. Remember, you don’t need the black stroke.
Now we want to create another hand. Hold down the Shift and Alt buttons together and move the hand to the right using the Selection Tool (V). You just created the hands!
Step 5
After that, we are going to create the bottom part of the woman. Draw an ellipse which should overlap the upper part of the dress.
Using the Direct Selection Tool (A), select its left and right anchor points and move them down using the Down Arrow on your keyboard.
Select all of the dress parts (the two straps, as well as the upper and bottom parts) together (you should hold the Shift button to select two or more objects). Go to the Pathfinder panel (Window > Pathfinder) and press the Unite button. Now you should have one shape instead of four.
Step 6
Let’s create the left leg. Draw an ellipse, place it where the leg starts, and then rotate it to the right.
Add a rectangle as shown in the image below. While keeping this rectangle selected, go to Effect > Warp > Arc Upper and enter the options shown below.
To finish off the leg, add four tiny ellipses as toes. And as before, make sure that you do not have the black stroke.
Step 7
Select the whole leg and group it (right-click > Group) so you can move it later on.
Then create a vertical copy of the left leg to get the right one. By using the Reflect Tool (O), you can do this. Now the woman is ready!
3. How to Create the Suitcases
Step 1
Let’s create the first suitcase. First, draw a light blue rectangle.
Create a copy of it in front and shrink it down from the top and bottom until you get a very thin rectangle. Set the fill color shown for the new thin rectangle.
Hit the Rounded Rectangle Tool and draw a tiny yellow rounded rectangle on the left side of the thin rectangle. Add one more rounded rectangle over it, which should be darker.
Select the two yellow rounded rectangles and, while holding the Shift and Alt buttons, move the rounded rectangles to the right.
Then, add two blue circles as shown in the image below. If you want to have an even circle, hold down the Shift key while creating it.
Step 2
Now we are going to create the handle of the suitcase. Delete the fill color and set the stroke color shown below. Draw a rounded rectangle.
Grab the Scissors Tool (C) and click on the marked places. You just cut off the upper part of the rounded rectangle. Delete the upper part because you don’t need it. This will be the handle.
Place the handle on the suitcase. Feel free to adjust the size of the handle.
Step 3
Place the woman on the first suitcase.
Step 4
Create another blue rectangle for the second suitcase. It has to be bigger than the first one.
Now you need to switch on the Smart Guides (View > Smart Guides). Set the yellow fill color shown below and hit the Ellipse Tool (L). After that, while holding down the Alt key, start to create a circle exactly on the corner of the rectangle. The Alt key will help you to draw it from the center of this circle, and the Smart Guides will help you to draw the circle exactly on the corner of the rectangle.
After you’ve created one circle, using the Selection Tool (L) and while holding down the Shift and Alt keys, move this circle to the right, on the right corner of the rectangle. Then, move them to the two bottom corners of the rectangle.
Now we will use the rectangle to cut off the unnecessary parts, which are the ones not touching the rectangle. So create a new copy of the rectangle in front (Control-C, Control-F). You now have two rectangles in front of each other, but we want the second rectangle to be in front of the circles. While keeping the second rectangle selected, cut it (Control-X), and place it in front of everything (Control-F). Select it with all four circles. While keeping the five shapes (rectangle and four circles) selected, press the Intersect button on the Pathfinder panel (Window > Pathfinder).
Step 5
Using the same technique as for the handle of the first suitcase, create another handle for the second one using the Scissors Tool (C). Note the color and shape difference.
Step 6
Make a thin, dark rectangle in front of the second suitcase as you did for the first one. Add two small yellow circles as shown below.
Delete the fill color and set a white stroke color. Take the Line Segment Tool (/) and draw two lines as shown in the image below.
Finally, place the handle you created for the second suitcase on it.
Add the second suitcase to the image.
Step 7
Before we start to create the third suitcase, let’s create one little detail: a keyhole. Start with a yellow rectangle. You can use the Eyedropper Tool (I) to take the yellow color you used before in this tutorial.
Add another rectangle at the bottom of the first one. Select the two of them and press the Unite button on the Pathfinder panel. You’ve got one shape from two.
After that, take the Delete Anchor Point Tool (-) and delete the anchor points marked in the image below. You’ve got a trapeze shape.
Add a circle on top of the previous shape. And the keyhole is done!
Step 8
Let’s start to create the third suitcase. Create two rectangles: one dark blue, and a second thin one in an even darker blue shade.
Add a rounded rectangle.
Add the keyhole on the rounded rectangle.
While holding down the Shift and Alt buttons, move the rounded rectangle and the keyhole to the right. Add two tiny circles for even more detail.
Create a copy of the previous handle and place it on the third suitcase. You do not need to change the color of this one. It’s done!
Place the third suitcase under the second one.
4. How to Create the Anchors and Background
Step 1
We are going to create the anchor. Delete the fill color and set the stroke color shown below. Draw a circle.
Add a vertical line using the Line Segment Tool (/). Add a small horizontal line to give your anchor more detail.
Make a copy of one of the previous suitcase handles and change its stroke color. Place it as shown below.
Step 2
Draw a square. Just as you used the Shift button to create an even circle, you need to use it while creating a square too.
Rotate it 45 degrees. While the square is selected, hit the Selection Tool (V) and, while holding down the Shift button, start to rotate. The Shift helps you to rotate it exactly 45 degrees.
Using the Scissors Tool (C), cut off the upper part of the square to get a v-shape.
Step 3
Place the v-shape on the bottom of the previously created shapes to get the anchor.
Make one more copy of the v-shape and place it as shown. Create another copy of the v-shape and place it on the other end, forming the anchor.
Step 4
Create a copy of the anchor and change its color to red.
Place the anchors on the suitcases.
Step 5
For the background, create a blue square with 850 px Width and Height, by using the Rectangle Tool (M). First, take the tool, and then click on your artboard and enter the necessary options.
Place the background behind (Control-X, Control-B) everything you created before, creating a summer-themed image.
Step 6
To make this image even more appealing and summery, you can add some tropical leaves, which you can learn how to create in one of my previous tutorials.
Congratulations on finishing this tutorial and creating an image. And again, for more inspiration, art, ideas, and much more, check out GraphicRiver. They really have a river of images! I’m sure yours is ready to be presented to all the people!
Hopefully you enjoyed this tutorial and learned something new. As you can see, it is very easy to create images in Adobe Illustrator.
If you’re looking for more manageable ways to create bar graphs, or in search of use cases to practice CSS Grid layout, I got you!
Before we begin working on the graph, I want to talk about coding the bars, when Grid is a good approach for graphs, and we’ll also cover some code choices you might consider before getting started.
Preface
The bar is a pretty basic shape: you can control its dimensions with CSS width, height, number of grid or table cells, etc. depending on how you’ve coded it. As far as graphs go, the main thing we want to control is the height of the bars in the graph.
Controlling height with Grid cells (like here) is convenient for designs where the height is incremental by a fixed value — no in-betweens. For example, signal bars in phones or when you don’t mind setting a lot of grid rows to better control the bar height down to its smallest value, like IRL graph paper.
For my graph, I want gradient bars as well as vertical and horizontal axes labels. So, to make it easy, I have decided to control the bar height with gradient sizing, and determine the number of grid rows based on the number of vertical axis labels I want.
Also, other than the contents for the graph — bars, axes labels, and captions — there’ll be no data present in the HTML, like data about bar colors and dimensions.
data-* attributes are used to provide that sort of information in HTML. But I didn’t want to switch back and forth between HTML and CSS while coding, and decided to completely separate the content from the design. It’s totally up to you. If you feel like using data-* might benefit your project, go for it.
I’ve created a diagram below that you might find useful to refer to while reading the code. It depicts the graph and the grid that contains it. The numbers represent grid lines.
Let’s code this thing.
The HTML
Grid can automatically place items in top-bottom and left-right directions. To take advantage of that, I’m going to add the graph contents in the order y-axis labels (top-bottom), bars, and x-axis labels (left-right). This way, I only need to write the HTML markup and the CSS will place the bars for me!
<figure aria-hidden="true">
<div class="graph">
<span class="graphRowLabel">100</span>
<span class="graphRowLabel">90</span>
<span class="graphRowLabel">80</span>
<span class="graphRowLabel">70</span>
<span class="graphRowLabel">60</span>
<span class="graphRowLabel">50</span>
<span class="graphRowLabel">40</span>
<span class="graphRowLabel">30</span>
<span class="graphRowLabel">20</span>
<span class="graphRowLabel">10</span>
<div class="graphBar"></div>
<div class="graphBar"></div>
<div class="graphBar"></div>
<div class="graphBar"></div>
<div class="graphBar"></div>
<span><sup>Y </sup>⁄<sub> X</sub></span>
<span class="graphColumnLabel">😊</span>
<span class="graphColumnLabel">😄</span>
<span class="graphColumnLabel">☺️</span>
<span class="graphColumnLabel">😁</span>
<span class="graphColumnLabel">😀</span>
</div>
<figcaption>Made with CSS Grid 💛</figcaption>
</figure>
<span class="screenreader-text">Smiling face with squinting eyes: 10%, grinning face with squinting eyes: 65%, smiling face: 52%, grinning face with smiling eyes: 100%, and grinning face: 92%.</span>
Note: If you’re interested in accessibility, know that I’m not an accessibility expert. But when I tried to make the bars accessible, screen reader experience simply sucked. Using aria-labelledby wasn’t that good either. So, I added a text description of the graph and hid it from the visual display. That made the reading much more natural.
We’ve defined eleven rows and six columns in our grid with these two little lines of CSS: ten automatically sized rows and one sized to its „maximum content”; one column sized to its „maximum content” and five automatically sized. CSS Grid is a beautiful thing.
The graph bars need to cover the grid from the first row to the second-to-last row since we are using the last one for the x-axis labels. I gave the bars 100% height, and grid-row: 1 / -2; which means „span the items from first horizontal grid line till the second last.”
The bars also have linear gradient going upwards. The size of the colored portion of the gradient is the indicator of bar’s height, which in turn is taken from each bar’s own CSS rule as a custom variable.
/* A grid item */
.graphBar{
/* Same as before */
background: palegoldenrod linear-gradient(to top, gold var(--h), transparent var(--h));
}
To control the width of the bars and the space between them, I use a fixed width and centered them with justify-self: center;. You can instead use grid-column-gap to create gaps between columns if you want. Here’ the full code that pulls everything for the bars together:
Did you notice the CSS variable (var(--h)) in there? We need to specify the exact height of each bar and we can use the variable to determine the height of the background gradient in terms of percentage:
There are a few demo-specific styles in here but everything we’ve covered so far will get you the basic framework for a bar graph. The y-axis labels I created are positioned on top of the grid lines for a slightly cleaner layout. I got the cylindrical shape and the cross-section edges of the bars by using border-radius and elliptic pseudo elements, respectively. Without them, you’ll get a straight up rectangular bar.
In this Motionographer Guest Post, meet Holdframe, a new platform for the animation and motion design community to share, learn, and support their fellow artists.