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
p – balanced for paragraphs or body copy | |
t – balanced for headlines or titles | |
Arial, “Helvetica Neue”, Helvetica, sans-serif - p, t | |
Baskerville, “Times New Roman”, Times, serif - p Baskerville, Times, “Times New Roman”, serif - t | |
Cambria, Georgia, Times, “Times New Roman”, serif - p, t | |
“Century Gothic”, “Apple Gothic”, sans-serif - p, t |
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
(function($){ | |
var touch = {}, touchTimeout; | |
function parentIfText(node){ | |
return 'tagName' in node ? node : node.parentNode; | |
} | |
function swipeDirection(x1, x2, y1, y2){ | |
var xDelta = Math.abs(x1 - x2), yDelta = Math.abs(y1 - y2); | |
if (xDelta >= yDelta) { |
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
<!DOCTYPE html> | |
<meta charset=utf-8> | |
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<meta name=apple-mobile-web-app-capable content=yes> | |
<meta name=apple-mobile-web-app-status-bar-style content=black> | |
<title>Test fullscreen</title> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 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
/** | |
* | |
* Font Staks | |
*http://sixrevisions.com/css/css-typography-01/ | |
* | |
* Wide sans serif: Verdana, Geneva | |
Narrow sans serif: Tahoma, Arial, Helvetica | |
Wide serif: Georgia, Utopia | |
Narrow serif: Times, Times New Roman | |
Monospace: Courier, Courier New, Lucida Console |
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
@main-font-size: 16px; | |
.x-rem (@property, @value) { | |
// This is a workaround, inspired by https://github.com/borodean/less-properties | |
@px-fallback: @value * @main-font-size; | |
-: ~`(function () { return ';@{property}: @{px-fallback}'; }())`; | |
-: ~`(function () { return ';@{property}: @{value}rem'; }())`; | |
} | |
.x-rem (@property, @v1, @v2) { | |
@px-v1: @v1 * @main-font-size; |
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
/* | |
No jQuery necessary. | |
Thanks to Dan's StackOverflow answer for this: | |
http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport | |
*/ | |
function isElementInViewport(el) { | |
var rect = el.getBoundingClientRect(); | |
return ( | |
rect.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
// License MIT | |
// Author: Jorge Avila <jorge.e.avila@gmail.com> | |
// Example: | |
// body | |
// -rems('margin', 10 20 30 40) | |
basefont = 16px | |
-rems(property, sizes) | |
rems = new array() | |
pixs = new array() |
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
Lib : http://www.idangero.us/sliders/swiper/ | |
ver:2.4.3 | |
<script> | |
// swiper Slider - Thumb Carousel - author: kien.hnaptech@gmail.com ========================================================== | |
$(document).ready(function(){ | |
if($(".swiper-slider-wrapper").length > 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
// Adds the vendor prefixes for calc. | |
// | |
// Usage: | |
// width: calc('30% - 10px'); | |
// If variables are needed they need to be specified this way. | |
// width: calc('40% \- %s' % (10px)); | |
calc() { | |
// vendors to be used by this function | |
calc-vendors = webkit moz; |
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
/* http://martinwolf.org/2013/01/29/pure-css-multiline-text-with-ellipsis/ */ | |
$font-size: 26px; | |
$line-height: 1.4; | |
$lines-to-show: 3; | |
h2 { | |
display: block; /* Fallback for non-webkit */ | |
display: -webkit-box; | |
max-width: 400px; |
OlderNewer