CSS apuntes

Algunos apuntes de CSS, tener en cuenta al crear proyectos

/*Importar fuente*/
/*Este es el método con el apoyo más profundo posible en este momento:*/
/*Fuente: http://www.fontspring.com/blog/further-hardening-of-the-bulletproof-syntax*/
@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('webfont.woff') format('woff'), /* Modern Browsers */
       url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
 
 
-------------------------------------------------------------------------------------------------------
box-sizing: border-box;            # Si el elemento tiene cierto tamaño no aumenta al darle padding, sino que el padding aumenta por dentro
 
 
 
body {line-height: 1.5;font-size: 87.5%;word-wrap: break-word;margin: 0;padding: 0;border: 0;outline: 0;}
a:link,
a:visited {
    text-decoration: none;
}
a:hover,
a:active,
a:focus {
    text-decoration: underline;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 1.0em 0 0.5em;
    font-weight: inherit;
}
h1 {
    font-size: 1.357em;
    color: #000;
}
h2 {
    font-size: 1.143em;
}
p {
    margin: 0 0 1.2em;
}
del {
    text-decoration: line-through;
}
tr.odd {
    background-color: #dddddd;
}
img {
    outline: 0;
}
code,
pre,
kbd,
samp,
var {
    padding: 0 0.4em;
    font-size: 0.857em;
    font-family: Menlo, Consolas, "Andale Mono", "Lucida Console", "Nimbus Mono L", "DejaVu Sans Mono", monospace, "Courier New";
}
code {
    background-color: #f2f2f2;
    background-color: rgba(40, 40, 0, 0.06);
}
pre code,
pre kbd,
pre samp,
pre var,
kbd kbd,
kbd samp,
code var {
    font-size: 100%;
    background-color: transparent;
}
pre code,
pre samp,
pre var {
    padding: 0;
}
.description code {
    font-size: 1em;
}
kbd {
    background-color: #f2f2f2;
    border: 1px outset #575757;
    margin: 0 3px;
    color: #666;
    display: inline-block;
    padding: 0 6px;
    -khtml-border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
}
pre {
    background-color: #f2f2f2;
    background-color: rgba(40, 40, 0, 0.06);
    margin: 10px 0;
    overflow: hidden;
    padding: 15px;
    white-space: pre-wrap;
}
 
/* ------------------ Fonts ------------------ */
body,
#site-slogan,
.ui-widget,
.comment-form label {
    font-family: Georgia, "Times New Roman", Times, serif;
}
#header,
#footer-wrapper,
#skip-link,
ul.contextual-links,
ul.links,
ul.primary,
.item-list .pager,
div.field-type-taxonomy-term-reference,
div.messages,
div.meta,
p.comment-time,
table,
.breadcrumb {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
input,
textarea,
select,
a.button {
    font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif;
}
 
/* ------------------ Reset Styles ------------------ */
caption {
    text-align: left; /* LTR */
    font-weight: normal;
}
blockquote {
    background: #f7f7f7;
    border-left: 1px solid #bbb;
    font-style: italic;
    margin: 1.5em 10px;
    padding: 0.5em 10px;
}
blockquote:before {
    color: #bbb;
    content: "\201C";
    font-size: 3em;
    line-height: 0.1em;
    margin-right: 0.2em;
    vertical-align: -.4em;
}
blockquote:after {
    color: #bbb;
    content: "\201D";
    font-size: 3em;
    line-height: 0.1em;
    vertical-align: -.45em;
}
blockquote > p:first-child {
    display: inline;
}
a.feed-icon {
    display: inline-block;
    padding: 15px 0 0 0;
}
 
/* ------------------ Table Styles ------------------ */
table {
    border: 0;
    border-spacing: 0;
    font-size: 0.857em;
    margin: 10px 0;
    width: 100%;
}
table table {
    font-size: 1em;
}
#footer-wrapper table {
    font-size: 1em;
}
table tr th {
    background: #757575;
    background: rgba(0, 0, 0, 0.51);
    border-bottom-style: none;
}
table tr th,
table tr th a,
table tr th a:hover {
    color: #FFF;
    font-weight: bold;
}
table tbody tr th {
    vertical-align: top;
}
tr td,
tr th {
    padding: 4px 9px;
    border: 1px solid #fff;
    text-align: left; /* LTR */
}
#footer-wrapper tr td,
#footer- th{;tbody{}
    border-color: #555;
    border-color: rgba(255, 255, 255, 0.18);
}
tr.odd {
    background: #e4e4e4;
    background: rgba(0, 0, 0, 0.105);
}
tr,
tr.even {
    background: #efefef;
    background: rgba(0, 0, 0, 0.063);
}
table ul.links {
    margin: 0;
    padding: 0;
    font-size: 1em;
}
table ul.links li {
    padding: 0 1em 0 0;
}
 
