Answer the question
In order to leave comments, you need to log in
Different padding between elements locally in development and on production Rails servers. Why?
Rails app.
There are two identical pieces of HTML / CSS code that are displayed differently in all browsers (chrome, safari, firefox).
In production, there is no indentation between links.
In development, they have
HTML / CSS code everywhere the same. This is probably more of a question for layout wizards. Since adding padding/margin-right/left produces a similar result
Main point : add padding in production.
The priority is slightly lower than the main one: to figure out what kind of magic it is?
UPDATE :
On the dev page there are spaces and line breaks in the source code, on the prod it is not.
This was the inconsistency, it seems like a fairly obvious solution, thanks @27cmfor what I sent in the right direction, I will rule.
Answer the question
In order to leave comments, you need to log in
Due to what indents are obtained in the dev environment, did you look?
There are actually not many options: padding, margin, word-spacing, spaces and other whitespace characters.
If due to padding / margin / word-spacing, then figure out why they change in production.
If due to the spaces between the link tags, then figure out what cuts the spaces on the sale.
Among the suspects, first of all, check all sorts of minimizers, if any are used - they are often disabled in the dev environment and only enabled in the production environment.
For the first time I even come across, an interesting solution
For the parent block, make font-size:0;
For links, restore the font font-size: <size>
;
And add indents through padding-right for links.
See which styles are used in production and which are used in Dev. If there is a difference, then look at the paths in which assets are searched for in production (Rails.application.config.assets.precompile), and also check the inclusion of some files in others using directives
or@import
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question