I'm developing a custom theme. For some reason, some of the styles I define globally in the front-end (like certain styles for headings and such) are affecting the back-end.
I am using the WP-LESS plugin and enqueueing the main stylesheet in the theme's functions.PHP:
wp_enqueue_style( 'mainLESS', get_template_directory_uri() . '/less/index.less');
Is this normal behaviour?
How should I prefix styles to keep them from applying to the backend? I don't seem to be seeing any obvious body classes I could take advantage of.
is_admin()
to not enqueue the style or (body:not(.wp-admin)
which seems like an overkill)wp_enqueue_style( 'mainLESS', get_template_directory_uri() . '/less/index.less');
in the theme's functions.php. Could that be the culprit?admin_enqueue_scripts
init
or so, but notwp_enqueue_scripts
?