victor HF staff commited on
Commit
ad91862
·
1 Parent(s): efec415

refactor: Remove style.css and use Tailwind CSS for playground styling

Browse files
Files changed (2) hide show
  1. index.html +16 -18
  2. style.css +1 -28
index.html CHANGED
@@ -7,9 +7,9 @@
7
  <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
8
  </head>
9
  <body class="m-0 p-0">
10
- <div class="grid grid-cols-2 w-dvh h-dvh divide-x divide-amber-300">
11
- <div class="bg-gray-200">
12
- <textarea id="code-input" class="w-full h-full font-mono p-2 resize-none"><!DOCTYPE html>
13
  <html lang="en">
14
  <head>
15
  <meta charset="UTF-8">
@@ -37,27 +37,25 @@
37
  </body>
38
  </html></textarea>
39
  </div>
40
- <div>
41
  <iframe id="output" class="w-full h-full border-none"></iframe>
42
  </div>
43
  </div>
44
  <script>
45
- document.addEventListener('DOMContentLoaded', () => {
46
- const codeInput = document.getElementById('code-input');
47
- const output = document.getElementById('output');
48
 
49
- function updateOutput() {
50
- output.contentDocument.open();
51
- output.contentDocument.write(codeInput.value);
52
- output.contentDocument.close();
53
- }
54
 
55
- // Initial render
56
- updateOutput();
57
 
58
- // Update on every input
59
- codeInput.addEventListener('input', updateOutput);
60
- });
61
  </script>
62
  </body>
63
- </html>
 
7
  <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
8
  </head>
9
  <body class="m-0 p-0">
10
+ <div class="grid grid-cols-1 md:grid-cols-2 w-screen h-screen divide-x divide-amber-300">
11
+ <div class="bg-gray-100">
12
+ <textarea id="code-input" class="w-full h-full font-mono p-4 resize-none focus:outline-none"><!DOCTYPE html>
13
  <html lang="en">
14
  <head>
15
  <meta charset="UTF-8">
 
37
  </body>
38
  </html></textarea>
39
  </div>
40
+ <div class="bg-white">
41
  <iframe id="output" class="w-full h-full border-none"></iframe>
42
  </div>
43
  </div>
44
  <script>
45
+ const codeInput = document.getElementById('code-input');
46
+ const output = document.getElementById('output');
 
47
 
48
+ function updateOutput() {
49
+ output.contentDocument.open();
50
+ output.contentDocument.write(codeInput.value);
51
+ output.contentDocument.close();
52
+ }
53
 
54
+ // Initial render
55
+ updateOutput();
56
 
57
+ // Update on every input
58
+ codeInput.addEventListener('input', updateOutput);
 
59
  </script>
60
  </body>
61
+ </html>
style.css CHANGED
@@ -1,28 +1 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
- }
5
-
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
- }
10
-
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
- }
17
-
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
- }
25
-
26
- .card p:last-child {
27
- margin-bottom: 0;
28
- }
 
1
+ /* This file is no longer used - all styling is now handled by Tailwind CSS */