0

I want to merge all css into one file. I can do manually but I don't understand last argument of wp_register_style.

From laptop it's load all css.

        wp_register_style('desktop-small-css', get_template_directory_uri().'/css/desktop.small.css','','','(max-width:'.get_option($dynamo_tpl->name . '_theme_width', '1230').'px)');
        wp_enqueue_style('desktop-small-css');

        wp_register_style('tablet-css', get_template_directory_uri().'/css/tablet.css','','','(max-width:'.get_option($dynamo_tpl->name . '_tablet_width', '1030').'px)');
        wp_enqueue_style('tablet-css');

        wp_register_style('tablet-small-css', get_template_directory_uri().'/css/tablet.small.css','','','(max-width:'.get_option($dynamo_tpl->name . '_small_tablet_width', '820').'px)');
        wp_enqueue_style('tablet-small-css');

        wp_register_style('mobile-css', get_template_directory_uri().'/css/mobile.css','','','(min-width:'.get_option($dynamo_tpl->name . '_mobile_width', '580').'px)');
        wp_enqueue_style('mobile-css');

1 Answer 1

1

https://codex.wordpress.org/Function_Reference/wp_register_style,

I guess it's a mediaquery, find out which stylesheet is for which device and remove/edit the $media option. It might be a lot easier to remove the $media option of all wp_register_style and add @media() media queries inside your stylesheets.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.