Skip to content

Commit be99353

Browse files
author
OpenShift Bot
authoredNov 21, 2016
Merge pull request #842 from benjaminapetersen/word-break-all-doc
Merged by openshift-bot
2 parents 9686826 + 4326c34 commit be99353

File tree

2 files changed

+40
-22
lines changed

2 files changed

+40
-22
lines changed
 

‎app/styles/_mixins.less

+30-13
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,42 @@
3939
}
4040

4141
// word-break and word-break-all test cases http://codepen.io/sg00dwin/pen/WwKMmP
42-
43-
.word-break-all {
44-
// USAGE: Breaks long non-breaking strings if within a table not set to table-layout: fixed, fieldset or a flex container only eg <div style="display:flex"><div class="word-break-all">...
45-
// Guarantees the string will wrap. word-break: break-all; is used by firefox and IE to break in the usage cases.
46-
// https://bugzilla.mozilla.org/show_bug.cgi?id=587438, https://bugzilla.mozilla.org/show_bug.cgi?id=1136818
47-
word-break: break-all; // firefox, IE
48-
word-break: break-word; // non-standard for webkit
49-
overflow-wrap: break-word; // new name as per the CSS3 spec
50-
}
51-
42+
//
43+
// DESCRIPTION: Breaks long non-breaking strings within a div or a flexed item that is within a flex container
44+
// EXAMPLE:
45+
// <div style="display:flex">
46+
// <div style="flex:1" class="word-break">...
47+
// </div>
48+
// An unbreakable "word" may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line.
49+
// (1) https://bugzilla.mozilla.org/show_bug.cgi?id=1136818#c2
50+
// USAGE:
51+
// - DO choose to use over word-break-all if at all possible
5252
.word-break {
53-
// USAGE: Breaks long non-breaking strings within a div or a flexed item that is within a flex container eg <div style="display:flex"><div style="flex:1" class="word-break">...
54-
// An unbreakable "word" may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line.
55-
// (1) https://bugzilla.mozilla.org/show_bug.cgi?id=1136818#c2
5653
word-wrap: break-word; // firefox, IE
5754
word-break: break-word; // non-standard for webkit
5855
overflow-wrap: break-word; // new name as per the CSS3 spec
5956
min-width: 0; // firefox (1)
6057
}
58+
// DESCRIPTION: Breaks long non-breaking strings under the following circumstances:
59+
// - if within a table not set to table-layout: fixed
60+
// - fieldset
61+
// - flex container
62+
// EXAMPLE:
63+
// <div style="display:flex">
64+
// <div class="word-break-all">...
65+
// </div>
66+
// Guarantees the string will wrap. word-break: break-all; is used by firefox and IE to break in the usage cases.
67+
// https://bugzilla.mozilla.org/show_bug.cgi?id=587438, https://bugzilla.mozilla.org/show_bug.cgi?id=1136818
68+
// USAGE:
69+
// This class will break normal words in awkward places. Therefore:
70+
// - DO use for shas or other long identifiers that are arbitrary
71+
// - DO NOT use in any other case such as paragraph text, descriptions, titles, project names, etc.
72+
// opt for 'word-break' below
73+
.word-break-all {
74+
word-break: break-all; // firefox, IE
75+
word-break: break-word; // non-standard for webkit
76+
overflow-wrap: break-word; // new name as per the CSS3 spec
77+
}
6178

6279
// Sequences of whitespace are preserved. Lines are broken at newline
6380
// characters, at <br>, and as necessary to fill line boxes.

