How to make things look pretty.
Before we dive in, let's talk about pseudo-elements.
Pseudo-elements let you inject elements into your markup from your stylesheet.
<p>Hello, world!</p>
See the Pen CSS Power-ups - Examples - Pseudo-elements by Matt Swensen (@mjswensen) on CodePen.
These are the types of pseudo-elements:
::before
::after
::first-letter
::first-line
::selection
::backdrop
(Review from last week)
display
position
top
right
bottom
left
float
clear
z-index
(learn about stacking context)overflow
visibility
cursor
width
min-width
max-width
height
min-height
max-height
margin
margin-top
margin-right
margin-bottom
margin-left
padding
padding-top
padding-right
padding-bottom
padding-left
background-image
background-position
background-size
background-repeat
background-origin
background-style
background-clip
background-color
background
border-width
border-color
border-style
border
border-radius
font-family
font-style
font-variant
font-weight
font-size
font
text-align
text-decoration
text-indent
text-transform
line-height
vertical-align
letter-spacing
word-spacing
white-space
direction
color
opacity
list-style-type
list-style-image
list-style-position
list-style
caption-side
table-layout
border-collapse
border-spacing
empty-cells
transform
transition
animation
content
quotes
counter-reset
counter-increment
page-break-before
page-break-after
page-break-inside
orphans
widows
Lots more...
Step 1: CSS specifications are developed by the World Wide Web Consortium (the W3C).
Step 2: Browser creators (Microsoft, Google, Mozilla) can choose to implement support for the specifications in their browsers.
Step 3: Web developers can use those features in their web pages.
Sometimes browser vendors implement support for a feature before it becomes a W3C Recommendation.
ul {
-moz-columns: 2; /* for Firefox */
-webkit-columns: 2; /* for Chrome, Safari */
columns: 2; /* future-proofing */
}
To determine when vendor prefixing is necessary, I use caniuse.com.
Time for the big coding challenge...