From 05ed2f7a73e1d132384057f78d2a63e3f8777d43 Mon Sep 17 00:00:00 2001 From: Bernhard Schmidt Date: Fri, 17 Jan 2020 14:33:06 -0800 Subject: [PATCH 1/6] fix: adding overflow-wrap to dropdown #451 --- components/menu/index.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/menu/index.css b/components/menu/index.css index 1ddf044693..638cf38362 100644 --- a/components/menu/index.css +++ b/components/menu/index.css @@ -115,7 +115,9 @@ governing permissions and limitations under the License. .spectrum-Menu-itemLabel { flex: 1 1 auto; line-height: var(--spectrum-selectlist-option-label-line-height); - word-break: break-all; + hyphens: auto; + overflow-wrap: break-word; + width: 80%; } .spectrum-Menu-itemLabel--wrapping { From 17c214b0d80955c09313f4f4e50572b487e06cdb Mon Sep 17 00:00:00 2001 From: Bernhard Schmidt Date: Wed, 22 Jan 2020 02:29:37 -0800 Subject: [PATCH 2/6] fix: using calc for width --- components/menu/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/menu/index.css b/components/menu/index.css index 638cf38362..76a1eea96e 100644 --- a/components/menu/index.css +++ b/components/menu/index.css @@ -117,7 +117,7 @@ governing permissions and limitations under the License. line-height: var(--spectrum-selectlist-option-label-line-height); hyphens: auto; overflow-wrap: break-word; - width: 80%; + width: calc(100% - (var(--spectrum-icon-checkmark-medium-width) + var(--spectrum-selectlist-option-icon-padding-x))); } .spectrum-Menu-itemLabel--wrapping { From 228259e7857903ba7274eae90aa1ee84842d1ef2 Mon Sep 17 00:00:00 2001 From: Bernhard Schmidt Date: Wed, 22 Jan 2020 16:07:03 -0800 Subject: [PATCH 3/6] docs: add long menu string examples --- components/dropdown/metadata/dropdown.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/dropdown/metadata/dropdown.yml b/components/dropdown/metadata/dropdown.yml index a06ef2d710..9264c5593c 100644 --- a/components/dropdown/metadata/dropdown.yml +++ b/components/dropdown/metadata/dropdown.yml @@ -18,7 +18,7 @@ examples:

Open