Skip to content

Instantly share code, notes, and snippets.

@willianis4w
willianis4w / cssfirefox.sublime-snippet
Last active December 24, 2015 23:59
Sublime snippet for style only in firefox
<snippet>
<content><![CDATA[
@-moz-document url-prefix() {
${1:}
}
]]></content>
<tabTrigger>cssfirefox</tabTrigger>
</snippet>
@willianis4w
willianis4w / floating_text.css
Created September 25, 2013 16:52
Texto completando o espaço de uma div sem tamanho definido. Pen: http://codepen.io/willianis4w/pen/pLyoH
.container {
width: 100%;
display: table;
backgroun: red;
}
.fixed {
background: #333;
width: 200px; /* whatever */
height: 300px;
@willianis4w
willianis4w / cencer_text.css
Created September 17, 2013 14:50
Centralizar um texto em uma div. Ex.: http://codepen.io/anon/pen/zosyu
div {
border: solid 1px #000;
display: table;
height: 300px;
text-align: center;
width: 300px;
}
p {
display: table-cell;
@willianis4w
willianis4w / selection.scss
Created September 11, 2013 17:48
Mixin para selection
@mixin selection {
::-moz-selection { @content; }
::-webkit-selection { @content; }
::selection { @content; }
}
/**********
Ex.:
@willianis4w
willianis4w / progress-bar.html
Last active December 22, 2015 11:39
Progress bar with CSS ( SASS )
<div class="progress-bar">
<span style="width: 50%">
5h
</span>
</div>
/ 10h
@willianis4w
willianis4w / triangulo.css
Last active December 22, 2015 08:28
Triângulos com CSS
div {
width: 0;
height: 0;
border: 10px solid transparent;
border-top-color: red;
}
@willianis4w
willianis4w / clearfix.css
Last active December 22, 2015 08:29
CSS Clearfix. Utilize em um container que tenha elementos float dentro.
.clearfix:before, .clearfix:after {
content: "\0020";
display: block;
height: 0;
overflow: hidden;
}
.clearfix:after {
clear: both;
}
@willianis4w
willianis4w / center_element.css
Last active December 21, 2015 08:59
Centralizar um elemento dentro de outro
div {
width: 100px;
height: 100px;
position: relative;
}
img {
max-width: 100px;
max-height: 100px;
position: absolute;