Implement hybrid CSS architecture to fix white-on-white modal issue on sites with CSS resets
- Migrate from inline CSS to external insertr.css with cascade layer architecture
- Add CSS CDN serving capability (ServeInsertrCSS handler and /insertr.css route)
- Implement hybrid approach: @layer insertr for modern browsers + html body selectors for legacy browsers
- Remove scattered inline CSS from JavaScript modules for better maintainability
- Solve form element spacing conflicts with aggressive site CSS resets like '* {margin:0; padding:0}'
- Enable proper CSS caching and separation of concerns
This commit is contained in:
@@ -61,6 +61,7 @@ func ContentTypeMiddleware(next http.Handler) http.Handler {
|
||||
if r.URL.Path != "/" &&
|
||||
!strings.HasPrefix(r.URL.Path, "/sites/") &&
|
||||
!strings.HasPrefix(r.URL.Path, "/insertr.js") &&
|
||||
!strings.HasPrefix(r.URL.Path, "/insertr.css") &&
|
||||
(r.Method == "GET" || r.Method == "POST" || r.Method == "PUT") {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user