Skip to content

Instantly share code, notes, and snippets.

View robert-neacsu's full-sized avatar
🏠
Working from home

Robert Neacsu robert-neacsu

🏠
Working from home
View GitHub Profile
@npostulart
npostulart / rem-attributes.scss
Last active November 7, 2017 20:08
REM Mixin for CSS Attributes
// ----
// Sass (v3.3.14)
// ----
@function parseInt($n) {
@return $n / ($n * 0 + 1);
}
@mixin rem($property, $values) {
$px : ();
(function($, window, undefined) {
var InfiniteScroll = function() {
this.initialize = function() {
this.setupEvents();
};
this.setupEvents = function() {
$(window).on(
'scroll',
this.handleScroll.bind(this)
@npostulart
npostulart / simple_breakpoint.scss
Last active November 7, 2017 20:06
Simple Breakpoints Mixin
/// Simple Breakpoint Mixin
///
/// Takes list of arguments to define media queries
///
/// @author Niklas Postulart
/// @group layout
/// @param {Lists} $lists - Lists of queries
/// @example
/// .example {
/// @include breakpoint(min 100px, max 30rem) {
@ScottPolhemus
ScottPolhemus / mixins.less
Last active August 12, 2018 20:17
A collection of LESS mixins.
//
// LESS Utility Mixins
// -------------------
// Fill the parent element
.fill(@spacing: 0) {
position: absolute;
top: @spacing; bottom: @spacing;
left: @spacing; right: @spacing;
}
@snowman-repos
snowman-repos / gist:3825198
Created October 3, 2012 05:28
JavaScript: Detect Orientation Change on Mobile Devices
// Listen for orientation changes
window.addEventListener("orientationchange", function() {
// Announce the new orientation number
alert(window.orientation);
}, false);
// Listen for resize changes
window.addEventListener("resize", function() {
// Get screen size (inner/outerWidth, inner/outerHeight)