Module stylic::enable

source ·
Expand description

Globally enable or disable styling.

use stylic::enable::{set_style_enabled, StyleMode};

// Disable styling. `bool` implements `Into<StyleMode>`.
set_style_enabled(false);

// Undo the override and go back to automatically detecting styling support.
set_style_enabled(StyleMode::Auto);

If set_style_enabled is not called, styling support will be automatically detected from the environment. As such there is no need to call set_style_enabled unless you wish to override this behavior.

Enums§

  • Whether to enable or disable styling.

Functions§