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
/** | |
* Basic Flex Grid | |
* ---------------- | |
* This is a simple flex grid I've been using on a lot of projects. It supports both | |
* flexible grids as well as rigid column grids. While this is currently designed for internal use | |
* (it uses flexbox mixins because our build pipeline doesn't support autoprefixer yet), it's not too difficult | |
* to use in your own projects. Simply replace the flexbox mixins with their relevant rules, and you'll be good | |
* to go. | |
* @author Gabe Rose <https://gist.github.com/roseg43> | |
**/ |
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
(() => { | |
/** | |
* Renders a button that when clicked copies the NodeList passed to the constructor to the clipboard | |
* | |
* @param [NodeList] content - a NodeList of selected elements | |
*/ | |
const CopyToClipBoardBtn = (content) => { | |
const btn = document.createElement('button'); | |
btn.innerText = 'Copy to clipboard'; |
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
// ==UserScript== | |
// @name WordPress Developer Docs - In-Page Navigation Anchors | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Adds a sticky table of contents to the sidebar that contains anchor links to in-page sections when on developer.wordpress.org | |
// @author Gabriel Rose (@roseg43) | |
// @match https://developer.wordpress.org/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=wordpress.org | |
// @grant none | |
// ==/UserScript== |
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
.row { | |
--column-count: 12; | |
--grid-gap-width: 16px; | |
--column-base-min-width: calc((var(--width-grid) - (var(--column-count) - 1) * var(--grid-gap-width)) / var(--column-count)); | |
display: flex; | |
flex-flow: column; | |
gap: var(--grid-gap-width); | |
@media (--bp-medium) { | |
display: grid; |
OlderNewer