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

Add bootscore_container_class() function #439

Merged

Conversation

sweetappleuk
Copy link
Contributor

Allows you to optionally create fluid layouts.

If constant BOOTSCORE_CONTAINER_FLUID is true, the 'container-fluid' class is output in all current templates

…uid layouts. When BOOTSCORE_CONTAINER_FLUID constant is true 'container-fluid' is output in all current templates
@crftwrk
Copy link
Member

crftwrk commented Apr 3, 2023

This is a nice feature, thank you!

Maybe we can improve it keeping the function, but return it just as string? No constant check... Or doing a pluggable function?

We have to add this here as well https://github.com/bootscore/bs-loop-templates

@sweetappleuk
Copy link
Contributor Author

The reason for using the constant was so that people would have to very deliberately choose to use fluid layouts. If it's made too "easy", then the project maintainers are likely to get more complaints that the default styling looks odd on fluid layouts and hence creates more work...

But if you'd prefer it's made pluggable I'm happy to do that.

@crftwrk
Copy link
Member

crftwrk commented Apr 3, 2023

If it's made too "easy", then the project maintainers are likely to get more complaints that the default styling looks odd on fluid layouts and hence creates more work...

Yes, that's true. But the user has to be active anyway to use the fluid layout. A pluggable function seems more consistent like usage of all other functions.

@crftwrk crftwrk added the documentation Improvements or additions to documentation label Apr 3, 2023
@sweetappleuk
Copy link
Contributor Author

Refactored to be pluggable as requested.

If that's ok will create a pull request for bs-loop-templates

crftwrk
crftwrk previously approved these changes Apr 3, 2023
Copy link
Member

@crftwrk crftwrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in 👍

2 spaces instead 4 for formatting would be nice

if( ! function_exists('bootscore_container_class') ) {
  function bootscore_container_class() {
    return "container";
  }
}

@crftwrk crftwrk requested a review from justinkruit April 3, 2023 15:40
@crftwrk
Copy link
Member

crftwrk commented Apr 17, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature functions
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants