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
/** | |
* This CSS block is a More Effective CSS Image Reset. | |
* It resets the default styles of an image element | |
* and adds some additional styles to improve its rendering. | |
* | |
* The `max-width: 100%;` ensures that the image does not exceed its container's width, | |
* while maintaining its aspect ratio with `height: auto;`. | |
* | |
* The `vertical-align: middle;` aligns the image vertically with the text. | |
* |
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
/** | |
* This CSS block is a More Effective CSS Image Reset. | |
* It resets the default styles of an image element | |
* and adds some additional styles to improve its rendering. | |
* | |
* The `max-width: 100%;` ensures that the image does not exceed its container's width, | |
* while maintaining its aspect ratio with `height: auto;`. | |
* | |
* The `vertical-align: middle;` aligns the image vertically with the text. | |
* |
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
/** | |
* A TypeScript type alias called `Prettify`. | |
* It takes a type as its argument and returns a new type that has the same properties as the original type, | |
* but the properties are not intersected. This means that the new type is easier to read and understand. | |
*/ | |
type Prettify<T> = { | |
[K in keyof T]: T[K]; | |
} & {}; |
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
<body> | |
<div id="⚛️"></div> | |
<script src="https://unpkg.com/[email protected]/umd/react.development.js"></script> | |
<script src="https://unpkg.com/[email protected]/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/[email protected]/babel.js"></script> | |
<script type="text/babel"> | |
ReactDOM.render(<div>Hello World!</div>, document.getElementById('⚛️')) | |
</script> | |
</body> |
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
// based on https://gist.github.com/paulirish/12fb951a8b893a454b32 | |
const $ = document.querySelector.bind(document); | |
const $$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
}; | |
NodeList.prototype.__proto__ = Array.prototype; |
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
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
} | |
NodeList.prototype.__proto__ = Array.prototype; |