Term |
Description |
CSS Classes
|
```.example-class{}``
|
backup fonts
|
font-family: lobster, monospace will cause the font to be monospace if lobster is not found
|
ID Selector
|
#idbeingselected
|
clockwise notation
|
padding:toppx, rightpx, bottompx, leftpx
|
type attribute selector
|
[type='radio']
|
class hierarchy
|
the order of the classes in the html tag is what deTermines which class has priority
|
Short hex Codes
|
only 4,000 possiblities. EX FFF0000 can be shortened to #F00
|
RGB Values
|
rgb(0,0,0)
|
:Root Element
|
Used for declaring variables in css. its a pseudo class selector. This means that variables will be available globally if they are created in the root.
|
media Queries
|
@media (max-width:350px){} defines other variables to use for mobile devices
|
Variables
declaration: --IAMVARIABLE
usage: background-color: var(--penguin-skin, fallbackvalue);
:root {
--red-color: red;
}
locally declared variables take precidence over root declared variables
Hierarchy of style declaraton
- !important
- inline style
- id
- class
- 2nd class listed
Basic CSS: Units
|unit|absolute or relative| relative to what| |px|absolute| | |in|absolute| | |mm|absolute| | |em|relative| size of elements font| |rem|relative| relative to the font size of the root element| |vw|relative| relative to 1% of the width of the viewport|
|vh|relative| relative to 1% of the height of the viewport| |vmin|relative| relative to 1% of the viewports smaller dimesion|