Last active
February 17, 2020 12:42
-
-
Save miminas/a4ecbf364d7c5b65c1f011a8b2a35535 to your computer and use it in GitHub Desktop.
CSS properties order of declaration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Layout Properties (position, float, clear, display) | |
Box Model Properties (width, height, margin, padding) | |
Visual Properties (color, background, border, box-shadow) | |
Typography Properties (font-size, font-family, text-align, text-transform) | |
Misc Properties (cursor, overflow, z-index) | |
.selector { | |
/* Positioning */ | |
position: absolute; | |
z-index: 10; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
/* Display & Box Model */ | |
display: inline-block; | |
overflow: hidden; | |
box-sizing: border-box; | |
width: 100px; | |
height: 100px; | |
padding: 10px; | |
border: 10px solid #333; | |
margin: 10px; | |
/* Other */ | |
background: #000; | |
color: #fff; | |
font-family: sans-serif; | |
font-size: 16px; | |
text-align: right; | |
} | |
#Concentric-CSS-Complete { | |
/* All CSS properties, in roughly the order I use when being careful */ | |
display: ; | |
position: ; | |
top: ; | |
right: ; | |
bottom: ; | |
left: ; | |
float: ; | |
clear: ; | |
visibility: ; | |
opacity: ; | |
z-index: ; | |
margin: ; | |
margin-top: ; | |
margin-right: ; | |
margin-bottom: ; | |
margin-left: ; | |
outline: ; | |
border: ; | |
border-top: ; | |
border-right: ; | |
border-bottom: ; | |
border-left: ; | |
border-width: ; | |
border-top-width: ; | |
border-right-width: ; | |
border-bottom-width: ; | |
border-left-width: ; | |
border-style: ; | |
border-top-style: ; | |
border-right-style: ; | |
border-bottom-style: ; | |
border-left-style: ; | |
border-color: ; | |
border-top-color: ; | |
border-right-color: ; | |
border-bottom-color: ; | |
border-left-color: ; | |
background: ; | |
background-color: ; | |
background-image: ; | |
background-repeat: ; | |
background-position: ; | |
cursor: ; | |
padding: ; | |
padding-top: ; | |
padding-right: ; | |
padding-bottom: ; | |
padding-left: ; | |
width: ; | |
min-width: ; | |
max-width: ; | |
height: ; | |
min-height: ; | |
max-height: ; | |
overflow: ; | |
list-style: ; | |
caption-side: ; | |
table-layout: ; | |
border-collapse: ; | |
border-spacing: ; | |
empty-cells: ; | |
vertical-align: ; | |
text-align: ; | |
text-indent: ; | |
text-transform: ; | |
text-decoration: ; | |
line-height: ; | |
word-spacing: ; | |
letter-spacing: ; | |
white-space: ; | |
color: ; | |
font: ; | |
font-family: ; | |
font-size: ; | |
font-weight: ; | |
content: ; | |
quotes: ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment