czar85e
2/4/2014 - 12:29 AM

CSS Helpers

CSS Helpers

.float-left /* Or whatever name you like */ {
    float: left;
}
 
.float-right /* Or whatever name you like */ {
    float: right;
}
.hide {
    display: none;
}
 
.show {
    display: block;
}
.content {
    font: 1em/1.4 Segoe, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
 
.title {
    font: 1.7em/1.2 Baskerville, "Baskerville old face", "Hoefler Text", Garamond, "Times New Roman", serif;
}
 
.code {
    font: 0.8em/1.6 Monaco, Mono-Space, monospace;
}

.disabled {
    pointer-events: none;
    opacity: 0.5;
}

/** Zebra */
table tr:nth-child(even) {
    background: rgba(0,0,0,0.1);
}

.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}
 
.clearfix:after {
    clear: both;
}
 
/* IE6/7 support */
.clearfix {
    *zoom: 1;
}

.break {
    -ms-word-break: break-all;
    word-break: break-all;
 
    word-break: break-word;
 
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}
 
.ellipsis {
    width: 250px;
    white-space: nowrap;
    overflow: hidden;
    -ms-text-overflow: ellipsis; /* Required for IE8 */
    -o-text-overflow: ellipsis; /* Required for Opera */
    text-overflow: ellipsis;
}

pre {
    white-space: pre-wrap;       /* Chrome & Safari */
    white-space: -moz-pre-wrap;  /* Mozilla since 1999 */
    white-space: -pre-wrap;      /* Opera 4-6 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    word-wrap: break-word;       /* Internet Explorer 5.5+ */
}

.transition(@string: all 0.3s ease-out) {
    -webkit-transition: @string;
    -moz-transition:    @string;
    -ms-transition:     @string;
    -o-transition:      @string;
    transition:         @string;
}

.rotate(@deg) {
    -webkit-transform:  rotate(@deg);
    -moz-transform:     rotate(@deg);
    -ms-transform:      rotate(@deg);
    -o-transform:       rotate(@deg);
    transform:          rotate(@deg);
}
 
.scale(@factor) {
    -webkit-transform:  scale(@factor);
    -moz-transform:     scale(@factor);
    -ms-transform:      scale(@factor);
    -o-transform:       scale(@factor);
    transform:          scale(@factor);
}
 
.translate (@x, @y) {
    -webkit-transform:  translate(@x, @y);
    -moz-transform:     translate(@x, @y);
    -ms-transform:      translate(@x, @y);
    -o-transform:       translate(@x, @y);
    transform:          translate(@x, @y);
}