Skip to content

Commit e26a9fc

Browse files
willshowelljelbourn
authored andcommittedOct 26, 2017
fix(example-viewer): don't wrap code samples (#289)
1 parent 90ef7c1 commit e26a9fc

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
@import '../../../styles/constants';
22

33
component-overview {
4+
display: flex;
5+
align-items: flex-start;
6+
47
@media (max-width: $small-breakpoint-width) {
5-
display: flex;
68
flex-direction: column;
79
}
810
}

‎material.angular.io/src/app/pages/component-viewer/component-viewer.scss

-3
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@ app-component-viewer {
2828
min-height: 500px;
2929

3030
table-of-contents {
31-
display: inline-flex;
3231
top: 35px;
3332

3433
@media (max-width: $small-breakpoint-width) {
35-
display: flex;
3634
order: -1;
3735
position: inherit;
3836
width: auto;
@@ -41,7 +39,6 @@ app-component-viewer {
4139
}
4240

4341
.docs-component-view-text-content {
44-
display: inline-flex;
4542
flex-grow: 1;
4643
}
4744

‎material.angular.io/src/app/shared/example-viewer/_example-viewer-theme.scss

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
.docs-example-source {
3131
border-bottom: 1px solid mat-color($foreground, divider);
32+
overflow-x: scroll;
3233
}
3334
}
3435
}

‎material.angular.io/src/styles/_general.scss

-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ h1, h2 {
1111
font-weight: 400;
1212
}
1313

14-
pre {
15-
// Pre elements won't wrap text by default and can exceed the boundaries of their parent element.
16-
// This adds extra scroll space when visiting the docs mobile. Pre-wrapping the code examples
17-
// will ensure that the code never exceeds the page width.
18-
white-space: pre-wrap;
19-
}
20-
2114
.docs-primary-header {
2215
padding-left: 20px;
2316

0 commit comments

Comments
 (0)
Please sign in to comment.