File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 1+ // stolen from https://github.com/guillaumebriday/turbo-frames-debug and slightly modified
2+ // must have TURBO_DEBUG env var set
3+ :root {
4+ --turbo-frame-debug-color : #3B82F6 ;
5+ --turbo-frame-debug-z-index : 9999 ;
6+ --turbo-frame-debug-font-size : 0.7rem ;
7+ --turbo-frame-debug-border-radius : 0.25rem ;
8+ }
9+
10+ .debug-turbo {
11+ turbo-frame {
12+ border : 1px var (--turbo-frame-debug-color ) solid ;
13+ display : block ;
14+ border-radius : var (--turbo-frame-debug-border-radius );
15+
16+ & ::before {
17+ content : " #" attr (id );
18+ display : inline-block ;
19+ position : relative ;
20+ top : -1rem ;
21+ right : -0.5rem ;
22+ color : var (--turbo-frame-debug-color );
23+ font-size : var (--turbo-frame-debug-font-size );
24+ z-index : var (--turbo-frame-debug-z-index );
25+ background-color : #fff ;
26+ padding : 0.05rem ;
27+ border : 1px var (--turbo-frame-debug-color ) solid ;
28+ border-radius : var (--turbo-frame-debug-border-radius );
29+ }
30+ }
31+ }
Original file line number Diff line number Diff line change 2727// Layouts
2828@import " layouts/container" ;
2929@import " layouts/header" ;
30+
31+ // Development helpers: must have env vars set.
32+ // see files and/or application.html.erb
33+ @import " debug" ;
Original file line number Diff line number Diff line change 1616 <% end %>
1717 </ head >
1818
19- < body >
19+ < body class =" <%= 'debug-turbo' if ENV . fetch ( "TURBO_DEBUG" , false ) %> " >
2020 <%= render "layouts/navbar" %>
2121 < div id ="flash " class ="flash ">
2222 <%= render "layouts/flash" %>
You can’t perform that action at this time.
0 commit comments