Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent spacing under form elements #3938

Open
Kehino opened this issue Nov 22, 2024 · 0 comments
Open

Inconsistent spacing under form elements #3938

Kehino opened this issue Nov 22, 2024 · 0 comments

Comments

@Kehino
Copy link

Kehino commented Nov 22, 2024

This is about Bulma. It is a feature request about a behavior that could be considered a bug.

Overview of the problem

This is about the Bulma CSS framework

I'm using Bulma version 1.0.2

I am sure this issue is not a duplicate.

Description

Screenshot 2024-11-22 at 00-46-55 Hello Bulma!

Screenshot 2024-11-22 at 00-46-47 Hello Bulma!

The top spacing of the help after nested fields within a field should be identical to the spacing under a control.

Steps to Reproduce

Full example

    <div class="field">
    <label class="label">Numéro de téléphone</label>
    <div class="control">
        <input class="input" type="tel" placeholder="Numéro de téléphone" />
    </div>
    <p class="help">Si votre numéro n'est pas un numéro français (+33), précisez l'indicatif. Celui-ci est uniquement utilisé pour la livraison.</p>
    </div>
    <div class="field">
    <label class="label">Dimensions</label>
    <div class="field is-grouped">
        <div class="control is-expanded">
            <div class="field has-addons">
                <div class="control">
                    <a class="button is-static">
                    Hauteur
                    </a>
                </div>
                <div class="control is-expanded">
                    <input class="input" type="text" value="56" />
                </div>
                <div class="control">
                    <a class="button is-static">
                    mm
                    </a>
                </div>
            </div>
        </div>
        <div class="control is-expanded">
        <div class="field has-addons">
            <div class="control">
                <a class="button is-static">
                Largeur
                </a>
            </div>
            <div class="control is-expanded">
                <input class="input" type="text" value="56" />
            </div>
            <div class="control">
                <a class="button is-static">
                mm
                </a>
            </div>
        </div>
        </div>
        <div class="control is-expanded">
        <div class="field has-addons">
            <div class="control">
                <a class="button is-static">
                Longueur
                </a>
            </div>
            <div class="control is-expanded">
                <input class="input" type="text" value="56" />
            </div>
            <div class="control">
                <a class="button is-static">
                mm
                </a>
            </div>
        </div>
        </div>
    </div>
    <p class="help">Les valeurs des trois champs sont liées: lorsque l'une est changée, les autres sont recalculées.</p>
    </div>

Expected behavior

The top spacing of the help after nested fields within a field should be identical to the spacing under a control. This is because these nested fields are meant (IMO) as helpers (for has-addons or is-grouped) and not as spacers in that case.

Actual behavior

The top spacing of the help after nested fields within a field is currently the one after any field.

Fix

(actually not tested...)

.field {
    .control + .help, .field + .help {
         padding: var(--bulma-control-padding-vertical); 
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant