Skip to content

Instantly share code, notes, and snippets.

@firedev
Last active January 24, 2024 17:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save firedev/5a35aeaa58d99ac33af57459c5b10d7f to your computer and use it in GitHub Desktop.
Save firedev/5a35aeaa58d99ac33af57459c5b10d7f to your computer and use it in GitHub Desktop.
Hotwire/Turbo CSS Debugger
  • Install Stylebot or another CSS extension
  • Paste CSS
  • Enjoy highlighted turbo-frames, forms, and changed elements on the page
image
form {
content: "form";
display: block;
border: 2px solid cyan;
padding: 1.25rem;
position: relative;
}
form:before {
content: "form#" attr(id);
background: cyan;
position: absolute;
top: 0;
left: 0;
line-height: 1;
}
turbo-frame {
display: block;
border: 4px solid lightgreen;
padding: 1.25rem;
position: relative;
}
turbo-frame:before {
content: "turbo-frame#" attr(id);
background: lightgreen;
position: absolute;
top: 0;
left: 0;
line-height: 1;
}
body * {
animation: highlight 0.5s ease;
}
@keyframes highlight {
0% {
outline: 2px solid orange;
outline: 2px solid orange;
}
100% {
outline: 0px solid orange;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment