The pixel grid in Illustrator is used to Illustrator create pixel-perfect art that looks crisp and clean. In this video you’ll begin working with text and shapes and focus on ensuring that vector artwork is crisp and clean by snapping as much artwork as we can to the pixel grid.
- [Man] In this next section, we're going to focus on working with text and shapes and formatting and all types of things. In the particular video, we're going to start by focusing on ensuring that our vector artwork is crip and clean by snapping as much artwork as we can to what's called the pixel grid. So let's start out by talking about this pixel grid thing. If you come under view, and you choose pixel preview, and then you zoom in to at least 600%, and you can see, let me go in just a little bit more. There we go, I'm at 600%.
You can see this pixel grid show up. Now the pixel grid is something we can snap artwork to. If you create a brand new document, artwork will automatically snap to the pixel grid. If you choose the web or mobile categories. So if I come under file, new, and I come up here, you're going to see mobile and web. If I choose those, artwork will snap. If you choose print, it will not. You need to turn it on if you decide you want to do that. A way to tell if artwork is going to snap to the pixel grid is right up here. You're going to see this little button right in the upper-right corner.
You can also go under view, and you'll see down here that we have what's called snap to pixel. Used to be a little different in previous versions, at least how all this works, the snap to pixel stuff works. It used to be in the transform panel and something you saw when you created a new document, but now we actually have it as a setting right here. So snap to pixel turned on means that content will snap edges to pixels. Now the problem we've got here, or I've got rather, let me zoom out so I can see everything. I'm going to zoom in to this first dart board over here and take a look.
I can actually see that the first artboard looks like it's lined up to the pixel grid. We want to make sure that that's actually happening. If you have artboards like we just saw with my other artboard here, let me zoom in, that's not quite aligned to the pixel grid, you want to move the artboard snap to the pixel grid so that it will start the pixel grid right at the top of the artboard. So I would choose the artboard tool in this case and just drag this up, and you'll feel it's actually snapping to pixels as I drag it. So there we go. I'll select the selection tool again. Let me zoom out and I'll zoom back in over here to this first artboard, because we're going to focus on this first artboard.
Now with that turned on, if we create new artwork it's going to snap. So come over to the rectangle tool, we'll create a rectangle that is the header. So if you start up in the upper left corner, you'll see the smart guides are kicking here and saying, intersect. Click and drag and you're going to see that I missed it just a little bit here, but if you notice, I'm going to zoom in further, the edges of this object look nice and crisp, and if I take the selection tool and I drag it, you'll notice that it's actually going to snap to the pixel grid. So I can see that I can get it right in alignment. Alright, I'm going to zoom out here so you can see everything, and make sure that this object is all the way across, so why don't you drag it all the way across and snap to the right edge.
What I also want to do is I want to make sure our header is about 50 pixels tall, so if you drag the bottom you'll see the smart guides kicking in, which is great. That means that under view, smart guides are turned on. That little measurement label I just saw is helping me to figure out how big things are. You can also take existing artwork and snap it to the pixel grid too. First of all, let's change the color of this quickly. We're going to talk about color a little bit later, but for right now, come to the fill and let's just fill it with the light gray so we can see it. And then remove the stroke. There's 50 ways to remove the stroke.
If you just keep clicking down here, you'll remove it. It'll eventually go to zero. Open up the icons.ai file and I got a series of icons here that we're going to work with. I'm going to actually grab the person and the logo over here. So I'm going to select this one, shift click on that one. Just copy and paste them over into the other file. Make it a little bit easier here, so I'll paste them over here and they're pretty big, I know. We're going to go in and we're going to kind of change the sizing here, but this person right here, we're going to use as a way to show somebody's profile, for instance.
I just to rescale that, or resize that. So shift key, opt key or shift, alt. Well actually, let me scale from the center. And then zoom into that. I'm going to zoom in pretty far and you're going to notice, if you look, this is existing artwork and you're going to see that we got the pixel edge here. You'll see the straight lines here are not quite pixel perfect, you can see a little bit of anti-aliasing there. So with an object that's already on the artboard, if you come up top, right up here, you're going to see align selected art to pixel grid. Click and that and you'll see what it does.
It's going to make it pixel perfect as best it can. Now it's not going to take things like edges like this and align them to the pixel grid simply because they are not straight edges, right. So you can do this in a lot of different ways. One of the great things too is that if you go in and transform content, so if I switched to the direct selection tool, for instance, the white arrow. If you select anchor points like this, you can actually select individual anchor points. I'll click to select, c'mon now... And then drag, you're going to see they are going to snap to pixel grid, so things based on transformations that we do or just artwork sitting out there on the artboard is actually going to be allowed to snap to pixel grid.
Now if you go back over to the icons file that we got and select the check mark right there. And if you come up top, you're going to see, well this is set to align to pixel grid, that's great. That means that all new artwork is going to align automatically. This is existing artwork, but try clicking on line selection to pixel grid and look what it says. Selection contains art that can't be aligned to the pixel grid essentially. That's because these are angles. Things like straight, horizontal vertical lines, those will actually snap, typically to the pixel grid. We go back over to UXDesigns, we've got a lot of ways to work with the pixel grid.
You can do it either starting out, by creating new artwork, by going in and taking existing artwork, but snapping to the pixel grid is something we want to have set and something that you could, if you wanted to, toggle off if you had something you didn't want to snap to the pixel grid, for instance. I could turn this off and then later turn it back on. It won't affect the artwork that's out there. Another thing we could do is if you come under select here, you're actually going to see that we have, under object here, not align to pixel grid. You can select all artwork that is not aligned to the pixel grid, at least it thinks it's not and then you can say, okay let's align it to the pixel grid.
Once you get the hang of snapping to the pixel grid, it's really not that big of a deal. It's actually pretty easy and it becomes second nature. Now that the artwork that should be snapped to the pixel grid is, next we're going to move on to some helpful tips for editing shape appearance.
- Setting up artboards
- Using guides, grids, and snapping
- Working with text and shapes
- Creating reusable artwork
- Organizing content
- Exporting assets