/* ------------------ List Styles ------------------ */
.block ol,
.block ul {
    margin: 0;
    padding: 0 0 0.25em 1em; /* LTR */
}
.contextual-links-wrapper {
    font-size: small !important;
}
ul.contextual-links {
    font-size: 0.923em;
}
.contextual-links-wrapper a {
    text-shadow: 0 0 0 !important;
}
.item-list .pager {
    font-size: 0.929em;
}
ul.menu li {
    margin: 0;
}
.region-content ul,
.region-content ol {
    margin: 1em 0;
    padding: 0 0 0.25em 2.5em; /* LTR */
}
.item-list ul li {
    margin: 0;
    padding: 0.2em 0.5em 0 0; /* LTR */
}
ul.tips {
    padding: 0 0 0 1.25em; /* LTR */
}
 
/* -------------- Form Elements   ------------- */
fieldset {
    background: #ffffff;
    border: 1px solid #cccccc;
    margin-top: 10px;
    margin-bottom: 32px;
    padding: 0 0 10px;
    position: relative;
    top: 12px; /* Offsets the negative margin of legends */
    -khtml-border-radius: 4px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
}
.fieldset-wrapper {
    margin-top: 25px;
}
fieldset legend {
    background: #dbdbdb;
    border: 1px solid #ccc;
    border-bottom: none;
    color: #3b3b3b;
    display: block;
    height: 2em;
    left: -1px; /* LTR */
    font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif;
    line-height: 2;
    padding: 0;
    position: absolute;
    text-indent: 10px;
    text-shadow: 0 1px 0 #fff;
    top: -12px;
    width: 100%;
    -khtml-border-radius-topleft: 4px;
    -moz-border-radius-topleft: 4px;
    -webkit-border-top-left-radius: 4px;
    border-top-left-radius: 4px;
    -khtml-border-radius-topright: 4px;
    -moz-border-radius-topright: 4px;
    -webkit-border-top-right-radius: 4px;
    border-top-right-radius: 4px;
}
fieldset legend a {
    color: #3b3b3b;
}
fieldset legend a:hover,
fieldset legend a:focus,
fieldset legend a:active {
    color: #000;
}
 
input {
    margin: 2px 0;
    padding: 4px;
}
input,
textarea {
    font-size: 0.929em;
}
textarea {
    line-height: 1.5;
}
textarea.form-textarea,
select.form-select {
    padding: 4px;
}
input.form-text,
textarea.form-textarea,
select.form-select {
    border: 1px solid #ccc;
}
input.form-submit:hover,
input.form-submit:focus {
    background: #dedede;
}
 
/* Disabled form elements */
input.form-button-disabled,
input.form-button-disabled:hover,
input.form-button-disabled:focus,
input.form-button-disabled:active,
.form-disabled input,
.form-disabled select,
.form-disabled textarea {
    background: #ededed;
    border-color: #bbb;
    color: #717171;
}
.form-disabled .grippie {
    background-color: #ededed;
    border-color: #bbb;
}
.form-disabled label {
    color: #717171;
}