Skip to content

CSS/JS partials don't render correctly in a development environnement #78

@oz-tal

Description

@oz-tal

The way the CSS and JS is rendered in the layout is currently problematic in a development environnement.

<style>
<%= render partial: 'layouts/lockup/inline_css' %>
</style>
<script>
<%= render partial: 'layouts/lockup/inline_js' %>
</script>

Rails assume the content of the html.erb files will actually be HTML, and will automatically add HTML comment denoting the start and end of the partial in the final view. The result of this behavior is the inclusion of comments with invalid syntax within the style and the script tag, notably hindering the interpretation of the JS, and thus breaking the hint button.

I suggest to simply move the style and the script tag inside the partial themselves to avoid the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions