├── .gitignore ├── LICENSE ├── README.md ├── dist └── tailwind.css ├── index.html ├── package.json ├── postcss.config.js ├── src └── index.js ├── static └── examle.png └── tailwind.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | yarn.lock 3 | package-lock.json 4 | .idea 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Jeroen Gerits 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tailwind CSS ~ Debug Mode 2 | 3 | A plugin that provides a `debug` component that makes it visually easier to view the document structure. 4 | 5 | ## Preview 6 | 7 |  8 | 9 | ## Example 10 | 11 | View an example of the debug mode in action: [https://jeroengerits.github.io/tailwind-debug-mode/](https://jeroengerits.github.io/tailwind-debug-mode/) 12 | 13 | ## Basic usage 14 | 15 | ```html 16 | 17 |
18 | 19 | 20 | ``` 21 | 22 | > Currently, the plugin only supports the `debug` component on a body element. 23 | 24 | ## Installation 25 | 26 | Install the plugin 27 | 28 | ```sh 29 | # Using npm 30 | npm install tailwind-debug-mode 31 | 32 | # Using Yarn 33 | yarn add tailwind-debug-mode 34 | ``` 35 | 36 | Then add the plugin to your `tailwind.config.js` file: 37 | 38 | ```js 39 | // tailwind.config.js 40 | module.exports = { 41 | plugins: [ 42 | require('tailwind-debug-mode'), 43 | // ... 44 | ], 45 | } 46 | ``` 47 | 48 | ## Configuration 49 | 50 | Optionally - define your custom color scheme 51 | 52 | ```js 53 | // tailwind.config.js 54 | module.exports = { 55 | plugins: [ 56 | require('tailwind-debug-mode')({ 57 | wireColor: '#000000cc', // the color of the wires 58 | svgColor: '#000000cc', // the color of the svg 59 | textColor: '#33333399', // the color of the text on hover 60 | inputColor: '#33333322', // the background color of input elements 61 | }), 62 | // ... 63 | ], 64 | } 65 | ``` 66 | -------------------------------------------------------------------------------- /dist/tailwind.css: -------------------------------------------------------------------------------- 1 | /* 2 | ! tailwindcss v3.0.22 | MIT License | https://tailwindcss.com 3 | */ 4 | 5 | /* 6 | 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) 7 | 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) 8 | */ 9 | 10 | *, 11 | ::before, 12 | ::after { 13 | box-sizing: border-box; 14 | /* 1 */ 15 | border-width: 0; 16 | /* 2 */ 17 | border-style: solid; 18 | /* 2 */ 19 | border-color: #e5e7eb; 20 | /* 2 */ 21 | } 22 | 23 | ::before, 24 | ::after { 25 | --tw-content: ''; 26 | } 27 | 28 | /* 29 | 1. Use a consistent sensible line-height in all browsers. 30 | 2. Prevent adjustments of font size after orientation changes in iOS. 31 | 3. Use a more readable tab size. 32 | 4. Use the user's configured `sans` font-family by default. 33 | */ 34 | 35 | html { 36 | line-height: 1.5; 37 | /* 1 */ 38 | -webkit-text-size-adjust: 100%; 39 | /* 2 */ 40 | -moz-tab-size: 4; 41 | /* 3 */ 42 | -o-tab-size: 4; 43 | tab-size: 4; 44 | /* 3 */ 45 | font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 46 | 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 47 | 'Segoe UI Symbol', 'Noto Color Emoji'; 48 | /* 4 */ 49 | } 50 | 51 | /* 52 | 1. Remove the margin in all browsers. 53 | 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. 54 | */ 55 | 56 | body { 57 | margin: 0; 58 | /* 1 */ 59 | line-height: inherit; 60 | /* 2 */ 61 | } 62 | 63 | /* 64 | 1. Add the correct height in Firefox. 65 | 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) 66 | 3. Ensure horizontal rules are visible by default. 67 | */ 68 | 69 | hr { 70 | height: 0; 71 | /* 1 */ 72 | color: inherit; 73 | /* 2 */ 74 | border-top-width: 1px; 75 | /* 3 */ 76 | } 77 | 78 | /* 79 | Add the correct text decoration in Chrome, Edge, and Safari. 80 | */ 81 | 82 | abbr:where([title]) { 83 | -webkit-text-decoration: underline dotted; 84 | text-decoration: underline dotted; 85 | } 86 | 87 | /* 88 | Remove the default font size and weight for headings. 89 | */ 90 | 91 | h1, 92 | h2, 93 | h3, 94 | h4, 95 | h5, 96 | h6 { 97 | font-size: inherit; 98 | font-weight: inherit; 99 | } 100 | 101 | /* 102 | Reset links to optimize for opt-in styling instead of opt-out. 103 | */ 104 | 105 | a { 106 | color: inherit; 107 | text-decoration: inherit; 108 | } 109 | 110 | /* 111 | Add the correct font weight in Edge and Safari. 112 | */ 113 | 114 | b, 115 | strong { 116 | font-weight: bolder; 117 | } 118 | 119 | /* 120 | 1. Use the user's configured `mono` font family by default. 121 | 2. Correct the odd `em` font sizing in all browsers. 122 | */ 123 | 124 | code, 125 | kbd, 126 | samp, 127 | pre { 128 | font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 129 | 'Courier New', monospace; 130 | /* 1 */ 131 | font-size: 1em; 132 | /* 2 */ 133 | } 134 | 135 | /* 136 | Add the correct font size in all browsers. 137 | */ 138 | 139 | small { 140 | font-size: 80%; 141 | } 142 | 143 | /* 144 | Prevent `sub` and `sup` elements from affecting the line height in all browsers. 145 | */ 146 | 147 | sub, 148 | sup { 149 | font-size: 75%; 150 | line-height: 0; 151 | position: relative; 152 | vertical-align: baseline; 153 | } 154 | 155 | sub { 156 | bottom: -0.25em; 157 | } 158 | 159 | sup { 160 | top: -0.5em; 161 | } 162 | 163 | /* 164 | 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) 165 | 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) 166 | 3. Remove gaps between table borders by default. 167 | */ 168 | 169 | table { 170 | text-indent: 0; 171 | /* 1 */ 172 | border-color: inherit; 173 | /* 2 */ 174 | border-collapse: collapse; 175 | /* 3 */ 176 | } 177 | 178 | /* 179 | 1. Change the font styles in all browsers. 180 | 2. Remove the margin in Firefox and Safari. 181 | 3. Remove default padding in all browsers. 182 | */ 183 | 184 | button, 185 | input, 186 | optgroup, 187 | select, 188 | textarea { 189 | font-family: inherit; 190 | /* 1 */ 191 | font-size: 100%; 192 | /* 1 */ 193 | line-height: inherit; 194 | /* 1 */ 195 | color: inherit; 196 | /* 1 */ 197 | margin: 0; 198 | /* 2 */ 199 | padding: 0; 200 | /* 3 */ 201 | } 202 | 203 | /* 204 | Remove the inheritance of text transform in Edge and Firefox. 205 | */ 206 | 207 | button, 208 | select { 209 | text-transform: none; 210 | } 211 | 212 | /* 213 | 1. Correct the inability to style clickable types in iOS and Safari. 214 | 2. Remove default button styles. 215 | */ 216 | 217 | button, 218 | [type='button'], 219 | [type='reset'], 220 | [type='submit'] { 221 | -webkit-appearance: button; 222 | /* 1 */ 223 | background-color: transparent; 224 | /* 2 */ 225 | background-image: none; 226 | /* 2 */ 227 | } 228 | 229 | /* 230 | Use the modern Firefox focus style for all focusable elements. 231 | */ 232 | 233 | :-moz-focusring { 234 | outline: auto; 235 | } 236 | 237 | /* 238 | Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) 239 | */ 240 | 241 | :-moz-ui-invalid { 242 | box-shadow: none; 243 | } 244 | 245 | /* 246 | Add the correct vertical alignment in Chrome and Firefox. 247 | */ 248 | 249 | progress { 250 | vertical-align: baseline; 251 | } 252 | 253 | /* 254 | Correct the cursor style of increment and decrement buttons in Safari. 255 | */ 256 | 257 | ::-webkit-inner-spin-button, 258 | ::-webkit-outer-spin-button { 259 | height: auto; 260 | } 261 | 262 | /* 263 | 1. Correct the odd appearance in Chrome and Safari. 264 | 2. Correct the outline style in Safari. 265 | */ 266 | 267 | [type='search'] { 268 | -webkit-appearance: textfield; 269 | /* 1 */ 270 | outline-offset: -2px; 271 | /* 2 */ 272 | } 273 | 274 | /* 275 | Remove the inner padding in Chrome and Safari on macOS. 276 | */ 277 | 278 | ::-webkit-search-decoration { 279 | -webkit-appearance: none; 280 | } 281 | 282 | /* 283 | 1. Correct the inability to style clickable types in iOS and Safari. 284 | 2. Change font properties to `inherit` in Safari. 285 | */ 286 | 287 | ::-webkit-file-upload-button { 288 | -webkit-appearance: button; 289 | /* 1 */ 290 | font: inherit; 291 | /* 2 */ 292 | } 293 | 294 | /* 295 | Add the correct display in Chrome and Safari. 296 | */ 297 | 298 | summary { 299 | display: list-item; 300 | } 301 | 302 | /* 303 | Removes the default spacing and border for appropriate elements. 304 | */ 305 | 306 | blockquote, 307 | dl, 308 | dd, 309 | h1, 310 | h2, 311 | h3, 312 | h4, 313 | h5, 314 | h6, 315 | hr, 316 | figure, 317 | p, 318 | pre { 319 | margin: 0; 320 | } 321 | 322 | fieldset { 323 | margin: 0; 324 | padding: 0; 325 | } 326 | 327 | legend { 328 | padding: 0; 329 | } 330 | 331 | ol, 332 | ul, 333 | menu { 334 | list-style: none; 335 | margin: 0; 336 | padding: 0; 337 | } 338 | 339 | /* 340 | Prevent resizing textareas horizontally by default. 341 | */ 342 | 343 | textarea { 344 | resize: vertical; 345 | } 346 | 347 | /* 348 | 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) 349 | 2. Set the default placeholder color to the user's configured gray 400 color. 350 | */ 351 | 352 | input::-moz-placeholder, 353 | textarea::-moz-placeholder { 354 | opacity: 1; 355 | /* 1 */ 356 | color: #9ca3af; 357 | /* 2 */ 358 | } 359 | 360 | input:-ms-input-placeholder, 361 | textarea:-ms-input-placeholder { 362 | opacity: 1; 363 | /* 1 */ 364 | color: #9ca3af; 365 | /* 2 */ 366 | } 367 | 368 | input::placeholder, 369 | textarea::placeholder { 370 | opacity: 1; 371 | /* 1 */ 372 | color: #9ca3af; 373 | /* 2 */ 374 | } 375 | 376 | /* 377 | Set the default cursor for buttons. 378 | */ 379 | 380 | button, 381 | [role='button'] { 382 | cursor: pointer; 383 | } 384 | 385 | /* 386 | Make sure disabled buttons don't get the pointer cursor. 387 | */ 388 | 389 | :disabled { 390 | cursor: default; 391 | } 392 | 393 | /* 394 | 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) 395 | 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) 396 | This can trigger a poorly considered lint error in some tools but is included by design. 397 | */ 398 | 399 | img, 400 | svg, 401 | video, 402 | canvas, 403 | audio, 404 | iframe, 405 | embed, 406 | object { 407 | display: block; 408 | /* 1 */ 409 | vertical-align: middle; 410 | /* 2 */ 411 | } 412 | 413 | /* 414 | Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) 415 | */ 416 | 417 | img, 418 | video { 419 | max-width: 100%; 420 | height: auto; 421 | } 422 | 423 | /* 424 | Ensure the default browser behavior of the `hidden` attribute. 425 | */ 426 | 427 | [hidden] { 428 | display: none; 429 | } 430 | 431 | *, 432 | ::before, 433 | ::after { 434 | --tw-translate-x: 0; 435 | --tw-translate-y: 0; 436 | --tw-rotate: 0; 437 | --tw-skew-x: 0; 438 | --tw-skew-y: 0; 439 | --tw-scale-x: 1; 440 | --tw-scale-y: 1; 441 | --tw-pan-x: ; 442 | --tw-pan-y: ; 443 | --tw-pinch-zoom: ; 444 | --tw-scroll-snap-strictness: proximity; 445 | --tw-ordinal: ; 446 | --tw-slashed-zero: ; 447 | --tw-numeric-figure: ; 448 | --tw-numeric-spacing: ; 449 | --tw-numeric-fraction: ; 450 | --tw-ring-inset: ; 451 | --tw-ring-offset-width: 0px; 452 | --tw-ring-offset-color: #fff; 453 | --tw-ring-color: rgb(59 130 246 / 0.5); 454 | --tw-ring-offset-shadow: 0 0 #0000; 455 | --tw-ring-shadow: 0 0 #0000; 456 | --tw-shadow: 0 0 #0000; 457 | --tw-shadow-colored: 0 0 #0000; 458 | --tw-blur: ; 459 | --tw-brightness: ; 460 | --tw-contrast: ; 461 | --tw-grayscale: ; 462 | --tw-hue-rotate: ; 463 | --tw-invert: ; 464 | --tw-saturate: ; 465 | --tw-sepia: ; 466 | --tw-drop-shadow: ; 467 | --tw-backdrop-blur: ; 468 | --tw-backdrop-brightness: ; 469 | --tw-backdrop-contrast: ; 470 | --tw-backdrop-grayscale: ; 471 | --tw-backdrop-hue-rotate: ; 472 | --tw-backdrop-invert: ; 473 | --tw-backdrop-opacity: ; 474 | --tw-backdrop-saturate: ; 475 | --tw-backdrop-sepia: ; 476 | } 477 | 478 | .container { 479 | width: 100%; 480 | } 481 | 482 | @media (min-width: 640px) { 483 | .container { 484 | max-width: 640px; 485 | } 486 | } 487 | 488 | @media (min-width: 768px) { 489 | .container { 490 | max-width: 768px; 491 | } 492 | } 493 | 494 | @media (min-width: 1024px) { 495 | .container { 496 | max-width: 1024px; 497 | } 498 | } 499 | 500 | @media (min-width: 1280px) { 501 | .container { 502 | max-width: 1280px; 503 | } 504 | } 505 | 506 | @media (min-width: 1536px) { 507 | .container { 508 | max-width: 1536px; 509 | } 510 | } 511 | 512 | body.debug img { 513 | opacity: 0.25 !important; 514 | filter: grayscale(100) !important; 515 | transition: all 0.5s ease-in-out !important; 516 | outline: 1px solid #000000cc !important; 517 | } 518 | 519 | body.debug img:hover { 520 | opacity: 0.75 !important; 521 | } 522 | 523 | body.debug *, 524 | body.debug *::before, 525 | body.debug *::after, 526 | body.debug, 527 | body.debug::before, 528 | body.debug::after { 529 | user-drag: none !important; 530 | text-shadow: none !important; 531 | -webkit-user-select: none !important; 532 | -moz-user-select: none !important; 533 | -ms-user-select: none !important; 534 | user-select: none !important; 535 | border-color: transparent !important; 536 | background: none #fbfbf8 !important; 537 | transition: all 0.5s ease-in-out !important; 538 | color: transparent !important; 539 | outline: 1px solid #000000cc !important; 540 | } 541 | 542 | body.debug *:hover > * { 543 | color: #33333399 !important; 544 | z-index: 1000 !important; 545 | outline: 2px solid #000000cc !important; 546 | } 547 | 548 | body.debug svg, 549 | body.debug svg:hover > * { 550 | outline: none !important; 551 | box-shadow: none !important; 552 | } 553 | 554 | body.debug svg *, 555 | body.debug svg *:hover { 556 | color: #000000cc !important; 557 | outline: none !important; 558 | box-shadow: none !important; 559 | } 560 | 561 | body.debug input, 562 | body.debug input:hover { 563 | background-color: #33333322 !important; 564 | outline: none !important; 565 | box-shadow: none !important; 566 | } 567 | 568 | body.debug::before { 569 | content: '104 | Whatever cardigan tote bag tumblr hexagon brooklyn asymmetrical. 105 |
106 |121 | 124 | Vexillologist pitchfork 136 |
137 |138 | 141 | Tumeric plaid portland 153 |
154 |155 | 158 | Mixtape chillwave tumeric 170 |
171 | 187 |188 | Literally you probably haven't heard of them jean shorts. 189 |
190 |208 | 211 | Vexillologist pitchfork 223 |
224 |225 | 228 | Tumeric plaid portland 240 |
241 |242 | 245 | Hexagon neutra unicorn 257 |
258 |259 | 262 | Mixtape chillwave tumeric 274 |
275 | 291 |292 | Literally you probably haven't heard of them jean shorts. 293 |
294 |308 | 311 | Vexillologist pitchfork 323 |
324 |325 | 328 | Tumeric plaid portland 340 |
341 |342 | 345 | Hexagon neutra unicorn 357 |
358 |359 | 362 | Vexillologist pitchfork 374 |
375 |376 | 379 | Mixtape chillwave tumeric 391 |
392 | 408 |409 | Literally you probably haven't heard of them jean shorts. 410 |
411 |425 | 428 | Vexillologist pitchfork 440 |
441 |442 | 445 | Tumeric plaid portland 457 |
458 |459 | 462 | Hexagon neutra unicorn 474 |
475 |476 | 479 | Vexillologist pitchfork 491 |
492 |493 | 496 | Mixtape chillwave tumeric 508 |
509 | 525 |526 | Literally you probably haven't heard of them jean shorts. 527 |
528 |540 | Chillwave portland ugh, knausgaard fam polaroid iPhone. Man braid swag typewriter 541 | affogato, hella selvage wolf narwhal dreamcatcher. 542 |
543 |560 | Neutra shabby chic ramps, viral fixie. 561 |
562 |621 | Poke slow-carb mixtape knausgaard, typewriter street art gentrify hammock starladder 622 | roathse. Craies vegan tousled etsy austin. 623 |
624 |653 | Literally you probably haven't heard of them jean shorts. 654 |
655 |672 | Fam locavore kickstarter distillery. Mixtape chillwave tumeric sriracha taximy chia 673 | microdosing tilde DIY. XOXO fam inxigo juiceramps cornhole raw denim forage brooklyn. 674 | Everyday carry +1 seitan poutine tumeric. Gastropub blue bottle austin listicle 675 | pour-over, neutra jean. 676 |
677 |727 | Whatever cardigan tote bag tumblr hexagon brooklyn asymmetrical gentrify, subway tile 728 | poke farm-to-table. 729 |
730 |751 | Fingerstache flexitarian street art 8-bit waist co, subway tile poke farm. 752 |
753 |776 | Fingerstache flexitarian street art 8-bit waist co, subway tile poke farm. 777 |
778 |800 | Fingerstache flexitarian street art 8-bit waist co, subway tile poke farm. 801 |
802 |825 | Fingerstache flexitarian street art 8-bit waist co, subway tile poke farm. 826 |
827 |848 | Fingerstache flexitarian street art 8-bit waist co, subway tile poke farm. 849 |
850 |871 | Fingerstache flexitarian street art 8-bit waist co, subway tile poke farm. 872 |
873 |888 | Blue bottle crucifix vinyl post-ironic four dollar toast vegan taxidermy. Gastropub 889 | indxgo juice poutine, ramps microdosing banh mi pug. 890 |
891 |1014 | Edison bulb retro cloud bread echo park, helvetica stumptown taiyaki taxidermy 90's 1015 | cronut +1 kinfolk. Single-origin coffee ennui shaman taiyaki vape DIY tote bag 1016 | drinking vinegar cronut adaptogen squid fanny pack vaporware. 1017 |
1018 | 1019 |Senior Product Designer
1023 |1035 | Edison bulb retro cloud bread echo park, helvetica stumptown taiyaki taxidermy 90's 1036 | cronut +1 kinfolk. Single-origin coffee ennui shaman taiyaki vape DIY tote bag 1037 | drinking vinegar cronut adaptogen squid fanny pack vaporware. 1038 |
1039 | 1040 |UI Develeoper
1044 |1056 | Edison bulb retro cloud bread echo park, helvetica stumptown taiyaki taxidermy 90's 1057 | cronut +1 kinfolk. Single-origin coffee ennui shaman taiyaki vape DIY tote bag 1058 | drinking vinegar cronut adaptogen squid fanny pack vaporware. 1059 |
1060 | 1061 |CTO
1065 |