Docsity

CSS Grid Cheat sheet, Cheat Sheet of Programming Languages

Toggle sidebar
bg1
CSS Cheat sheet
Selectors
@keyframes
@keyframes myanimation {
0%{margin-left: 0px;}
50%{margin-left: 30px;}
100%{margin-left: 0px;}
}
p {
animation: myanimation 4s infinite;
}
Fonts & texts (inline)
Position
cursor
top
position
right
bottom
left
z-index
float
clear
*
div
div *
.class
#itemid
div#itemid
div.class
div span
div, span
div > span
div + span
div ~ span
a[attr]
a[attr="value"]
a[attr$="value"]
a[attr^="value"]
a[attr*="value"]
a[class~="mot"]
a[lang|="fr"]
@font-face
@font-face {
font-family: 'MaPolice';
src: url('fonts/webfontbold.woff');
font-weight: bold;
font-style: normal;
font-stretch: normal;
}
p { font-family: 'MaPolice'; }
@supports
@supports (display:flex) {
div {display: flex; }
}
@media (media queries)
Medias
all
screen
handheld
print
aural / speech
braille
embossed
projection
tty
tv
Fonctions
color
color-index
aspect-ratio
device-aspect-ratio
device-height
device-width
grid
height
monochrome
orientation
resolution
scan
width
@media screen and (min-width:800px)
{
/* Reponsive CSS */
}
Pseudo-classes & -elements
ElementsClasses
Display
block
inline
table-row-group
table-colum
table-column-group
table-header-group
table-footer-group
table
inline-table
table-row
table-cell
table-caption
list-item
inline-block
flex
grid
none
heritage top, right, bottom, left
T
Current text in a paragraph
Text
List item
List item
static, absolute, relative, fixed
content
Content (block)
overflow
clip
resize
column-width
columns
column-count
column-gap
column-span
column-rule
Display & visibility (object)
visibility
display
opacity
Print & cursor
page-break-inside
page-break-before
page-break-after
Animation (object)
transition-property
transition
transition-duration
transition-timing-function
animation-name
animation-duration
animation-iteration-count
transition-delay
transition-origin
transform
animation
Dimension (block)
width
height
min-width
max-width
min-height
max-height
border margin
T
outline-offset outline
Appearence (block)
border
outline-style
outline
outline-color
outline-width
background-color
background
background-image
background-repeat
background-position
background-attachment
background-origin
background-clip
background-size
border-radius
border-image
margin
padding
box-shadow
box-sizing
matrix, translate, rotate,
scale, skew, perspective
Flex (display:flex)
Lists
counter-increment
counter-reset
letter-spacing
vertical-align
word-spacing
word-break
word-wrap
direction
unicode-bidi
quotes
line-height
color
font-family
font
font-size
font-style
font-weight
font-variant
text-align
text-decoration
text-indent
text-shadow
text-transform
white-space
hyphens
list-style-type
list-style
list-style-image
list-style-position
Units of measurement
:lang(var)
:first-child
:nth-child(n)
:last-child
:nth-last-child(n)
:first-of-type
:nth-of-type(n)
:only-of-type
:last-of-type
:nth-last-of-type(n)
:not(selecteur)
::first-line
::first-letter
::selection
:root
:link
:visited
:hover
:active
:focus
:checked
:enabled
:disabled
:empty
:target
::before
::after
CSS Cheat sheet | v. 1.3 | dec. ‘17 | Olivier Dommange
Browser’s prefix
-webkit-
-moz-
-ms-
-o-
Chrome, Safari
Firefox
Internet Explorer
Opera
Functions
attr()
calc()
linear-gradient()
radial-gradient()
repeat()
reapeating-linear-gradient()
reapeating-radial-gradient()
rgb() | rgba()
var()
Attribute value of selector
Calculate - ex. calc(100vw-30px)
Linear gradient
Radial gradient
Reapeat values
RGB color and opacity
Variable
width
height
padding
(background)
[-style], [-color], [-width]
[-style], [-color], [-width]
flex-direction
flex-wrap
flex-flow
order
flex
Grid (display:grid | inline-grid | subgrid)
Alignements (grid & flex)
grid-template-columns
grid-template-areas
grid-template-rows
grid-gap
grid-column-gap
align-items
grid-row-gap
grid-column
grid-row
grid-area
justify-content
align-self
flex-basis
flex-shrink
flex-grow
grid
Container Item
Container Item
Ecran (fixe & relatif)
px
%
em
rem
Viewport
vw
vh
vmin
vmax
Grille
fr
pt
pc
Impression
cm
mm
in
Discount

