Last active
April 10, 2020 21:51
-
-
Save ChandanMahapatra/b624325a0ce4d38ef0cd825173fdd0fd to your computer and use it in GitHub Desktop.
CSS order for properties
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
/* Just an example file to show my preferred CSS order for properties. The properties declared don't mean anything */ | |
/* Positioning */ | |
position: absolute; | |
z-index: 10; | |
top: 0; | |
/* Display and Box Model */ | |
flex: 1 1 auto; | |
display: flex; | |
flex-direction: row; | |
overflow: auto; | |
box-sizing: border-box; | |
width: 100px; | |
border: 2px solid #000; | |
margin: 4px; | |
padding: 20px; | |
/* Color */ | |
background: #fff; | |
color: #000; | |
/* Text */ | |
text-align: right; | |
font-family: sans-serif; | |
font-size: 16px; | |
line-height: 124%; | |
/* Other */ | |
cursor: pointer; | |
/* I have sometimes added overflow and z-index to Other so that they standout at the end for quick changes */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Link to Carbon