Skip to content

Instantly share code, notes, and snippets.

View ariona's full-sized avatar
🏠
Working from home

Rian Ariona ariona

🏠
Working from home
View GitHub Profile
@ariona
ariona / script.js
Created November 16, 2015 04:41
CSS show/hide animation
// User HoverIntent
$(".dropdown-menu .menu-item-has-children").hoverIntent(
function(){
var isMega = $(this).hasClass("mega-menu");
var sub = $(this).find("> .sub-menu");
if( isMega ){
$(sub).css("display","table");
} else {
$(sub).show();
@ariona
ariona / pxtoem-function.scss
Created November 20, 2015 07:53
Pixel to Em function for SASS
$browser-context: 16;
@function em($pixels, $context: $browser-context) {
@if (unitless($pixels)) {
$pixels: $pixels * 1px;
}
@if (unitless($context)) {
$context: $context * 1px;
}
@ariona
ariona / background-video.css
Created December 4, 2015 08:47
Minimal CSS to create background video
/*
* This method can be applied to video tag and
* can be applied to iframe video like youtube, but with some issue to be considered
*/
video{
/* Centering the video */
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
@ariona
ariona / input-placeholder.css
Last active December 4, 2015 08:52
Styling the input placeholder
/*
* If you want to style specific Input, prepend the input selector like:
*
* .control::-webkit-input-placeholder{ ... }
*
*/
::-webkit-input-placeholder {
color: red;
}
@ariona
ariona / _dynamic-navbar-height.md
Last active December 7, 2015 10:54
Dynamic Menubar Height with Flexbox

#Dynamic Menubar Height with flexbox

@ariona
ariona / _ie10.md
Last active January 25, 2016 02:48
@ariona
ariona / _click_outside.md
Created April 8, 2016 09:44
Simulate Click Outside Element

Simple plugin for detecting click outside element

@ariona
ariona / _group-search-result.md
Created April 15, 2016 15:33
Grouping wordpress search result by post types

##Grouping wordpress search result by post types

@ariona
ariona / webpack.config.js
Created April 29, 2016 07:41 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@ariona
ariona / _readme.md
Created June 14, 2016 02:19
Hiding Screen Reader Text