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 27
27
// Layouts
28
28
@import " layouts/container" ;
29
29
@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 16
16
<% end %>
17
17
</ head >
18
18
19
- < body >
19
+ < body class =" <%= 'debug-turbo' if ENV . fetch ( "TURBO_DEBUG" , false ) %> " >
20
20
<%= render "layouts/navbar" %>
21
21
< div id ="flash " class ="flash ">
22
22
<%= render "layouts/flash" %>
You can’t perform that action at this time.
0 commit comments