Skip to content

Instantly share code, notes, and snippets.

View ngstwr's full-sized avatar

Nagesh Tiwari ngstwr

View GitHub Profile
@ngstwr
ngstwr / input.scss
Created January 18, 2023 02:14
Generated by SassMeister.com.
@mixin color-weight ($class, $base-color, $weight: 4) {
$bg-color: null;
@for $i from 1 through 8 {
@if $i < 4 {
$weight: $weight - 1;
$bg-color: lighten($base-color, $weight * 10%);
} @else if $i == 4 {
$weight: 0;
$bg-color: $base-color;
@ngstwr
ngstwr / input.scss
Created November 22, 2022 10:40
Generated by SassMeister.com.
$primary: #4F00A5;
$secondary: #8b1617;
.primary {
color: darken($primary, 10%);
color: darken($primary, 15%);
color: darken($primary, 20%);
color: darken($primary, 25%);
background: none;
@ngstwr
ngstwr / localStorage.js
Last active August 29, 2015 14:26 — forked from anhang/localStorage.js
HTML5 Local Storage with Expiration
AZHU.storage = {
save : function(key, jsonData, expirationMin){
if (!Modernizr.localstorage){return false;}
var expirationMS = expirationMin * 60 * 1000;
var record = {value: JSON.stringify(jsonData), timestamp: new Date().getTime() + expirationMS}
localStorage.setItem(key, JSON.stringify(record));
return jsonData;
},
load : function(key){
if (!Modernizr.localstorage){return false;}