Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test result wrapping in web runner #1031

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions mocha.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ body {
margin: 60px 50px;
}

#mocha ul, #mocha li {
#mocha ul,
#mocha li {
margin: 0;
padding: 0;
}
Expand All @@ -18,7 +19,8 @@ body {
list-style: none;
}

#mocha h1, #mocha h2 {
#mocha h1,
#mocha h2 {
margin: 0;
}

Expand Down Expand Up @@ -67,11 +69,11 @@ body {
}

#mocha .test.pass.medium .duration {
background: #C09853;
background: #c09853;
}

#mocha .test.pass.slow .duration {
background: #B94A48;
background: #b94a48;
}

#mocha .test.pass::before {
Expand All @@ -87,7 +89,7 @@ body {
font-size: 9px;
margin-left: 5px;
padding: 2px 5px;
color: white;
color: #fff;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
Expand Down Expand Up @@ -134,6 +136,11 @@ body {
overflow: auto;
}

/**
* (1): approximate for browsers not supporting calc
* (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border)
* ^^ seriously
*/
#mocha .test pre {
display: block;
float: left;
Expand All @@ -142,6 +149,9 @@ body {
margin: 5px;
padding: 15px;
border: 1px solid #eee;
max-width: 85%; /*(1)*/
max-width: calc(100% - 42px); /*(2)*/
word-wrap: break-word;
border-bottom-color: #ddd;
-webkit-border-radius: 3px;
-webkit-box-shadow: 0 1px 3px #eee;
Expand Down Expand Up @@ -243,14 +253,14 @@ body {
height: 40px;
}

#mocha code .comment { color: #ddd }
#mocha code .init { color: #2F6FAD }
#mocha code .string { color: #5890AD }
#mocha code .keyword { color: #8A6343 }
#mocha code .number { color: #2F6FAD }
#mocha code .comment { color: #ddd; }
#mocha code .init { color: #2f6fad; }
#mocha code .string { color: #5890ad; }
#mocha code .keyword { color: #8a6343; }
#mocha code .number { color: #2f6fad; }

@media screen and (max-device-width: 480px) {
#mocha {
#mocha {
margin: 60px 0px;
}

Expand Down