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
| // https://wicg.github.io/IntersectionObserver/#intersection-observer-private-slots | |
| /* | |
| callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer) | |
| [Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options), | |
| Exposed=Window] | |
| interface IntersectionObserver { | |
| readonly attribute Element? root; | |
| readonly attribute DOMString rootMargin; |
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
| /* -------------------------------------------------------------------------- */ | |
| // All Bootstrap 4 Sass Mixins [Cheat sheet] | |
| // Updated to Bootstrap v4.5.x | |
| // @author https://anschaef.de | |
| // @see https://github.com/twbs/bootstrap/tree/master/scss/mixins | |
| /* -------------------------------------------------------------------------- */ | |
| /* | |
| // ########################################################################## */ | |
| // New cheat sheet for Bootstrap 5: |
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
| Moved to https://github.com/ebidel/puppeteer-examples |
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
| // Tracking cursor position in real-time without JavaScript | |
| // Demo: https://twitter.com/davywtf/status/1124146339259002881 | |
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "strings" | |
| ) |
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
| const Heading = (props: Props) => { | |
| const ref = useRef<HTMLHeadingElement>(); | |
| const ScrollSpy = useContext(ScrollSpyContext); | |
| if ( | |
| ref.current && | |
| ["H1", "H2", "H3"].indexOf(ref.current.tagName) >= 0 | |
| ) { | |
| value?.observer!.observe(ref.current); | |
| } |
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
| import { h } from "@stencil/core"; | |
| import { IUser } from "../interfaces/user.interface"; | |
| export const UserAvatar = ({ user, size = 36 }: {user: IUser, size: number}) => { | |
| const {name, luminosity, name} = user; | |
| const [r, g, b] = themeColor | |
| return ( | |
| <svg | |
| xmlns="http://www.w3.org/2000/svg" | |
| viewBox="0 0 100 100" |
OlderNewer