Skip to content

Commit 7d4f4c9

Browse files
committed
float and aside style fixes
1 parent 854396b commit 7d4f4c9

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

example/src/document.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,23 @@ export default function Reference() {
167167
Step 2: Create `navigation`
168168
---------------------------
169169

170+
<Doc.Float minWidth='50%'>
171+
<Doc.Gutter>
172+
<div style={{ border: '2px solid green' }}>
173+
<header>
174+
<Doc.Gutter half>
175+
<h4>Test</h4>
176+
</Doc.Gutter>
177+
</header>
178+
<Doc.Gutter half>
179+
180+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
181+
182+
</Doc.Gutter>
183+
</div>
184+
</Doc.Gutter>
185+
</Doc.Float>
186+
170187
Navi does all of the hard work within a `Navigation` object. This is where Navi watches for history events, matches URLs to pages and content, and turns all of this info into an object that you can use.
171188

172189
To create a `Navigation`, just call `createBrowserNavigation()` within `index.js`, passing in the `pages` object that you defined earlier. Once you have a `Navigation`, just wait for its initial content to become available -- and then render it!

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@frontarm/doc",
3-
"version": "0.4.1",
3+
"version": "0.4.2",
44
"description": "A set of components for creating rich, responsive documents built around MDX.",
55
"author": "James K Nelson <[email protected]>",
66
"license": "MIT",

src/DocLayout.module.scss

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,16 @@
9797
}
9898

9999
// When a gutter is manually specified around a block, use that instead
100-
// of applying gutter styles -- but still use the specified max width
101-
// -- even if inside an Aside.
102-
.Gutter & {
103-
@include when-twin-column {
100+
// of applying gutter styles.
101+
@include when-twin-column {
102+
.Gutter & {
104103
margin-left: 0;
105104
margin-right: 0;
106105
}
106+
.Aside .Gutter &,
107+
.Float .Gutter & {
108+
width: 100%;
109+
}
107110
}
108111
}
109112

0 commit comments

Comments
 (0)