"Fail faster"
Front-end web engineer & designer
- London (United Kingdom) & Madrid (Spain)
- https://www.danielvivar.com/
- @jdvivar
Pinned Loading
-
eleventy-plugin-add-web-component-definitions
eleventy-plugin-add-web-component-definitions PublicThis Eleventy plugin will add Web Component definitions automatically by reading custom tags from HTML pages.
-
-
-
Improved pixel anchor observer from
Improved pixel anchor observer from 1// Res.: https://css-tricks.com/styling-based-on-scroll-position/
23let anchor = document.getElementById('pixel-anchor')
45if (!anchor) {
-
Add style rules inside Web Components
Add style rules inside Web Components 1// target is a web component with an open ShadowDOM
2const target = document.querySelector(...)
3target.shadowRoot.styleSheets[0].insertRule(`
4selector {
5padding: 8px;
-
Find all anchor URLs (including in w...
Find all anchor URLs (including in web components' shadow root nodes) 1function recursiveFindAnchors(node) {
2if (!node) return []
34// Find anchors URLs
5const bareAnchorURLs = [...node.querySelectorAll('a')].map(anchor => formatHref(anchor.href))
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.