- Coming soon (by Deuce standarts)
This file contains hidden or 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
// converter rgba(r, g, b, a) color to #HEX string without alpha channel, | |
// with optional applying afterwards opacity ($opacity) | |
// by default alpha channel for rgba-color is applying against white background, | |
// but you can change it by setting third argumnet ($background) | |
@function rgba-to-rgb($rgba, $opacity: 0, $background: #fff) { | |
@if $opacity > 0 { | |
@if $opacity < 1 { | |
$opacity: $opacity * 100 | |
} | |
@return mix(mix(rgb(red($rgba), green($rgba), blue($rgba)), $background, alpha($rgba) * 100%), rgb(255,255,255), $opacity) |
This file contains hidden or 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
window.addEventListener('load', function(event) { | |
var targetClassName = 'flex-wrap-anim'; | |
var defaultDuration = '0.3s'; | |
var dummyList = []; | |
function addDummy(item, duration) { | |
var top = item.offsetTop; | |
var left = item.offsetLeft; | |
setTimeout(function() { | |
item.style.position = 'absolute'; |
This file contains hidden or 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
// ==UserScript== | |
// @name Medium: remove location hash | |
// @namespace http://efcl.info/ | |
// @description Remove location hash from medium | |
// @include https://medium.com/*#* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function removeLocationHash(){ |
This file contains hidden or 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
/** | |
* Calculate the contrast of a color to determine the appropriate opposing text color. | |
* @author D. Condrey | |
* @param {string|object} - element background-color or element | |
* @return {string} | |
* white - if background is a dark shade color | |
* black - if background is a light shade color | |
*/ | |
define(function() { |