You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, reload-client.js can listen for changes to underlying CSS files and reload styles accordingly when domdiff is enabled.
This works when editing the CSS file directly (e.g. when editing an existing class), however styles do not reload when updating a template file to use a newly created CSS class.
Minimal Reproduction:
Given a project using @11ty/eleventy@2.0.0-canary.4 with the following files:
This issue occurs in Firefox (98.0.1). I cannot reproduce it in Chrome-based Edge.
mattrossman
changed the title
domdiff doesn't apply new CSS classes to edited templates
[Firefox] domdiff doesn't apply new CSS classes to edited templates
Mar 23, 2022
Description
Currently,
reload-client.js
can listen for changes to underlying CSS files and reload styles accordingly whendomdiff
is enabled.This works when editing the CSS file directly (e.g. when editing an existing class), however styles do not reload when updating a template file to use a newly created CSS class.
Minimal Reproduction:
Given a project using
@11ty/eleventy@2.0.0-canary.4
with the following files:index.html
:style.css
:.eleventy.js
:Run
eleventy --serve
and open the webpage.Add the following to
style.css
:Save the file.
Change
class="foo"
toclass="bar"
inindex.html
and save.The text turns black, as though unstyled.
Expected Behavior
The text should turn blue after the class is updated.
Additional Info:
If
style.css
is re-saved with the same contents after the HTML is updated, then the new style is applied.This issue is particularly problematic for users of Tailwind CSS which relies on generating many new utility classes during development.
The text was updated successfully, but these errors were encountered: