|
8 | 8 | * code, annotations, and more.
|
9 | 9 | */
|
10 | 10 | .pl-c-pattern-info {
|
11 |
| - @media all and (min-width: $pl-bp-large) { |
12 |
| - display: flex; |
13 |
| - } |
| 11 | + flex-grow: 1; // fills space available when placed in the parent flex container |
| 12 | + display: flex; |
| 13 | + flex-direction: row; |
| 14 | + flex-flow: row wrap; |
| 15 | + width: 100%; |
| 16 | + overflow: auto; |
| 17 | + -webkit-overflow-scrolling: touch; |
14 | 18 |
|
15 | 19 | /**
|
16 | 20 | * Pattern info inside the "view all" template
|
17 | 21 | */
|
18 | 22 | .pl-c-pattern & {
|
19 | 23 | max-height: 20rem;
|
| 24 | + min-height: 18rem; |
20 | 25 | overflow: scroll;
|
21 | 26 | @include hideScrollBar();
|
| 27 | + display: flex; |
| 28 | + -webkit-overflow-scrolling: touch; |
22 | 29 |
|
23 | 30 | @media all and (min-width: $pl-bp-large) {
|
24 | 31 | max-height: none;
|
25 | 32 | height: 18rem;
|
26 | 33 | overflow: visible;
|
27 | 34 | }
|
28 | 35 | }
|
29 |
| - |
30 |
| - /** |
31 |
| - * Pattern info inside modal |
32 |
| - */ |
33 |
| - .pl-c-modal & { |
34 |
| - position: absolute; |
35 |
| - top: 0; |
36 |
| - right: 0; |
37 |
| - bottom: 0; |
38 |
| - left: 0; |
39 |
| - overflow: scroll; |
40 |
| - @include hideScrollBar(); |
41 |
| - |
42 |
| - @media all and (min-width: $pl-bp-large) { |
43 |
| - position: static; |
44 |
| - overflow: visible; |
45 |
| - } |
46 |
| - } |
47 | 36 | }
|
48 | 37 |
|
49 | 38 | /**
|
|
52 | 41 | * Right side contains pattern code
|
53 | 42 | */
|
54 | 43 | .pl-c-pattern-info__panel {
|
55 |
| - padding: 1rem; |
56 |
| - |
57 |
| - @media all and (min-width: $pl-bp-med) { |
58 |
| - padding-right: 2.3rem; |
59 |
| - } |
60 |
| - |
61 |
| - @media all and (min-width: $pl-bp-large) { |
62 |
| - flex: auto; |
63 |
| - position: absolute; |
64 |
| - top: 0; |
65 |
| - bottom: 0; |
66 |
| - left: 0; |
67 |
| - right: 1.3rem; |
68 |
| - padding-right: 0; |
69 |
| - } |
70 |
| - |
71 |
| - .pl-c-modal & { |
72 |
| - @media all and (min-width: $pl-bp-xl) { |
73 |
| - right: 0; |
74 |
| - padding-left: 2rem; |
75 |
| - padding-right: 2.5rem; |
76 |
| - } |
77 |
| - } |
78 |
| -} |
79 |
| - |
80 |
| -/** |
81 |
| - * Pattern Info Panel |
82 |
| - * 1) Left panel that contains pattern title, lineage, description, annotations |
83 |
| - */ |
84 |
| -.pl-c-pattern-info__panel--info { |
85 |
| - padding-top: 2rem; |
86 |
| - |
87 |
| - @media all and (min-width: $pl-bp-large) { |
88 |
| - left: 0; |
89 |
| - right: 50%; |
90 |
| - overflow: scroll; |
91 |
| - @include hideScrollBar(); |
92 |
| - } |
93 |
| - |
94 |
| - @media all and (min-width: $pl-bp-xl) { |
95 |
| - right: 55%; |
96 |
| - } |
97 |
| -} |
98 |
| - |
99 |
| -/** |
100 |
| - * Pattern Code Panel |
101 |
| - * 1) Right panel that displays the pattern's code (found in _tabs.scss) |
102 |
| - * 2) Using a sibling selector because the pattern info isn't always present. |
103 |
| - * The sibling selector allows the code panel to occupy the full width of |
104 |
| - * the modal |
105 |
| - * 1) Cap the height of the code panel in the modal |
106 |
| - */ |
107 |
| -.pl-c-pattern-info__panel--info + .pl-c-pattern-info__panel--code { |
108 |
| - @media all and (min-width: $pl-bp-large) { |
109 |
| - right: 0; |
110 |
| - left: 50%; |
111 |
| - top: 1.2rem; |
112 |
| - } |
113 |
| - |
114 |
| - @media all and (min-width: $pl-bp-xl) { |
115 |
| - left: 45%; |
116 |
| - } |
| 44 | + flex-basis: 40%; // fills up 100% if only one panel exists. using 40% vs 50% due to quirky behavior in IE 11 |
| 45 | + padding-top: 1rem; |
| 46 | + padding-right: 1rem; |
| 47 | + padding-bottom: 0; |
| 48 | + padding-left: 1rem; |
| 49 | + margin-bottom: 1rem; |
| 50 | + flex-grow: 1; |
| 51 | + max-width: 100%; |
| 52 | + min-width: 300px; // so panels stack automatically |
| 53 | + display: inline-flex; |
| 54 | + flex-direction: column; |
| 55 | + overflow: auto; |
| 56 | + -webkit-overflow-scrolling: touch; |
117 | 57 | }
|
118 | 58 |
|
119 | 59 | /**
|
|
0 commit comments