kripod / kripod/otion

Consider dropping 'px' postfixing for numeric CSS properties

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
624
Forks
22
PR merge metrics
No merged PRs in 30d

Description

## Motivation

After a discussion [on a React issue](https://github.com/facebook/react/pull/19286) and seeing where Preact 11 [is steering](https://github.com/preactjs/preact/issues/2621):

> adding `px` is definitely a historial feature that isn't as relevant these days. Folks should be opting to use relative units rather than static units (like `px`), otherwise they break their app/website to users who use zooming tools or accessibility tooling – invaliding [Web Content Accessibility Guidelines](https://www.w3.org/TR/WCAG21/).

> I've seen it confuse new developers first-hand when switching between writing CSS and declaring inline styles.

Contributor guide

Open the contributing guide

Research direction

Start by locating the TypeScript code that appends units to numeric CSS properties and review how those properties are classified. Define the affected behavior and verify that numeric values no longer receive an automatic px suffix without changing other style handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.