diff --git a/src/components/void.js b/src/components/void.js
index 829321b21..a1c445aa3 100644
--- a/src/components/void.js
+++ b/src/components/void.js
@@ -86,11 +86,20 @@ class Void extends React.Component {
render = () => {
const { props } = this
const { children, node } = props
- const Tag = node.kind == 'block' ? 'div' : 'span'
+ let Tag, style
// Make the outer wrapper relative, so the spacer can overlay it.
- const style = {
- position: 'relative'
+ if (node.kind === 'block') {
+ Tag = 'div'
+ style = {
+ position: 'relative'
+ }
+ } else {
+ Tag = 'span'
+ style = {
+ display: 'inline-block',
+ position: 'relative'
+ }
}
this.debug('render', { props })
diff --git a/test/rendering/fixtures/custom-inline-void/output.html b/test/rendering/fixtures/custom-inline-void/output.html
index 74bb6534e..162ab00cd 100644
--- a/test/rendering/fixtures/custom-inline-void/output.html
+++ b/test/rendering/fixtures/custom-inline-void/output.html
@@ -6,7 +6,7 @@
-
+