grid-columns
grid-columns copied to clipboard
Add filter for CSS media type
Could you add filter for CSS media type? It could make easier to exclude default column CSS in specific screen sizes, for example when you are designing responsive theme. Nobody wants to read 100px width columns in their mobile screens.
Example usage of the filter:
add_filter('gc_css_media_type', function(){ return '(min-width:480px)'; });
Adding an extra hook here seems like unnecessary overhead that can be avoided. WordPress already provides the functionality needed out of the box.
You can do it with functions:
- http://codex.wordpress.org/Function_Reference/wp_dequeue_style
- http://codex.wordpress.org/Function_Reference/wp_enqueue_style
There are also several hooks available:
-
style_loader_tag
(best option) -
print_styles_array
-
style_loader_src
why not a simple media query in css file?
@media only screen and (max-width: 480px) {
.column-grid .column{
width:100%!important;
margin-left:0!important;
margin-right:0!important;
}
}
bit hacky dont ya think ?
For mobiles I don't think. usually any column system or builder makes column 100% width on mobiles. Do you imagine a better solution?