From 04b641c82bdff757f6f59ebdbeea8ad893fa0dc4 Mon Sep 17 00:00:00 2001 From: kenji-ishii Date: Thu, 26 Nov 2015 22:10:52 +0900 Subject: [PATCH] Add style to wrap pre tag At the moment width of pre tag depend on the length of a line in the contents. Therefore, if a line in the contents is too long, layout will be collapsed. I added a style and it was to fit in the area. Change-Id: I2ae833051dbb3e2d552c5fd1d7c6dc43da7aa1f5 Closes-Bug: #1520049 --- .../templates/metadata_defs/_detail_contents.html | 7 ++++--- .../static/dashboard/scss/_util.scss | 13 ++++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/openstack_dashboard/dashboards/admin/metadata_defs/templates/metadata_defs/_detail_contents.html b/openstack_dashboard/dashboards/admin/metadata_defs/templates/metadata_defs/_detail_contents.html index 5c328bfa5f..2a4da61369 100644 --- a/openstack_dashboard/dashboards/admin/metadata_defs/templates/metadata_defs/_detail_contents.html +++ b/openstack_dashboard/dashboards/admin/metadata_defs/templates/metadata_defs/_detail_contents.html @@ -1,5 +1,6 @@ {% load i18n %} -
-  {{ namespace_contents }}
-
+
+
{{ namespace_contents }}
+
+ diff --git a/openstack_dashboard/static/dashboard/scss/_util.scss b/openstack_dashboard/static/dashboard/scss/_util.scss index cf1fc4fa5c..a2a44b31ec 100644 --- a/openstack_dashboard/static/dashboard/scss/_util.scss +++ b/openstack_dashboard/static/dashboard/scss/_util.scss @@ -4,4 +4,15 @@ .horizontal-center { float: none; margin: 0 auto; -} \ No newline at end of file +} + +// Used to x-scroll to Pre-formatted text. +.pre_scrollable { + display: table; + table-layout: fixed; + width: 100%; + + pre { + word-wrap: normal; + } +}