Open rkofman opened 1 year ago
@rkofman You are correct with the point 1 and guess it is the expected behaviour, that is at the best left as it is.
For the issue you are facing you can use HTML Entity (  -> non-breaking space) as below
<h3 class="card-header-title">Item <mark>match</mark>ing search</h3>
This is about Bulma. I believe this is a bug, but I may incorrect or it may be easier to fix as documentation.
Overview of the problem
This is about the Bulma CSS framework I'm using Bulma version [0.9.4] My browser is: Google Chrome Version
113.0.5672.92 (Official Build) (arm64)
I am sure this issue is not a duplicateDescription
When inline elements are used as direct children of a
card-header-title
, they will disrupt the inline flow of text and erase any adjoining whitespace. There are workaround, but if the behavior is expected, it could use better documentation.Steps to Reproduce
Expected behavior
There should be a single space between
Item
andmatching
:Actual behavior
The word "Item" runs right into "matching" with no whitespace:
Workarounds
One workaround is to wrap the contents of
card-header-title
in a separate element -- so that its children do not automatically become flex items. This causes extra markup, and is not mentioned anywhere in the documentation as a necessary step:Another workaround is to manually apply a
display: block
tocard-header-title
. e.g:Thoughts on causes (& potential fixes)
This behavior occurs because of
display:flex
oncard-header title
(link to code). One way to fix it would be to simply remove that line (and alsoalign-items: center
which would no longer be valid. However, this would break the ability to add.is-centered
as mentioned in the0.5.3
changelog.If the expectation is that
card-header-title
is a container for other elements that contain text and is not expected to contain text directly, the documentation should be updated to reflect this expectation. For example, the Card component docs could replace their<p class="card-header-title">Card header</p>
example with<div class="card-header-title"><p>Card header</p></div>
I am happy to submit a PR for either approach, but would like guidance (especially since solution # 1 would break existing functionality and need a bit more work to be less disruptive).