Skip to content

Commit d5ff763

Browse files
committed
Merge pull request #917 from webcompat/comment-overflow
fix #913 - fixed overflow <code> and <pre>
2 parents 16140a2 + 8ab1e33 commit d5ff763

File tree

2 files changed

+62
-58
lines changed

2 files changed

+62
-58
lines changed

webcompat/static/css/development/components/comment.css

+62-5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
position: relative;
4343
flex: 1;
4444
margin-left:.8em;
45+
max-width: calc(100% - 59px);
4546
}
4647

4748
@media all and (max-width: 61.87em) {
@@ -78,7 +79,7 @@
7879
min-height: 128px;
7980
border: solid 1px var(--Comment-color);
8081
border-radius: 10px;
81-
padding: 0 1em 2em 1em;
82+
padding: 0 0 2em;
8283
word-wrap: break-word;
8384
background : #fff;
8485
}
@@ -101,8 +102,7 @@
101102
.wc-Comment-header {
102103
border-radius: 10px 10px 0 0;
103104
background-color: #f0f0f0;
104-
padding:.8em 1em;
105-
margin: 0 -1em;
105+
padding: .8em 0 .8em 1em;
106106
}
107107

108108
/* Name of owner */
@@ -115,14 +115,63 @@
115115
position: relative;
116116
word-wrap: break-word;
117117
padding:.5em .5em 0;
118-
overflow-x: auto;
119-
overflow-y: hidden;
118+
/*overflow-x: auto;
119+
overflow-y: hidden;*/
120120
}
121121

122122
/*
123123
*overide all style from Github Text
124124
*/
125125

126+
.wc-Comment-content .is-hidden {
127+
display: none;
128+
}
129+
130+
/* force font-size */
131+
.wc-Comment-content * {
132+
font-size:1em !important;
133+
}
134+
135+
.wc-Issue-details a {
136+
color: var(--Issue-detailLink);
137+
text-decoration: underline;
138+
}
139+
140+
/* event */
141+
.wc-Comment-content a:hover,
142+
.wc-Comment-content a:focus {
143+
color: var(--Issue-detailLinkHover);
144+
text-decoration: none;
145+
}
146+
147+
.wc-Comment-content strong {
148+
font-weight: bold !important;
149+
}
150+
151+
.wc-Comment-content img {
152+
max-width: 100%;
153+
max-height: 100%;
154+
}
155+
156+
.wc-Comment-content code {
157+
font-family: monospace;
158+
font-size: 90%;
159+
}
160+
161+
.wc-Comment-content p > code {
162+
color: inherit;
163+
background-color: #F5F5F5;
164+
padding: 0.25em;
165+
}
166+
167+
.wc-Issue-details li {
168+
margin-bottom: 1em;
169+
}
170+
171+
.wc-Issue-details p {
172+
margin-bottom: 1em;
173+
}
174+
126175
/* list style */
127176
.wc-Comment-content ul,
128177
.wc-Comment-content ol {
@@ -148,6 +197,10 @@
148197
padding: 0;
149198
}
150199

200+
.wc-Comment-content p > code {
201+
white-space: normal;
202+
}
203+
151204
/* title */
152205
.wc-Comment-content h1 {
153206
font-size: 2em;
@@ -174,6 +227,10 @@
174227
max-height: 100%;
175228
}
176229

230+
.wc-Comment-content p {
231+
overflow: hidden;
232+
}
233+
177234
/* paragraph */
178235
.wc-Comment-content p + p {
179236
font-size: 1em;

webcompat/static/css/development/components/issue.css

-53
Original file line numberDiff line numberDiff line change
@@ -83,63 +83,10 @@
8383

8484
/* container details issue */
8585
.wc-Issue-details {
86-
word-wrap: break-word;
87-
overflow: hidden;
8886
position: relative;
8987
line-height: 1.5em;
9088
}
9189

92-
.wc-Issue-details > *.is-hidden {
93-
display: none;
94-
}
95-
96-
/* force font-size */
97-
.wc-Issue-details * {
98-
font-size:1em !important;
99-
}
100-
101-
.wc-Issue-details a {
102-
color: var(--Issue-detailLink);
103-
text-decoration: underline;
104-
}
105-
106-
/* event */
107-
.wc-Issue-details a:hover,
108-
.wc-Issue-details a:focus {
109-
color: var(--Issue-detailLinkHover);
110-
text-decoration: none;
111-
}
112-
113-
.wc-Issue-details strong {
114-
font-weight: bold !important;
115-
}
116-
117-
.wc-Issue-details img {
118-
max-width: 100%;
119-
max-height: 100%;
120-
}
121-
122-
.wc-Issue-details code,
123-
.wc-Comment-content code {
124-
font-family: monospace;
125-
font-size: 90%;
126-
}
127-
128-
.wc-Issue-details p > code,
129-
.wc-Comment-content p > code {
130-
color: inherit;
131-
background-color: #F5F5F5;
132-
padding: 0.25em;
133-
}
134-
135-
.wc-Issue-details li {
136-
margin-bottom: 1em;
137-
}
138-
139-
.wc-Issue-details p {
140-
margin-bottom: 1em;
141-
}
142-
14390
.wc-Issue-comment {
14491
margin-top:2em;
14592
}

0 commit comments

Comments
 (0)