AI Briefing
KO

Responsive Web Page Support: Applying a Screen-Shrinking Technique Using the vw Unit

·2019.02.26 09:00

Key point

To solve the minimum font size problem with rem, a technique was applied to linearly shrink web pages using the vw unit.

1 / 4

Details

To reduce web page design bugs across various mobile devices, a method was adopted to linearly shrink the entire page on screens smaller than the base size. By utilizing the vw unit to scale element sizes proportionally to the screen width, the minimum font size issue across browsers that occurred with the rem approach was bypassed.

The existing rem approach caused unintended layout collapse in WebKit-based browsers such as Safari and Chrome due to the CJK locale minimum font size (12px) restriction. The zoom property is non-standard and thus unsupported in Firefox, and transform: scale was excluded due to the complexity of scroll area calculations.

Ultimately, logic to automatically convert px values to vw was implemented via a Sass mixin. The forceMediaMerge option of CSSO was used to merge duplicate media queries during the build, and zoom: 0.5~0.6 was applied in landscape mode to improve readability.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.