From 2482b16cfbd2120cd9dab5a738fc9c02c9b76c62 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Wed, 8 Jan 2020 13:34:21 +0100
Subject: [PATCH] Add a workaround for single selections not word wrapping

This makes responsivness of single selects work better.

See https://stackoverflow.com/questions/30788171/wrap-selected-text-with-select2

See https://gitlab.tugraz.at/VPU/Apps/Library/issues/42
---
 packages/common/styles.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/packages/common/styles.js b/packages/common/styles.js
index 1ad9c80b..41401414 100644
--- a/packages/common/styles.js
+++ b/packages/common/styles.js
@@ -647,5 +647,15 @@ export function getSelect2CSS() {
             font-weight: 300;
             /* color: red; */
         }
+
+        /* Work around single selections not wrapping and breaking responsivness */
+        .select2-container--default .select2-selection--single {
+            height: 100% !important;
+        }
+        .select2-container--default .select2-selection__rendered{
+            word-wrap: break-word !important;
+            text-overflow: inherit !important;
+            white-space: normal !important;
+        }
     `;
 }
-- 
GitLab