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
Add bootscore_container_class() function #439
Conversation
…uid layouts. When BOOTSCORE_CONTAINER_FLUID constant is true 'container-fluid' is output in all current templates
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 |
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. |
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. |
Refactored to be pluggable as requested. If that's ok will create a pull request for bs-loop-templates |
There was a problem hiding this 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";
}
}
Allows you to optionally create fluid layouts.
If constant BOOTSCORE_CONTAINER_FLUID is true, the 'container-fluid' class is output in all current templates