Skip to content

Instantly share code, notes, and snippets.

View asha23's full-sized avatar
🎩
Working from home

Ash Whiting asha23

🎩
Working from home
View GitHub Profile
@asha23
asha23 / Bootstrap Carousel
Created December 11, 2013 12:49
Bootstrap carousel standalone (with jquery fallback animations for bloody IE)
.clear_margin_padding() {
margin: 0 !important;
padding: 0 !important;
padding-left: 0px !important;
padding-right: 0px !important;
}
.rounded-corners (@radius: 5px) {
border-radius: @radius;
-webkit-border-radius: @radius;
@asha23
asha23 / Rounded corners Less Mixin
Last active August 29, 2015 13:56
Rounded corners
/* Mixin */
.border-radius (@radius: 5px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
/* Mixin */
.border-radius-custom (@topleft: 5px, @topright: 5px, @bottomleft: 5px, @bottomright: 5px) {
-webkit-border-radius: @topleft @topright @bottomright @bottomleft;
/* Mixin */
.box-shadow (@x: 0px, @y: 3px, @blur: 5px, @alpha: 0.5) {
-webkit-box-shadow: @x @y @blur rgba(0, 0, 0, @alpha);
-moz-box-shadow: @x @y @blur rgba(0, 0, 0, @alpha);
box-shadow: @x @y @blur rgba(0, 0, 0, @alpha);
}
/* Implementation */
#somediv {
.box-shadow(5px, 5px, 6px, 0.3);
/* Mixin */
.transition (@prop: all, @time: 1s, @ease: linear) {
-webkit-transition: @prop @time @ease;
-moz-transition: @prop @time @ease;
-o-transition: @prop @time @ease;
-ms-transition: @prop @time @ease;
transition: @prop @time @ease;
}
/* Implementation */
/* Mixin */
.transform (@rotate: 90deg, @scale: 1, @skew: 1deg, @translate: 10px) {
-webkit-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
-moz-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
-o-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
-ms-transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
transform: rotate(@rotate) scale(@scale) skew(@skew) translate(@translate);
}
/* Implementation */
@asha23
asha23 / livechat.html
Created February 13, 2014 14:33 — forked from soe/livechat.html
<html>
<body>
<!-- live chat button -->
<a id="liveagent_button_online_573i00000004DD7" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('573i00000004DD7')">
Online Chat
</a>
<div id="liveagent_button_offline_573i00000004DD7" style="display: none;">
Offline Chat
</div>
@asha23
asha23 / Responsive Email Example
Created April 29, 2014 09:25
Not mobile first
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
/* Non-mobile first */
@media screen and (max-width: 480px) {
@asha23
asha23 / Single column responsive email
Created April 29, 2014 09:27
This is mobile-first, single column with hacks for Apple Mail, Lotus Notes, etc
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@asha23
asha23 / Force IE7 compatibility mode
Created April 29, 2014 10:26
This can be useful sometimes when IE8 is being an arse.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />