Skip to content

Instantly share code, notes, and snippets.

@szpakoli
szpakoli / LESS
Created May 16, 2013 15:50
LESS Vendor Prefixes Mixin
.rotate(@deg: 7deg){
-webkit-transform: rotate(@deg);
-moz-transform: rotate(@deg);
-o-transform: rotate(@deg);
transform: rotate(@deg);
}
.box-shadow (@x: 0, @y: 0, @blur: 1px, @alpha) {
@val: @x @y @blur rgba(0, 0, 0, @alpha);
box-shadow: @val;
-webkit-box-shadow: @val;
// Mixins and examples
/* Responsive Breakpoints
========================================================================== */
@mixin breakpoint($point) {
@if $point == large {
@media (min-width: 64.375em) { @content; }
}
@else if $point == medium {
@media (min-width: 50em) { @content; }
$.fn.scrollView = function () {
return this.each(function () {
$('html, body').animate({
scrollTop: $(this).offset().top
}, 1000);
});
}
$('#scroll-link').click(function (event) {
@szpakoli
szpakoli / pallete
Created May 10, 2013 14:11
Tomorrow Night Color Scheme: Hex values pulled from the "Tomorrow Night" color scheme
.tomorrow-night-colors{
color: #1D1F21;
color: #AEAFAD;
color: #C5C8C6;
color: #4B4E55;
color: #282A2E;
color: #373B41;
color: #969896;
color: #CED1CF;
color: #C66;
@szpakoli
szpakoli / css
Created May 10, 2013 14:07
CSS Button Hover Transition: Generic starter template for a simple hover / slide effect
.button {
display: inline-block;
height: 60px;
line-height: 60px;
overflow: hidden;
position: relative;
text-align: center;
border: 1px solid #ddd;
padding: 0 15px;
}