- All Autocomplete
- Bower
- Editor Config
- Emmet
- Grunt
- Image2Base64
- LESS
This file contains 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
/** | |
* Pseudo-elements for select | |
*/ | |
select { | |
-webkit-appearance: none; | |
} | |
select:after { | |
content: 'abc'; |
This file contains 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
@main-font-size: 16px; | |
.x-rem (@property, @value) { | |
// This is a workaround, inspired by https://github.com/borodean/less-properties | |
@px-fallback: @value * @main-font-size; | |
-: ~`(function () { return ';@{property}: @{px-fallback}'; }())`; | |
-: ~`(function () { return ';@{property}: @{value}rem'; }())`; | |
} |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Whitespace is important</title> | |
</head> | |
<body> | |
<div class="wrapper"> |
This file contains 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
/** | |
* Testing @supports | |
*/ | |
body { | |
background: red; | |
} | |
@supports (box-shadow: 2px 2px 2px black) { | |
body { |
This file contains 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
// Testable Custom Hooks | |
import { useEffect } from "react"; | |
// Function that can be tested with clear API, easily unit-testable | |
const handleHasLoader = ({ isLoading, hasFocus, setHasLoader }) => { | |
if (isLoading && !hasFocus) { | |
return setHasLoader(true); | |
} | |
return setHasLoader(false); |
This file contains 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
// This is an exisiting React Component written as a Function Component using JavaScript. | |
import React from "react"; | |
import { string, any } from "prop-types"; | |
const Card = ({ | |
headline, | |
createdAt, | |
children, | |
}) => { |
This file contains 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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"lib": [ | |
"dom", | |
"dom.iterable", | |
"esnext" | |
], | |
"allowJs": true, | |
"noImplicitAny": false, |
NewerOlder