Skip to content

Instantly share code, notes, and snippets.

@ChandanMahapatra
Last active April 10, 2020 21:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChandanMahapatra/b624325a0ce4d38ef0cd825173fdd0fd to your computer and use it in GitHub Desktop.
Save ChandanMahapatra/b624325a0ce4d38ef0cd825173fdd0fd to your computer and use it in GitHub Desktop.
CSS order for properties
/* 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 */
@ChandanMahapatra
Copy link
Author

ChandanMahapatra commented Apr 10, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment