diff --git a/hosts/ocaml/bin/sx_server.ml b/hosts/ocaml/bin/sx_server.ml index 20823d51..62f6d8e1 100644 --- a/hosts/ocaml/bin/sx_server.ml +++ b/hosts/ocaml/bin/sx_server.ml @@ -1733,7 +1733,9 @@ let http_inject_shell_statics env static_dir sx_sxc = (String.length pages_sx) (List.length (String.split_on_char '\n' pages_sx)); ignore (env_bind env "__shell-pages-sx" (String pages_sx)); - ignore (env_bind env "__shell-sx-css" (String sx_css)); + (* Add CSS to hide island placeholder SX text until client hydrates *) + let island_css = "[data-sx-island]{font-size:0;line-height:0;overflow:hidden;max-height:0}" in + ignore (env_bind env "__shell-sx-css" (String (sx_css ^ "\n" ^ island_css))); ignore (env_bind env "__shell-sx-css-classes" (String "")); ignore (env_bind env "__shell-asset-url" (String "/static")); ignore (env_bind env "__shell-sx-js-hash" (String sx_js_hash));