Guideline for CSS shorthand property value

There is in fact no official guideline for each CSS shorthand property value; however this may help you at some stage in your design work that we have organized collectively.

Background
background-color:#fff;
background-image:url(background.gif);
background-repeat:no-repeat;
background-position:top left;

Woh… it’s too long, take a look at this.
background:#fff url(background.gif) no-repeat top left;

Font
font-size:1em;
line-height:2em;
font-weight:bold;
font-style:italic;
font-family:arial;

Shorthand:
font:1em/2em bold italic serif;

Margin & padding
There are different shorthand properties for margin & padding.

Four different values
margin-top:10px;
margin-right:5px;
margin-bottom:15px;
margin-left:20px;

shorthand:
margin:10px 5px 15px 20px; (top, right, bottom, left)

Three different values
margin-top:10px;
margin-right:5px;
margin-bottom:15px;
margin-left:5px;

shorthand:
margin:10px 5px 15px; (top, right and left, bottom)

Two different values
margin-top:10px;
margin-right:20px;
margin-bottom:10px;
margin-left:20px;

shorthand:
margin:10px 20px; (top and bottom, right and left)

One value
margin-top:10px;
margin-right:10px;
margin-bottom:10px;
margin-left:10px;

shorthand:
margin:10px; (top, bottom, right and left)

These rules also apply to padding and border.

Border
border-width:1px;
border-color:#000;
border-style:solid;

shorthand:
border:1px solid #000;

border:1px solid #f00;
border-left:5px dotted #00f;
border-top:10px dotted #00f;

shorthand:
border:1px solid #336;
border-width:10px 1px 1px 5px;
border-color:#00f #f00 #f00 #00f;

Lists
list-style:#fff;
list-style-type:none;
list-style-position:outside;
list-style-image:url(bullet.gif);

Shorthand:
list-style: none outside url(bullet.gif);

Color
color:#000000;

shorthand:
color:#000;

The values defined for RGB, if both R values are similar (00 shown in current example), then you should combine them as one (0).

Amother example

color:#00ff00;

shorthand:
color:#0f0;

check-mysql-all- Nagios plugin

The nagios plugin developed by Ryan Lowe (Percona) available on the MMM’s google-code page, here is the code;

check_mmm

Usage:
check_mmm –cluster C#

Options:
–cluster=<cluster_id>    The MMM Cluster to check
-c, –critical=<limit>    The level at which a critical alarm is raised.
-h, –help                Display this message and exit
-v, –verbose             Increase verbosity level
-V, –version             Display version information and exit
-w, –warning             The level at which a warning is raised.

Defaults are:

ATTRIBUTE                  VALUE
————————– ——————
cluster                    No default value
critical                   HARD_OFFLINE,REPLICATION_FAIL
help                       FALSE
verbose                    1 (out of 3)
version                    FALSE
warning                    ADMIN_OFFLINE,AWAITING_RECOVERY,REPLICATION_DELAY