Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Using a plugin] Scoped CSS changes require two page reloads.

Abierto
#702 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
elixir, tailwindcss
Área
tooling

Línea de trabajo

Reproduce the delayed CSS update using the linked example and the demo at lib/pain_web/live/demo.ex. Start by inspecting config/dev.exs, the live_reload patterns, and the flow from assets/css/_components.css to assets/css/app.css. Done means scoped CSS changes are present after the first file save and page reload, including with the DaisyUI plugin.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Describe the bug

The main reason I chose to use Surface is for the inline, scoped styling rules per-component. Amazing!

Sadly, there is a synchronization issue on the live page reloads;
compiling the CSS from assets/css/_components.css to assets/css/app.css
requires longer than the live page reload takes to complete.

(This could be because I am including a Tailwind plugin called DaisyUI, bulking up my CSS.)

Regardless, my in-component CSS changes only appear after a second file-save.
Both file saves reload the page. On the first pass, no changes have been applied to the CSS.
Some duration after the first reload, the _components.css is changed on disk,
so any additional file save reloads the page again and applies those changes.

How to reproduce it

This issue appears in my codebase for a client.
You could clone and run https://base.bingo/code/pain/src/branch/daisy -
a basic Phoenix LiveView app using Surface, and the daisyui NPM package as a Tailwind plugin.
I'm running these experiments in lib/pain_web/live/demo.ex, on address 0.0.0.0:4000/demo.

This is my initial experience using Surface, so there is a chance this is a common issue.

The behavior you expected

Synchronized scoped-CSS changes appearing on each reload.

Your Environment

Surface: v0.11.0
LiveView: v0.19.5
Elixir: v1.15.4

Additional Approaches

I had no luck adding _components.css to my config/dev.exs:

config :pain, PainWeb.Endpoint,
  reloadable_compilers: [:gettext, :elixir, :app, :surface],
  live_reload: [
    patterns: [
      ~r"lib/pain_web/(controllers|live|components)/.*(ex|heex|sface|js)$",
      ~r"assets/css/_components.css",
      ~r"priv/catalogue/.*(ex)$",
      ~r"priv/gettext/.*(po)$",
      ~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
    ]
  ]
Lenguaje dominante
Elixir
Estrellas
2.1k
Forks
146
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de surface-ui/surface

Todos los issues de surface-ui/surface

Issues similares

Más issues de Elixir

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.