question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

void blocks have space above

See original GitHub issue

Hey, as you can see here: http://slatejs.org/#/embeds, blocks have spaces above, due to the data-slate-void > span elements that have some inline styles. If all these inline styles display: inline-block; vertical-align: top; width: 0px; height: 0px; color: transparent; are changed to only position: "absolute", things work pretty good.

ps. Why do we need these inline styles forced? Would it be possible to introduce a flag (stylingMode="className") to allow styling these via css for example`?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ianstormtaylorcommented, Oct 14, 2017

@bkniffler good point, dunno what I was thinking. I pushed another release that totally omits the spacer, and added some read-only rendering tests to prevent it from breaking in the future hopefully.

0reactions
bknifflercommented, Oct 14, 2017

Thanks for the fix! But in readOnly, the data-slate-void will now contain:

<div data-slate-void="true" data-key="462">
  <div>
    <span data-key="463">
      <span data-offset-key="463-0"> </span>
    </span>
  </div>
  <div contentEditable="false">
....

and thus have a space again (only in readOnly).

Is this somehow necessary? Could we get rid of the first div?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Void - Minecraft Wiki
The void as shown beneath the Overworld. The void is the name given to the empty space external to the world in any...
Read more >
Structure Voids no longer hold up gravel and sand - Jira
The structure void blocks water, cannot be waterlogged, and can have torches, item frames, etcetera placed on it, so it does not act...
Read more >
Is there a better way to handle void nodes? · Issue #667
From my understanding, void nodes are represented as a block node that contains a single character (with void set to true). When the...
Read more >
I think Mojang forgot to remove a Structure Void : r/Minecraft
Barrier blocks are invisible blocks that players couldn't go through. It acts like a normal block but cannot be broken in any way...
Read more >
To Build Below Bedrock (Into The Void): To Pass The Limits
It has been said a million times that one cannot build blocks pass or below the limits. The closest thing known, at least...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found