Skip to content

Instantly share code, notes, and snippets.

View A-Ostrovnyy's full-sized avatar
💭
This is the way

Alexandr A-Ostrovnyy

💭
This is the way
View GitHub Profile
@A-Ostrovnyy
A-Ostrovnyy / button.scss
Last active June 5, 2020 21:49
Some students mistakes and good parts from Kottans frontend cource 2019
// Giant unsorted class
/*
* Some sprcific rules better put in global scope
* Use comments to describe sections of class. Example: box-model, typgraphy ...
*/
&__button-input {
appearance: none;
box-sizing: content-box;
font-family: "ddg-serp-icons";
speak: none;
@A-Ostrovnyy
A-Ostrovnyy / debounce.js
Last active June 13, 2021 12:59
Helpers
function debounce(fn, ms) {
let timeout;
return function() {
const fnCall = () => fn.apply(this, arguments)
clearTimeout(timeout);
timeout = setTimeout(fnCall, ms);
}
}