From 52fc0b826f5dc2d5f7a49b9cd921614be1fcfa3b Mon Sep 17 00:00:00 2001 From: Falkan Date: Wed, 18 Mar 2026 23:49:24 -0400 Subject: [PATCH] fix: tooltip respects newlines via white-space: pre-wrap --- data/units.json | 107 ++++++++++++++++++++++++++++++++++++++++++++++++ src/app.css | 2 +- 2 files changed, 108 insertions(+), 1 deletion(-) diff --git a/data/units.json b/data/units.json index 59543be..bca6695 100644 --- a/data/units.json +++ b/data/units.json @@ -147,6 +147,113 @@ "symbol": "cm", "group": "lengths-and-distance", "toBase": 10 + }, + { + "id": "meter", + "label": "meter", + "labelPlural": "meters", + "symbol": "m", + "group": "lengths-and-distance", + "toBase": 1000 + }, + { + "id": "dm", + "label": "decimeter", + "labelPlural": "decimeters", + "symbol": "dm", + "group": "lengths-and-distance", + "toBase": 100 + }, + { + "id": "dam", + "label": "decameter", + "labelPlural": "decameters", + "symbol": "dam", + "group": "lengths-and-distance", + "toBase": 10000 + }, + { + "id": "km", + "label": "kilometer", + "labelPlural": "kilometers", + "symbol": "km", + "group": "lengths-and-distance", + "toBase": 1000000 + }, + { + "id": "in", + "label": "inch", + "labelPlural": "inches", + "symbol": "in", + "group": "lengths-and-distance", + "toBase": 25.4 + }, + { + "id": "ft", + "label": "foot", + "labelPlural": "feet", + "symbol": "ft", + "group": "lengths-and-distance", + "toBase": 304.8 + }, + { + "id": "yd", + "label": "yard", + "labelPlural": "yards", + "symbol": "yd", + "group": "lengths-and-distance", + "toBase": 914.4, + "description": "Freedom meter." + }, + { + "id": "mi", + "label": "mile", + "labelPlural": "miles", + "symbol": "mi", + "group": "lengths-and-distance", + "toBase": 1609344 + }, + { + "id": "fur", + "label": "furlong", + "labelPlural": "furlongs", + "symbol": "fu", + "group": "lengths-and-distance", + "toBase": 201168, + "description": "This matters to generate horse gamblers, and literally no one else." + }, + { + "id": "ch", + "label": "chain", + "labelPlural": "chains", + "symbol": "ch", + "group": "lengths-and-distance", + "toBase": 20116.8 + }, + { + "id": "li", + "label": "link", + "labelPlural": "links", + "symbol": "li", + "group": "lengths-and-distance", + "toBase": 201.168 + }, + { + "id": "rd", + "label": "rod", + "labelPlural": "rods", + "symbol": "rd", + "group": "lengths-and-distance", + "toBase": 5029.2, + "description": "\"Spare the 'this' and spoil the child.\"\n\"What is the rod?\"\n\"Yes! For $500, what is the rod. Play continues. Will our abusive parent please choose another square?\"" + }, + { + "id": "ftm", + "label": "fathom", + "labelPlural": "fathoms", + "symbol": "ftm", + "group": "lengths-and-distance", + "toBase": 1828.8 } ], "groups": [ diff --git a/src/app.css b/src/app.css index da23be1..2c39110 100644 --- a/src/app.css +++ b/src/app.css @@ -464,7 +464,7 @@ pointer-events: none; opacity: 0; transition: opacity 0.15s ease; - white-space: normal; + white-space: pre-wrap; } .hu-tooltip--visible { opacity: 1;