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

Suggestion: CSS Changes to make field render more native. #2

Open
louiswalch opened this issue Aug 29, 2017 · 0 comments
Open

Suggestion: CSS Changes to make field render more native. #2

louiswalch opened this issue Aug 29, 2017 · 0 comments

Comments

@louiswalch
Copy link

Finding this very useful, but would prefer that it render more like native Wordpress UI. In addition, it doesn't align correctly when label placement is "Left Aligned".

My adjusted CSS is as follows:

/* Create a border above the field when editing the group. Idential to how Tabs works. */

    .acf-field-object + .acf-field-object-divider {
        margin-top: 6px;
    }
    .acf-field-object + .acf-field-object-divider:before {
        display: block;
        content: "";
        height: 1px;
        background: #F0F0F0;
        margin-top: -7px;
        width: 100%;
        position: absolute;
    }

/* Remove fields we don't need when editing this field. */

    .acf-field-list .acf-field-object-divider .handle ul li.li-field-name{
        visibility: hidden;
    }
    .acf-field-list .acf-field-object-divider tr[data-name="name"],
    .acf-field-list .acf-field-object-divider tr[data-name="instructions"],
    .acf-field-list .acf-field-object-divider tr[data-name="required"],
    .acf-field-list .acf-field-object-divider tr[data-name="wrapper"],
    .acf-field-list .acf-field-object-divider tr[data-name="conditional_logic"],
    .acf-field-list .acf-field-object-divider tr[data-name="warning"] {
        display: none !important;
    }


/* Basic field rendering changes. */

    .acf-field-divider .acf-label {
        display: none;
    }
    .acf-field-divider .acf-input {
        font-weight: bold;
        text-transform: uppercase;
    }
    .acf-fields > .acf-field-divider {
        padding: 2px 15px;
    }

/* Layout adjustments when Label Placement is "Left Aligned" */

    .acf-fields.-left > .acf-field-divider:before {
        display: none;
    }
    .acf-fields.-left > .acf-field-divider {
        padding: 2px 15px;
    }
    .acf-fields.-left > .acf-field-divider > .acf-input {
        padding-left: 0;
    }

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