vendredi 31 juillet 2015

Font is displayed differently after migrating to HAML in Rails 4 app

I just migrated my rails app to HAML and since then, my fonts are displayed differently. See the images below for a comparison.

Before: http:///i.imgur.com/x3CjOhE.jpg

After: http://ift.tt/1MzpYmK

I migrated using rake haml:erb2haml included with haml-rails.

If I check out my master branch, it returns to normal. The stylesheets haven't changed and I've confirmed they're loading as normal.

application.html.haml

!!!
%html
  %head
    %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
    %title= full_title(yield(:title))
    = stylesheet_link_tag 'application', media: 'all', |
      'data-turbolinks-track' => true                  |
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    = render 'layouts/shim'
  %body
    = render 'layouts/header'
    .container
      - flash.each do |message_type, message|
        %div{:class => "alert alert-#{message_type}"}= message
      = yield
    = render 'layouts/footer'
    = debug(params) if Rails.env.development?

application.html.erb

<!DOCTYPE html>
<html>
  <head>
    <title><%= full_title(yield(:title)) %></title>
    <%= stylesheet_link_tag 'application', media: 'all',
                                           'data-turbolinks-track' => true %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
    <%= csrf_meta_tags %>
    <%= render 'layouts/shim' %>
  </head>
  <body>
    <%= render 'layouts/header' %>
      <div class="container">
        <% flash.each do |message_type, message| %>
          <div class="alert alert-<%= message_type %>"><%= message %></div>
        <% end %>
        <%= yield %>
      </div>
    <%= render 'layouts/footer' %>
    <%= debug(params) if Rails.env.development? %>
  </body>
</html>

Can anybody shed some light on why this might be happening?

Aucun commentaire:

Enregistrer un commentaire