DioxusLabs / DioxusLabs/taffy

add support for dimensions relative to font size

Open
#240 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.6k
Forks
222
Avg merge
10h 41m
Merged PRs (30d)
40

Description

## What problem does this solve or what need does it fill?

To help with responsive design, dimensions relative to font size are useful

## What solution would you like?

Add support for `em` and `rem`. Additionally, `ex` and `ch` exist but are less useful

## What alternative(s) have you considered?

None

## Additional context

Unit|Description
--|--
em | Relative to the font-size of the element (2em means 2 times the size of the current font)
rem | Relative to font-size of the root element
ex | Relative to the x-height of the current font (rarely used)
ch | Relative to the width of the "0" (zero)

https://www.w3schools.com/cssref/css_units.php

Contributor guide

Open the contributing guide

Research direction

No files or tests are named in the issue. Start by locating the dimension and unit definitions, then inspect existing unit tests and examples for how absolute and relative dimensions are represented; done means the requested font-relative units are accepted and covered by tests, with their documented behavior reflected in the layout results.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.