Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Why is there no 1/5 column?

Open danyj opened this issue 11 years ago • 16 comments

Is there any particular reason why you did not add 1/5 column = 5x 20% in the page builder. I mean you have all combos there from 1-6 but 1/5 is missing. Is just odd to have 1/4 = 4x25 and 1/6 = 6x 16.66666666666667% but leave 20% out. Can we please have it?

danyj avatar Jan 29 '15 21:01 danyj

@danyj - I will think about this.

sergiubagrin avatar Jan 30 '15 09:01 sergiubagrin

About 70 of my themes use the 5 columns layout and this would help me tremendously and I do not have to extend the page builder backend to add something that seems like is just missing.

danyj avatar Jan 30 '15 11:01 danyj

could someone please revisit this.

danyj avatar Feb 12 '15 21:02 danyj

any update on this?

danyj avatar Feb 23 '15 14:02 danyj

We made columns sizes like in bootstrap, where all sizes are made of 1 / 12 * size. And the class names are .col-{device}-{1..12}: .col-xs-1 means 1/12, .col-xs-7 means 7/12, etc. If all sizes are made of 1/12 parts, then you can combine different sizes easy to get a full width row http://getbootstrap.com/css/#grid-example-basic

1/5 size can't be combined with 1/12 size. You can only place */5 columns in one row. So it's not practical. Run this script in your browser console to check if two grid sizes are compatible.

ghost avatar Feb 23 '15 14:02 ghost

You cant honestly force us to use this grid output. Every and I mean every page builder gives you an option to add 5 or more columns without excluding the order. What developer does with it in frontend is developer problem and framework should not command this.

If user has 4 columns and just want one more he cant do that. By this logic he must add 2 more.You cannot be serious about this.

danyj avatar Feb 23 '15 14:02 danyj

Here just few top ones used Beaver http://screencast.com/t/m335uVUfTH4i Avia and fusion http://screencast.com/t/IQflsvtvf Site origin http://screencast.com/t/uaZD9hGo65OX

danyj avatar Feb 23 '15 15:02 danyj

And this is just few css lines that you can add in your grid to achieve it. http://stackoverflow.com/a/22799354/594423 http://www.wearesicc.com/quick-tips-5-column-layout-with-twitter-bootstrap/

danyj avatar Feb 23 '15 15:02 danyj

What developer does with it in frontend is developer problem and framework should not command this.

The framework allows you to change/replace the default grid via this filter.

// file: {theme}/inc/hooks.php

function _filter_theme_grid_add_1_5_column($grid) {
    $grid['1_5'] = array(
        'title'          => '1/5',
        'backend_class'  => 'custom-backend-grid-1_5',
        'frontend_class' => 'custom-frontend-grid-1_5',
    );

    return $grid;
}
add_filter('fw_builder_item_widths:page-builder', '_filter_theme_grid_add_1_5_column');

ghost avatar Feb 23 '15 15:02 ghost

Yes I know , http://screencast.com/t/mU1PUqOg but than I need to mess with your js/css to adjust the column in the builder. As I stated before , when you look at the builder columns , it just looks like it is missing.

danyj avatar Feb 23 '15 15:02 danyj

Let us discuss this our HTML guys and we'll figure something out :), we'll keep you in the loop. One of our guys tells me that a 1/5 could be added as a non standard bootstrap.

Let us look a bit more into it and I'll get back and let you know exactly.

DimiBaitanciuc avatar Feb 24 '15 09:02 DimiBaitanciuc

Done, the scratch will come with a 1/5 column as well. At that point we'll include the 1/5 column in the Unyson core as well.

DimiBaitanciuc avatar Feb 26 '15 12:02 DimiBaitanciuc

+1BN !!! thank you!

danyj avatar Feb 26 '15 13:02 danyj

We will close this when 1/5 column will be added

ghost avatar Mar 03 '15 19:03 ghost

  • framework - https://github.com/ThemeFuse/Unyson/commit/8042f56067327cc530256e77c40fe8989ea5f78e
  • builder - https://github.com/ThemeFuse/Unyson-Builder-Extension/commit/78d175f56f5259f4471761b2b2dc384634b563ad

GheorgheP avatar Mar 06 '15 14:03 GheorgheP

:100:

danyj avatar Mar 06 '15 14:03 danyj