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)
displaypositiontoprightbottomleftfloatclearz-index (learn about stacking context)overflowvisibilitycursorwidthmin-widthmax-widthheightmin-heightmax-heightmarginmargin-topmargin-rightmargin-bottommargin-leftpaddingpadding-toppadding-rightpadding-bottompadding-leftbackground-imagebackground-positionbackground-sizebackground-repeatbackground-originbackground-stylebackground-clipbackground-colorbackgroundborder-widthborder-colorborder-styleborderborder-radiusfont-familyfont-stylefont-variantfont-weightfont-sizefonttext-aligntext-decorationtext-indenttext-transformline-heightvertical-alignletter-spacingword-spacingwhite-spacedirectioncoloropacitylist-style-typelist-style-imagelist-style-positionlist-stylecaption-sidetable-layoutborder-collapseborder-spacingempty-cellstransformtransitionanimationcontentquotescounter-resetcounter-incrementpage-break-beforepage-break-afterpage-break-insideorphanswidowsLots 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...