What is the best way to provide plugin users with a way to customized the styles

Is it possible? Yes.

Option 1

Simply register and enqueue your default stylesheet. The theme stylesheet can then be used to override whatever styles you implemented.

function register_my_styles() {
    wp_register_style( 'default-style', plugins_url('default.css', __FILE__) );
    wp_enqueue_style( 'default-style' );
}
add_action( 'wp_enqueue_scripts', 'register_my_styles' );

Option 2

Register whatever custom options you need either on a specific plugin options page or using the WordPress Settings API. Then output these styles in a regular old script block in the theme header.

function output_custom_scripts() {
    ?><style type="text/css">
        <?php echo get_option( 'custom_css' ); ?>
    </style><?php
}
add_action( 'wp_head', 'output_custom_scripts' );

Leave a Comment