Template:Gap/testcases

From Wikisource
Jump to navigation Jump to search

Testing main template[edit]

{{Gap}}

Testing sandbox version[edit]

{{Gap/sandbox}}

 

Gap test 01[edit]

Testing main with inline-block and width[edit]

"Hey{{Gap}}World"

"HeyWorld"

Within larger paragraph

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Aenean commodo ligula eget dolor.

"Hey{{Gap|4em}}World"

"HeyWorld"

Testing sandbox with inline and word spacing[edit]

"Hey{{Gap/sandbox}}World"

"Hey World"

Within larger paragraph

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Aenean commodo ligula eget dolor.

"Hey{{Gap/sandbox|4}}World"

"Hey World"

Results[edit]

Gap based on setting display to inline-block and a unit-length for width causes normal span line height to expand to entire height of block, affecting the line spacing / padding of lines above and below the line where the template is used. Especially problematic when span gap starts / ends a container such as paragraphs or for short phrases with no chance of line wrap

Gap based on setting display to inline (default) and a unit-length for word spacing can mimic main template results without affecting line-height whatsoever. No issues when used at the start / end of a containing element or short phrases either.