On special offer

Partial preview of the text

Download CSS Grid Cheat sheet and more Cheat Sheet Programming Languages in PDF only on Docsity!

CSS Cheat sheet

Selectors

@keyframes

@keyframes myanimation { 0%{margin-left: 0px;} 50%{margin-left: 30px;} 100%{margin-left: 0px;} } p { animation: myanimation 4s infinite; }

Fonts & texts (inline)

Position

cursor

top

position

right

bottom

left

z-index

float

clear

div div * .class #itemid div#itemid div.class div span div, span div > span

div + span div ~ span a[attr] a[attr="value"] a[attr$="value"] a[attr^="value"] a[attr*="value"] a[class~="mot"] a[lang|="fr"]

@font-face

@font-face { font-family: 'MaPolice'; src: url('fonts/webfontbold.woff'); font-weight: bold; font-style: normal; font-stretch: normal; } p { font-family: 'MaPolice'; }

@supports

@supports (display:flex) { div {display: flex; } }

@media (media queries)

Medias all screen handheld print aural / speech

braille embossed projection tty tv Fonctions color color-index aspect-ratio device-aspect-ratio device-height device-width grid

height monochrome orientation resolution scan width

@media screen and (min-width:800px) { /* Reponsive CSS */ }

Pseudo-classes & -elements

Elements

Classes

Display

block

inline

table-row-group

table-colum

table-column-group

table-header-group

table-footer-group

table

inline-table

table-row

table-cell

table-caption

list-item

inline-block

flex

grid

none

heritage top, right, bottom, left

T

Current text in a paragraph

Text

List item List item

static, absolute, relative, fixed

content

Content (block)

overflow

clip

resize

column-width

columns

column-count

column-gap

column-span

column-rule

Display & visibility (object)

visibility

display

opacity

Print & cursor

page-break-inside

page-break-before

page-break-after

Animation (object)

transition-property

transition

transition-duration

transition-timing-function

animation-name

animation-duration

animation-iteration-count

transition-delay

transition-origin

transform

animation

Dimension (block)

width

height

min-width

max-width

min-height

max-height

border margin

T

outline-offset outline

Appearence (block)

border

outline-style

outline

outline-color

outline-width

background-color

background

background-image

background-repeat

background-position

background-attachment

background-origin

background-clip

background-size

border-radius

border-image

margin

padding

box-shadow

box-sizing

matrix, translate, rotate, scale, skew, perspective

Flex (display:flex)

Lists

counter-increment

counter-reset

letter-spacing

vertical-align

word-spacing

word-break

word-wrap

direction

unicode-bidi

quotes

line-height

color

font-family

font

font-size

font-style

font-weight

font-variant

text-align

text-decoration

text-indent

text-shadow

text-transform

white-space

hyphens

list-style-type

list-style

list-style-image

list-style-position

Units of measurement

:lang(var) :first-child :nth-child(n) :last-child :nth-last-child(n) :first-of-type :nth-of-type(n) :only-of-type :last-of-type :nth-last-of-type(n) :not(selecteur) ::first-line ::first-letter ::selection

:root :link :visited :hover :active :focus :checked :enabled :disabled :empty :target ::before ::after

CSS Cheat sheet | v. 1.3 | dec. ‘17 | Olivier Dommange

Browser’s prefix

-webkit- -moz- -ms- -o-

Chrome, Safari Firefox Internet Explorer Opera

Functions

attr()

calc()

linear-gradient()

radial-gradient()

repeat()

reapeating-linear-gradient()

reapeating-radial-gradient()

rgb() | rgba()

var()

Attribute value of selector Calculate - ex. calc(100vw-30px) Linear gradient Radial gradient Reapeat values

RGB color and opacity Variable

width

height padding

(background)

[-style], [-color], [-width]

[-style], [-color], [-width]

flex-direction

flex-wrap

flex-flow

order

flex

Grid (display:grid | inline-grid | subgrid)

Alignements (grid & flex)

grid-template-columns

grid-template-areas

grid-template-rows

grid-gap

grid-column-gap

align-items

grid-row-gap

grid-column

grid-row

grid-area

justify-content

align-self

flex-basis

flex-shrink

flex-grow

grid

Container Item

Container Item

Ecran (fixe & relatif) px % em rem

Viewport vw vh vmin vmax Grille fr

pt pc

Impression cm mm in