fix: remove last style block from BaseLayout, move fonts/container to globals.css - Remove <style is:global> from BaseLayout.astro - Add font-family, container, scroll-behavior to globals.css - Zero style blocks remain in any Astro files
swadhinbiswas committed 3 months ago
e60345c
1 parent 2f87bd7
commit e60345c
2 files changed
+19 -52
Showing 2 changed files+19-52
▼src/layouts/BaseLayout.astro
+0-52
| @@ -126,55 +126,3 @@ const { | ||
126 | 126 | </script> |
127 | 127 | </body> |
128 | 128 | </html> |
129 | - | |
130 | -<style is:global> | |
131 | - body { | |
132 | - font-family: "Inter", system-ui, sans-serif; | |
133 | - } | |
134 | - | |
135 | - code, | |
136 | - pre, | |
137 | - .font-mono { | |
138 | - font-family: "JetBrains Mono", monospace; | |
139 | - } | |
140 | - | |
141 | - .container { | |
142 | - margin-left: auto; | |
143 | - margin-right: auto; | |
144 | - width: 100%; | |
145 | - max-width: 80rem; | |
146 | - padding-left: 1rem; | |
147 | - padding-right: 1rem; | |
148 | - } | |
149 | - | |
150 | - @media (min-width: 640px) { | |
151 | - .container { | |
152 | - padding-left: 1.25rem; | |
153 | - padding-right: 1.25rem; | |
154 | - } | |
155 | - } | |
156 | - | |
157 | - @media (min-width: 1024px) { | |
158 | - .container { | |
159 | - padding-left: 1.5rem; | |
160 | - padding-right: 1.5rem; | |
161 | - } | |
162 | - } | |
163 | - | |
164 | - /* Responsive text utilities */ | |
165 | - .text-balance { | |
166 | - text-wrap: balance; | |
167 | - } | |
168 | - | |
169 | - /* Smooth scroll */ | |
170 | - html { | |
171 | - scroll-behavior: smooth; | |
172 | - } | |
173 | - | |
174 | - /* Better mobile tap targets */ | |
175 | - @media (max-width: 640px) { | |
176 | - button, a, input, textarea, select { | |
177 | - min-height: 44px; | |
178 | - } | |
179 | - } | |
180 | -</style> | |
181 | 129 | |
▼src/styles/globals.css
+19-0
| @@ -713,4 +713,23 @@ img { | ||
713 | 713 | .custom-scrollbar::-webkit-scrollbar-thumb { |
714 | 714 | background: rgba(255, 255, 255, 0.1); |
715 | 715 | border-radius: 2px; |
716 | +} | |
717 | + | |
718 | +/* Base layout styles */ | |
719 | +body { | |
720 | + font-family: "Inter", system-ui, sans-serif; | |
721 | +} | |
722 | + | |
723 | +code, | |
724 | +pre, | |
725 | +.font-mono { | |
726 | + font-family: "JetBrains Mono", monospace; | |
727 | +} | |
728 | + | |
729 | +.text-balance { | |
730 | + text-wrap: balance; | |
731 | +} | |
732 | + | |
733 | +html { | |
734 | + scroll-behavior: smooth; | |
716 | 735 | } |
717 | 736 | |