diff --git a/docs/how-to-write-a-userstyle.md b/docs/how-to-write-a-userstyle.md index 89bb6879..35cdae8c 100644 --- a/docs/how-to-write-a-userstyle.md +++ b/docs/how-to-write-a-userstyle.md @@ -52,7 +52,7 @@ Start by filling out the "metadata block" at the very top of the template. Repla ==/UserStyle== */ ``` -The rest of the metadata block details the preprocessor and the options of the userstyle. This won't need to be changed. For more information, see [Writing UserCSS - Usercss Metadata](https://github.com/openstyles/stylus/wiki/Writing-UserCSS#usercss-metadata). +The rest of the metadata block details the preprocessor and the options of the userstyle. This won't need to be changed. For more information, see ["Usercss Metadata" - Stylus Wiki](https://github.com/openstyles/stylus/wiki/Writing-UserCSS#usercss-metadata). ### `@-moz-document` diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md index 0dd29d9f..54668072 100644 --- a/docs/tips-and-tricks.md +++ b/docs/tips-and-tricks.md @@ -17,11 +17,12 @@ - [SVG background images](#svg-background-images) - [`` elements](#img-elements) - [How do I set a variable to RGB values?](#how-do-i-set-a-variable-to-rgb-values) +- [How can I inspect hard-to-grab elements?](#how-can-i-inspect-hard-to-grab-elements) ### How can I see my changes in real time? -See [Stylus Wiki - Initial installation and live reload](https://github.com/openstyles/stylus/wiki/Writing-UserCSS#initial-installation-and-live-reload). +See ["Initial installation and live reload" - Stylus Wiki](https://github.com/openstyles/stylus/wiki/Writing-UserCSS#initial-installation-and-live-reload).   @@ -149,3 +150,17 @@ You can use the following snippet to get the raw RGB values from a color. --ctp-base: #rgbify(@base) []; // -> 30, 30, 46 ``` + +### How can I inspect hard-to-grab elements? + +Paste the following snippet into your browser console, then trigger the event. Adjust the delay (in milliseconds) as needed. + +```js +setTimeout(function () { + debugger; +}, 3000); +``` + +![](https://i0.wp.com/css-tricks.com/wp-content/uploads/2017/02/debugger.gif?ssl=1) + +Gif via "Set a Timed Debugger To Web Inspect Hard-To-Grab Elements" - CSS Tricks.