Cascading Style Sheets Cheatsheet


The Font Settings

Default Text

Font Family sets the font of the text, and creates backup fonts incase the first one fails.

Font Variant: Small Cap

Font Style:Italic

Font Style Oblique

Font Weight: 100-900. Lower Number is thinner. Default is 400. Bold is 700

Font Size: can be large, a px value, a percent value, or a em value.

Font is shorthand for all of the properties and fonts.


The Color Settings

Default

Color: Can be passed as a named color, rgb(), #hexadecimal, hsl (), hwb(). All use commas inside of ().

Bakcground Color

Background Image

There are background-repeat and background-attachment css attributes that will change how images repeat across the screen.

Background is the shorthand option of all of the properties of background.


Text Properties

Default Text

Word Spacing: Used to change the distance between words. Measured in the same measurments as font size

Letter Spacing

Text Decoration

Text-align: Right, Left, Center, Justify

Text-Indent: Lorem ipsum dolor sit amet consectetur, adipisicing elit. Facilis sed consequuntur et tempora iusto eaque quas porro, sint ipsam autem ratione, nesciunt error provident consequatur fugiat blanditiis ipsum commodi sit.

Line Height: Lorem ipsum dolor sit amet consectetur adipisicing elit. Deleniti sapiente, ratione nostrum non quam dolorem nemo fugit harum dolore veniam sint incidunt consequatur. Consequatur quae ipsa ipsum ea molestias! Dicta?

Text Shadow: Uses 3 values and a color. First is for X, Second is for Y, 3rd is for blur radius.


Box Properties

CSS Box Model Content: Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo eligendi nisi porro laboriosam impedit libero, commodi mollitia ad fuga neque animi soluta dolore voluptatem dicta quod blanditiis eveniet sequi officia.