‎dist/styles/main.css

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.ie9.layout-pf-alt-fixed .nav-pf-vertical-alt,.ie9.layout-pf-fixed .nav-pf-secondary-nav,.ie9.layout-pf-fixed .nav-pf-tertiary-nav,.ie9.layout-pf-fixed .nav-pf-vertical,hr{box-sizing:content-box}
22
div.code,pre,textarea{overflow:auto}
33
.text-left,caption,th{text-align:left}
4+
.btn,.datepicker table{-moz-user-select:none;-webkit-user-select:none}
45
.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}
56
.c3 svg,html{-webkit-tap-highlight-color:transparent}
67
.list-view-pf-top-align .list-view-pf-actions,.list-view-pf-top-align .list-view-pf-checkbox{align-self:flex-start}
@@ -761,7 +762,7 @@ select[multiple].input-lg,textarea.input-lg{height:auto}
761762
@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:7px;font-size:15px}
762763
.form-horizontal .form-group-sm .control-label{padding-top:3px;font-size:11px}
763764
}
764-
.btn{display:inline-block;margin-bottom:0;font-weight:600;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:2px 6px;font-size:13px;line-height:1.66666667;border-radius:1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
765+
.btn{display:inline-block;margin-bottom:0;font-weight:600;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:2px 6px;font-size:13px;line-height:1.66666667;border-radius:1px;-ms-user-select:none;user-select:none}
765766
.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin!important;outline:-webkit-focus-ring-color auto 5px!important;outline-offset:-2px!important}
766767
.btn.focus,.btn:focus,.btn:hover{color:#4d5258;text-decoration:none}
767768
.btn.active,.btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}
@@ -946,7 +947,7 @@ select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.i
946947
.navbar-collapse.in{overflow-y:visible}
947948
.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0}
948949
}
949-
.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}
950+
.carousel-inner,.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}
950951
@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}
951952
}
952953
.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-20px;margin-left:-20px}
@@ -1266,7 +1267,7 @@ a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-gro
12661267
.well-lg{padding:24px}
12671268
.well-sm{padding:9px}
12681269
.close{float:right;font-size:19.5px;color:#000}
1269-
.popover,.tooltip{font-family:"Open Sans",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;text-decoration:none}
1270+
.popover,.tooltip{font-family:"Open Sans",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;text-decoration:none}
12701271
.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer}
12711272
button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}
12721273
.modal-content,.popover{background-clip:padding-box}
@@ -1294,7 +1295,7 @@ button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance
12941295
.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-8px;border-width:8px 8px 0;border-top-color:#111}
12951296
@media (min-width:992px){.modal-lg{width:900px}
12961297
}
1297-
.tooltip{position:absolute;z-index:1070;display:block;text-align:left;text-align:start;word-wrap:normal;opacity:0;filter:alpha(opacity=0)}
1298+
.tooltip{position:absolute;z-index:1070;display:block;text-align:left;text-align:start;text-shadow:none;word-wrap:normal;opacity:0;filter:alpha(opacity=0)}
12981299
.tooltip.in{opacity:.9;filter:alpha(opacity=90)}
12991300
.tooltip.top{margin-top:-3px;padding:8px 0}
13001301
.tooltip.right{margin-left:3px;padding:0 8px}
@@ -1311,7 +1312,7 @@ button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance
13111312
.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-8px}
13121313
.tooltip.bottom-left .tooltip-arrow{right:8px;margin-top:-8px}
13131314
.tooltip.bottom-right .tooltip-arrow{left:8px;margin-top:-8px}
1314-
.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:220px;text-align:left;text-align:start;background-color:#fff;border:1px solid #bbb;border-radius:1px}
1315+
.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:220px;text-align:left;text-align:start;text-shadow:none;background-color:#fff;border:1px solid #bbb;border-radius:1px}
13151316
.carousel-caption,.carousel-control{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);text-align:center}
13161317
.popover.top{margin-top:-10px}
13171318
.popover.right{margin-left:10px}
@@ -1331,7 +1332,7 @@ button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance
13311332
.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}
13321333
.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#bbb}
13331334
.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}
1334-
.carousel-inner{overflow:hidden;width:100%}
1335+
.carousel-inner{width:100%}
13351336
.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}
13361337
@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-moz-transition:-moz-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;-moz-perspective:1000px;perspective:1000px}
13371338
.carousel-inner>.item.active.right,.carousel-inner>.item.next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);left:0}
@@ -2290,7 +2291,7 @@ td>.progress:first-child:last-child{margin-bottom:0;margin-top:3px}
22902291
.datepicker-dropdown.datepicker-orient-bottom:after{top:-6px}
22912292
.datepicker-dropdown.datepicker-orient-top:before{bottom:-7px;border-bottom:0;border-top:7px solid #bbb}
22922293
.datepicker-dropdown.datepicker-orient-top:after{bottom:-6px;border-bottom:0;border-top:6px solid #fff}
2293-
.datepicker table{margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
2294+
.datepicker table{margin:0;-webkit-touch-callout:none;-khtml-user-select:none;-ms-user-select:none;user-select:none}
22942295
.datepicker table tr td,.datepicker table tr th{text-align:center;width:30px;height:30px;border:none}
22952296
.datepicker table tr td.new,.datepicker table tr td.old{color:#9c9c9c}
22962297
.datepicker table tr td.day:hover,.datepicker table tr td.focused{background:#f1f1f1;cursor:pointer}
@@ -3559,9 +3560,9 @@ to{transform:rotate(359deg)}
35593560
.key-value-editor .key-value-editor-buttons{position:absolute;right:0;top:0;width:52px}
35603561
.key-value-editor .key-value-editor-entry{display:table;padding-right:52px;position:relative;width:100%}
35613562
.key-value-editor .key-value-editor-header,.key-value-editor .key-value-editor-input{float:left;padding-right:5px;width:50%}
3563+
.word-break{word-wrap:break-word;word-break:break-word;overflow-wrap:break-word;min-width:0}
35623564
.word-break-all{word-break:break-all;word-break:break-word;overflow-wrap:break-word}
3563-
.modal-resource-action h1,.resource-description,.row-cards-pf-flex .card-pf-body p,.word-break{word-wrap:break-word;word-break:break-word}
3564-
.word-break{overflow-wrap:break-word;min-width:0}
3565+
.modal-resource-action h1,.resource-description,.row-cards-pf-flex .card-pf-body p{word-wrap:break-word;word-break:break-word}
35653566
.pre-wrap{white-space:pre-wrap}
35663567
.visible-xlg-inline-block{display:none!important}
35673568
@media (max-width:767px){.td-long-string{word-wrap:break-word;word-break:break-word;overflow-wrap:break-word;min-width:0}

0 commit comments

Comments
 (0)
Please sign in to comment.