KineticJS icon indicating copy to clipboard operation
KineticJS copied to clipboard

Display: inline-block

Open fghibellini opened this issue 11 years ago • 4 comments

issue shows up when you try to make a full screen stage.

the .kineticjs-content element has the css property display set to inline-block. When you try to set the stage the same size of the window there will always be some space under the .kineticjs-content element causing the display of scrollbars, because the inline-block element sits on the baseline of the container (this behaviour is needed for displaying font descenders).

quick-fix: add css rule .kineticjs-content { display: block !important; } or .kineticjs-content { vertical-align: top !important; } to your stylesheet

this is not really a bug but i was wondering why the .kineticjs-content element is displayed as inline-block, and i thought it should be noted somewhere becouse it took me quite a while to figure out where the extra space is coming from.

fghibellini avatar Jul 31 '13 13:07 fghibellini

Yeah ran into this too. Anyone want to comment on what the inline-block style is for?

chrisnicola avatar Nov 18 '13 23:11 chrisnicola

Another quick fix would be to add font-size: 0 or line-height: 0 to the container you pass to the stage.

Wexcode avatar Feb 12 '14 20:02 Wexcode

Can confirm this issue too (v5.1.0), my container is 5px higher than .kineticjs-content. line-height: 0 or setting .kineticjs-content to display: block works.

Also wondering why it has to be an inline-block?

jonathanazulay avatar Jul 04 '14 10:07 jonathanazulay

Can this be fixed on KineticJS side? I get scrollbars on fullscreen canvas.

pronebird avatar Aug 28 '14 12:08 pronebird