docs(tips-and-tricks): add How can I inspect hard-to-grab elements? tip (#807)

This commit is contained in:
uncenter authored and GitHub committed 2024-04-12 12:11:01 -04:00
1 parent 98e5905304
commit b1a248d4ce
2 files changed
+17 -2

No files matched your search

+1 -1
View File
@@ -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`
+16 -1
View File
@@ -17,11 +17,12 @@
- [SVG background images](#svg-background-images)
- [`<img>` 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)
<!--toc:end-->
### 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).
&nbsp;
@@ -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)
<span>Gif via <a href="https://css-tricks.com/set-timed-debugger-web-inspect-hard-grab-elements/">"Set a Timed Debugger To Web Inspect Hard-To-Grab Elements" - CSS Tricks</a>.</span>