Create Scalable Interfaces With PostCSS-px-to-viewport Module | Hacker Noon

Create Scalable Interfaces With PostCSS-px-to-viewport Module | Hacker Noon

Most mobile and cross-platform web developers have encountered the problem at some point: you need your web app to scale neatly to the device screen size, regardless of which of the many thousands of devices there are out there, but your units only have one design layout width, mainly mobile. Or perhaps you need to create a per-device stylesheet for a truly scalable cross-platform UI, and want to use a scaled version of an original to base it upon. In either case, converting everything by hand is laborious and inconvenient.

Most mobile and cross-platform web developers have encountered the problem at some point: you need your web app to scale neatly to the device screen size, regardless of which of the many thousands of devices there are out there, but your units only have one design layout width, mainly mobile. Or perhaps you need to create a per-device stylesheet for a truly scalable cross-platform UI, and want to use a scaled version of an original to base it upon. In either case, converting everything by hand is laborious and inconvenient.

Grappling with this problem in one of our projects, the Med.me app, our leading frontend developer Dmitriy Karpunin came up with the idea of using a post-processor to convert CSS values from one set of units to another, and that’s how postcss-px-to-viewport, a plug-in for PostCSS that converts px values to viewport units (vw, vh, etc.), was born.

For example, if you specify a notional horizontal resolution of 640 pixels and you specify a horizontal distance of 32px, the plug-in will convert that to 5vw in the output, because 32 pixels is 5% of the 640 pixel viewport width.

The plug-in also has plenty of options for customization, to control exactly which values to convert, and where, and based upon which notional resolution.

Read more https://hackernoon.com/create-scalable-interfaces-with-postcss-px-to-viewport-module-aqp3z3h

frontend open-source postcss ui plugins

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

An Open-Source Book About the Open Source World

Open source today is a word that often include a lot of things, such as open knowledge (Wikimedia projects), open hardware (Arduino, Raspberry Pi), open formats (ODT/ODS/ODP) and so on.

Did Google Open Sourcing Kubernetes Backfired?

With Google not owning the trademarks or control for Kubernetes, it also provided a competitive edge to AWS, Microsoft, IBM etc.

UI Designer Vs UI Developer

UI Online Course at OnlineITGuru with 7 years of hands on exp. trainer,Job oriented UI online training with live project in USA,UK,INDIA

UX designer ? UI designer ? UI Developer ?

**The UX designer** is someone who thinks about what should the user flow be like, which page should lead to which page, when should a confirm popup appear or not appear, should there be a listing page before or after a create-new page, should...

Hire Frontend Developers

Create a new web app or revamp your existing website? Every existing website or a web application that we see with an interactive and user-friendly interface are from Front-End developers who ensure that all visual effects come into existence....