Closed joshuafredrickson closed 1 year ago
@joshuafredrickson I'm not able to reproduce needing to do this
setup.php
:add_action('after_setup_theme', function () {
add_theme_support('editor-styles');
add_editor_style(asset('app.css'));
});
app.css
:
h1 {
font-family:monospace;
font-size: 6rem;
line-height: 1;
color: blue;
}
Are you not seeing this same result?
Hey @retlehs ,
Your hunch about SSL was correct. Tested this out by toggling valet secure
and valet unsecure
a few times.
add_editor_style(asset('app.css'))
✅ Non-SSL ❌ SSL
add_editor_style(asset('app.css')->relativePath(get_theme_file_path()))
✅ Non-SSL ✅ SSL
I guess the question is now do we add both scenarios or use only the latter since it works both ways? I can rewrite as needed.
No changes needed, thank you for the PR and for checking that 🙏
add_editor_style
needs to receive the stylesheet as a relative path vs remote URI.Additional context