Density
Usable — may still change
Coarse density makes everything inside it ×1.5 bigger — text, icons, controls, gaps, corners and touch targets — so it can be operated with gloves or on screens where browser zoom is not available. Borders, breakpoints and shadows keep their size.
<div class="tng-group gap-2xl"> <button class="tng-button is-primary">Confirm</button> <div data-density="coarse"> <button class="tng-button is-primary">Confirm</button> </div></div>Load the brand’s density sheet next to the styleguide. It changes nothing until you switch it on.
<link rel="stylesheet" href="@tmedxp/styleguide/toyota/styles.css" /><link rel="stylesheet" href="@tmedxp/styleguide/toyota/density.css" />Whole page or one area
Section titled “Whole page or one area”Set data-density="coarse" on <html> to scale the whole page:
<html data-brand="toyota" data-density="coarse"> ...</html>Or set it on any container to scale only what is inside it:
<form data-density="coarse">...</form>Scale the whole page when every screen is operated by touch. Scale one area when a screen mixes controls with dense data: coarse density takes about a third more room, so a table shows fewer rows and wide tables scroll sooner. Keep the controls coarse and the data at its normal size.
Factor
Section titled “Factor”The factor is --tng-density-scale, 1.5 by default. Set it on the same element as data-density to use a different factor:
[data-density='coarse'] { --tng-density-scale: 1.25;}