Skip to content

Instantly share code, notes, and snippets.

View vladyn's full-sized avatar

Vladimir Varbanov vladyn

View GitHub Profile
@vladyn
vladyn / gist:1994593
Created March 7, 2012 17:39
LESS: Useful Mixins
.text-shadow (@string: 0 1px 3px rgba(0, 0, 0, 0.25)) {
text-shadow: @string;
}
.box-shadow (@string) {
-webkit-box-shadow: @string;
-moz-box-shadow: @string;
box-shadow: @string;
}
.drop-shadow (@x: 0, @y: 1px, @blur: 2px, @spread: 0, @alpha: 0.25) {
-webkit-box-shadow: @x @y @blur @spread rgba(0, 0, 0, @alpha);
var arr = ["one", "two", "three"];
var randomIndex = Math.floor( Math.random() * arr.length );
@vladyn
vladyn / dabblet.css
Created July 29, 2013 08:22 — forked from LeaVerou/dabblet.css
Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
/**
* Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
* Caveat: Not DRY. The content needs to be repeated in a data- attribute (or directly in the CSS).
*/
body {
background: #ccc51c;
min-height: 100%;
}
@vladyn
vladyn / mapStateToProps.js
Created October 2, 2019 19:13
mapStateToProps
const mapStateToProps = (state => {
const selector = formValueSelector('myForm');
return {
time: selector(state, 'select-name'), // undefined
l10n: l10nService,
formValues: getFormValues('myForm')(state), // undefined
};
});
@vladyn
vladyn / SassMeister-input.scss
Created December 7, 2019 12:16 — forked from dinocarl/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
@mixin icon ($name, $code) {
$withslash: "\"\\#{$code}\"";
.#{$name}:before {
content: unquote($withslash);
}