You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently only line heights with unit PIXELS can be generated in all three possible generation modes (inferred, arbitrary, variable). See details for the possible types here.
If the unit is percent we only allow generating in arbitrary mode. We should support the other two generation modes as well!
The unit could be "PIXELS" | "PERCENT" | "AUTO" and it should be possible to output utility values also for inference & tokens mode.
Currently only line heights with unit
PIXELS
can be generated in all three possible generation modes (inferred
,arbitrary
,variable
). See details for the possible types here.If the unit is percent we only allow generating in
arbitrary
mode. We should support the other two generation modes as well!The unit could be "PIXELS" | "PERCENT" | "AUTO" and it should be possible to output utility values also for inference & tokens mode.
Information
Possible generation modes:
https://github.com/MiguelFranken/onyx/blob/a03827c40994cbe1accec8eb404095070b6982b7/packages/code/src/builder/types.ts#L50-L54
Relevant method to change: https://github.com/MiguelFranken/onyx/blob/bc8e6aa7b4db03ab8654bce0383de2fbbd3f19a3/packages/code/src/builder/inference/line-height.ts#L6-L23
Tailwind utility class to generate:
https://tailwindcss.com/docs/line-height
Unitless line height value:
https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#number
Transform percent values to unitless-numbers
Input: Percent Line Height (e.g. 128%)
Step 1:
Transform 128% to Unitless Number.
Output:
1.28
Step 2 (Inference):
Get the nearest inferred value available in Tailwind.
Input: 1.28
Output: 1.25
Step 3 (Generate utility class):
leading-tight
Possible values:
The text was updated successfully, but these errors were encountered: