From 6d68b71a4ead8de3b2717ca396d52aed9bd7fd61 Mon Sep 17 00:00:00 2001 From: Joan Gil Date: Thu, 9 Jan 2025 15:48:03 -0300 Subject: [PATCH] feat(utilities): NO-JIRA add intrinsic size classes for width (#594) --- apps/dialtone-documentation/docs/_data/width-height.json | 2 +- .../dialtone-css/lib/build/less/utilities/sizing.less | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/dialtone-documentation/docs/_data/width-height.json b/apps/dialtone-documentation/docs/_data/width-height.json index d8aafc5766..2acf6626b8 100644 --- a/apps/dialtone-documentation/docs/_data/width-height.json +++ b/apps/dialtone-documentation/docs/_data/width-height.json @@ -1,5 +1,5 @@ { "percentage": [10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100], "fixed": [0, 1, 2, 4, 6, 8, 12, 16, 24, 32, 42, 48, 64, 72, 84, 96, 102, 114, 128, 164, 216, 264, 332, 464, 512, 628, 764, 828, 912, 1024, 1140, 1268, 1340], - "other": ["auto", "unset"] + "other": ["auto", "unset", "fit-content", "max-content", "min-content"] } diff --git a/packages/dialtone-css/lib/build/less/utilities/sizing.less b/packages/dialtone-css/lib/build/less/utilities/sizing.less index 72995d0150..9379e2cb66 100644 --- a/packages/dialtone-css/lib/build/less/utilities/sizing.less +++ b/packages/dialtone-css/lib/build/less/utilities/sizing.less @@ -136,10 +136,16 @@ .d-w100vw { width: 100vw !important; } .d-w-auto { width: auto !important; } .d-w-unset { width: unset !important; } +.d-w-fit-content { width: fit-content !important; } +.d-w-max-content { width: max-content !important; } +.d-w-min-content { width: min-content !important; } .d-wmn60ch { min-width: 60ch !important; } .d-wmn75ch { min-width: 75ch !important; } .d-wmn90ch { min-width: 90ch !important; } +.d-wmn-fit-content { min-width: fit-content !important; } +.d-wmn-max-content { min-width: max-content !important; } +.d-wmn-min-content { min-width: min-content !important; } .d-wmn-auto { min-width: auto !important; } .d-wmn-unset { min-width: unset !important; } @@ -150,3 +156,6 @@ .d-wmx-auto { max-width: auto !important; } .d-wmx-unset { max-width: unset !important; } +.d-wmx-fit-content { max-width: fit-content !important; } +.d-wmx-max-content { max-width: max-content !important; } +.d-wmx-min-content { max-width: min-content !important; }