This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Muchos desarrolladores se olvidan de la etiqueta HTML cuando tratan de dar estilo a su aplicación, pero dar estilo a la etiqueta HTML puede ser una de las cosas más importantes. | |
Este fragmento de código CSS se asegura de que la barra de desplazamiento siempre aparezca (por lo que no hay ningún "salto" cuando cambia el tamaño de página) e impide que los navegadores móviles ajusten el tamaño de la fuente de la página. | |
*/ | |
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } | |
/* | |
Cambiar el color de resaltado o selección |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* enlaces externos | |
^= indica que queremos dar estilo a aquellos enlaces que comiencen por http:// | |
*/ | |
a[href^="http://"]{ | |
padding-right: 20px; | |
background: url(external.gif) no-repeat center right; | |
} | |
/* emails | |
^= indica que queremos dar estilo a aquellos enlaces que comiencen con mailto: | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1 { | |
text-indent:-9999px; | |
margin:0 auto; | |
width:400px; | |
height:100px; | |
background:transparent url("images/logo.jpg") no-repeat scroll; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CSS text gradients */ | |
h2[data-text] { | |
position: relative; | |
} | |
h2[data-text]::after { | |
content: attr(data-text); | |
z-index: 10; | |
color: #e3e3e3; | |
position: absolute; | |
top: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */ | |
/** | |
* 1. Set default font family to sans-serif. | |
* 2. Prevent iOS text size adjust after orientation change, without disabling | |
* user zoom. | |
*/ | |
html { | |
font-family: sans-serif; /* 1 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media print { | |
* { | |
background: none !important; | |
color: black !important; | |
box-shadow: none !important; | |
text-shadow: none !important; | |
/* Images, vectors and such */ | |
filter: Gray(); /* IE4-8: depreciated */ | |
filter: url('desaturate.svg#grayscale'); /* SVG version for IE10, Firefox, Safari 5 and Opera */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input[type="text"] { | |
/* */ | |
} | |
input[type="submit"]{ | |
/* */ | |
} | |
input[type=button]{ | |
/* */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* SELECTORES DE ATRIBUTOS */ | |
/*info ampliada en http://www.netmagazine.com/tutorials/discover-power-css3-selectors */ | |
/* | |
elemento[atributo^="valor"]{...} | |
selecciona todos los elementos que disponen de ese atributo y cuyo valor comienza exactamente por la cadena de texto indicada. | |
Ejemplo: Selecciona todos los enlaces que apuntan a una dirección de correo electrónico | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A CSS preprocessor allows you to use variables, mixins, functions, | |
operations, nesting, importing and much more. For that concern, | |
I personally use LESS but there are also Sass or Stylus which might fit your needs. | |
Anyway, I’m only going to talk about mixins here. Mixins are like variables but for whole classes. | |
The best point of mixins is that they can behave like functions and have parameters. | |
Let’s start with something very simple: a mixin to handle all vendor prefixes whenever |