I’m working on a plugin to be release to the public, it is a very simple plugin that includes a single html element in the page html.
I can do many things to allow users customize its appearance:
1. Let them override a default CSS that is includes as a plugin configuration (on a management screen)
2. Require that they modify their styles.css (not a very good idea for this plugin)
And probably a fee more
option 1 seems like the most user Friendly, since it allows any admin to modify the style without need of accessing code. But I wonder if there might be a better way?
Is it possible to provide a default CSS file for the plugin that would be theme independent and would be editable through a management screen? The styling needs to persist regardless of chosen theme.
Any thoughts?
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.
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.