Relative units for sizes, margins and paddings of the page footer#374
Relative units for sizes, margins and paddings of the page footer#374auge8472 wants to merge 4 commits intoOpenTTD:mainfrom
Conversation
Signed-off-by: Heiko August <post@auge8472.de>
…er with em-based ones Signed-off-by: Heiko August <post@auge8472.de>
Signed-off-by: Heiko August <post@auge8472.de>
Signed-off-by: Heiko August <post@auge8472.de>
|
IIRC it's better to use I did start on revamping the entire css (using relative sizing like here) to also remove things like like using pre-baked images for borders/headers and things. These css files are also duplicated for things like bananas, so I think it might be better to have a complete css refresh in one go rather lots of tiny changes? |
In my opinion, that's too rigid. Yes, it's common practice to use Moving from pixel sizes to sizes in rem is replacing one absolute unit system by another. The only difference is, that rem respects the browsers own font size setting, which may be altered by the user (like me who set the default font size to 18px and set a minimum font size of 12px).
Are there other a "pre-baked" images than the one for the headings? I thought about redoing the heading image without the colour gradient and adding the gradient with a semitransparent CSS colour gradient. This way, the underlying grid image can be tiled if the heading block becomes lower or higher due to different font sizes.
Oh, that would be a much greater rework than I thought. The changes for the page header and the main navigation are ready and would have to be commited to this branch instead of to separate branches for separate pull requests. But it's doable. |
I would like to replace many of the current pixel based sizing properties in the CSS with ones with relative units like
emorrem. With this change it should later be simpler to make the OpenTTD website responsive. My first proposal affects the page footer. Further pull requests for the page header and the navigation bar will follow within a short time. The pull requests regarding the area for the main content needs more work due to the different structures of the various pages. If the changes of this pull request are approved, the pull requests for the main area will follow.The main visually change is the font size in the footer. With the current font size of 11px for the footer link list and the copyright notice many visitors, especially older ones, will not be able to cope conveniently. Thatswhy I increased the font size to 86% (
0.86em) of the base font size of each visitor's browser. Since this change only affects part of the page layout, I have temporarily set the base font size for the footer itself to1rem. If and when the entire page has been changed, this font size will be set centrally for thehtmlorbodyelement and removed from the footer again.Further changes concern margins and paddings as well as the pipe symbols as delimiters between the links in the footer. The pipe symbols were replaced by borders (currently in the font colour).