Skip to content

Instantly share code, notes, and snippets.

@manfromanotherland
Last active August 29, 2015 14:03
Show Gist options
  • Save manfromanotherland/0ff3f5faf43adfb0d61b to your computer and use it in GitHub Desktop.
Save manfromanotherland/0ff3f5faf43adfb0d61b to your computer and use it in GitHub Desktop.
CSS: Guidelines for good CSS, heavily based on idiomatic.css.
/* ==========================================================================
Section comment block
========================================================================== */
/* Sub-section comment block
========================================================================== */
/**
* Short description using Doxygen-style comment format
*
* The first sentence of the long description starts here and continues on this
* line for a while finally concluding here at the end of this paragraph.
*
* The long description is ideal for more detailed explanations and
* documentation. It can include example HTML, URLs, or any other information
* that is deemed necessary or useful.
*
* @tag This is a tag named 'tag'
*
* TODO: This is a todo statement that describes an atomic task to be completed
* at a later date. It wraps after 80 characters and following lines are
* indented by 2 spaces.
*/
/* Basic comment */
.selector {
/* Positioning */
position: absolute;
z-index: 10;
top: 0;
right: 0;
bottom: 0;
left: 0;
/* Display & Box Model */
float: left;
clear: left;
display: inline-block;
vertical-align: top;
overflow: hidden;
width: 100px;
height: 100px;
padding: 10px;
margin: 10px;
border: 10px solid #333;
/* Color */
color: #fff;
background: #000;
/* Text */
font-family: sans-serif;
font-size: 16px;
line-height: 1.4;
text-align: right;
/* Misc */
cursor: pointer;
opacity: 1;
visibility: visible;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment