Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
August 15, 2019 01:53 pm GMT

Flexbox Cheat Sheets

In our first CSS episode, we discussed the foundations. In this special bonus episode, we continued the conversation by covering some more in-depth areas of CSS, like layouts with Grid and Flexbox, animations, media queries, naming conventions, pre-processors, and frameworks.

Here are some Flexbox cheat sheets to go along with the episode!

Shoutout to Emma for making these!

.ltag__user__id__123155 .follow-action-button { background-color: #FFFFFF !important; color: #9878FF !important; border-color: #9878FF !important; }
emmawedekind image

Align Items

align-items: 4 different graphics showing the values align-items can take. flex-start has all the items at the top of the container. flex-end has all the items at the bottom of the container. center has all the items at the vertically aligned in the container. stretch has all the items stretched vertically in the container.

Flex Direction and Flex Wrap

flex-direction: showing the row value where all items are going in a horizontal direction, row-reverse where it's also in a horizontal direction but in the opposite direction. showing the column value where all items are going in a vertical direction, column-reverse where it's also in a vertical direction but in the opposite direction.<br>flex-wrap: 3 different graphics showing the 3 potential values. nowrap where the children all stay on the same line, adapting to size of the container. wrap where the children keep their width and float onto the next line. and wrap-reverse where they wrap but going in the opposite direction.

Flex Items

Flexbox item properties order: the order in which your flex items are laid out within your flex container. Default order: 0, where all items are in the order they are in the html. Explicit order value allows you to change the order of the items in css. Flex-grow: gives your flex items the ability to grow within your container. Default flex-grow: 1, all items are the same size. Explicit flex-grow value: certain items fill the surrounding space. align-self: lets your flex items override align-items. align-self: flex-end; puts the item at the end of the flex container.

Justify Content

justify-content: 4 different graphics showing the values justify-content can take. flex-start has all the items at the left side of the container. flex-end has all the items at the right side of the container. center has all the items at the horizontally aligned in the container. space-between has all the items evenly spaced. space-around has all the items evenly spaced, with margins on the sides.

You can also check out our CSS cheat sheets here:

You can listen to the full episode wherever you listen to podcasts!


Original Link: https://dev.to/ladybug/flexbox-cheat-sheets-5h55

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To