Penguins Rising: Responsive Text with the Title Screen

    With little testing as possible I wanted to create a title for penguins rising that was styled and would resize based on the device. I knew how to achieve this using css media queries however I would still need to test my queries on multiple devices which would take more time to test than actually write them. So I wondered what if there was a faster way to do this. Looking around I found ways to achieve this but most required Jquery and creating an event trigger to update the text size. Which wouldn't be too difficult to create but I have removed Jquery from my solution for sometime now.

Things I looked at for this solution

  • Text (not changing it too often.)
  • Font-size - scale to full width of the screen.
  • Font-Style - Added this later but not all devices liked text strokes in css.

The answer if very clear to me and one that at the beginning I considered, but I wanted to weigh all my options first. By simply making the Title a image and setting the width to 100% should have no problems on any devices. Sadly though I do like some of the css implementation that I create/found on my route but some mobile devices browsers are not quite the same as their desktop versions. Until they are or if they ever will be since some of the differences are due to performance constraints I will simply make note of them. I wouldn't say to always go this route if your requirements are similar but it is an option that is worth pointing out.
Title Screen
Side note
Below the Title screen you will see that I have some styled buttons, the text size those buttons needed to resize as well. However their requirements were much different since they did not need to be styled as much and there sizes wrapped in boxes I could just 'vw' - viewport window to resize them. The only issue that I have found was that zooming in and out they text does not auto-rescale but if you hover over them this triggers the re-scale. Which I am some what happy with, but there are other issues higher on my concern.

Viewport Sized Typography | CSS-Tricks
css - Responsive Font Size - Stack Overflow
CSS Media Queries & Using Available Space | CSS-Tricks
Text Stroke - Has nothing to do with make things more responsive but looks cool and the font-style is used.
javascript - Text resizing in HTML/JS - Stack Overflow 


Popular posts from this blog

Nginx Best Practices Extended

Installing Windows on Acer chromebook 15 cb3-532

Entity Framework: ToListAynsc & WhereAsync