pub struct TailwindConfig {
pub enabled: bool,
pub preflight: bool,
pub dark_mode: TailwindDarkMode,
pub theme: BTreeMap<String, String>,
pub utilities: BTreeMap<String, TailwindUtility>,
pub variants: BTreeMap<String, String>,
pub plugins: Vec<String>,
pub safelist: Vec<String>,
pub sources: Vec<PathBuf>,
pub css: String,
}Expand description
[tailwind]: Tailwind CSS generated from the classes used in the app.
[tailwind]
enabled = true
dark_mode = "class"
plugins = ["@tailwindcss/typography"]
[tailwind.theme] # becomes @theme { --color-brand: …; }
color-brand = "#f26b2a"
font-display = "Inter, sans-serif"
[tailwind.utilities] # becomes @utility …
btn = "rounded-lg bg-brand px-4 py-2 font-semibold text-white"
content-auto = { content-visibility = "auto" }
[tailwind.variants] # becomes @custom-variant …
theme-midnight = "&:where([data-theme=midnight] *)"Fields§
§enabled: boolGenerate Tailwind CSS for the app. Off unless set.
preflight: boolInclude Tailwind’s base styles (Preflight).
dark_mode: TailwindDarkModeWhen dark: applies.
theme: BTreeMap<String, String>Theme variables, with or without the leading --:
color-brand = "#f26b2a", breakpoint-3xl = "120rem".
utilities: BTreeMap<String, TailwindUtility>Custom utility classes: a list of Tailwind classes to combine, or CSS declarations.
variants: BTreeMap<String, String>Custom variants: name → selector (&:where(…)) or at-rule.
plugins: Vec<String>First-party plugins bundled with Tailwind, e.g. @tailwindcss/typography
and @tailwindcss/forms.
safelist: Vec<String>Classes to generate even if they don’t appear in the source.
sources: Vec<PathBuf>Extra directories to scan for classes, besides the app directory and src/.
css: StringRaw CSS appended after everything else (@keyframes, @layer, …), for
what the options above can’t express.
Trait Implementations§
Source§impl Clone for TailwindConfig
impl Clone for TailwindConfig
Source§fn clone(&self) -> TailwindConfig
fn clone(&self) -> TailwindConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TailwindConfig
impl Debug for TailwindConfig
Source§impl Default for TailwindConfig
impl Default for TailwindConfig
Source§fn default() -> TailwindConfig
fn default() -> TailwindConfig
Source§impl<'de> Deserialize<'de> for TailwindConfigwhere
TailwindConfig: Default,
impl<'de> Deserialize<'de> for TailwindConfigwhere
TailwindConfig: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TailwindConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TailwindConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for TailwindConfig
Source§impl PartialEq for TailwindConfig
impl PartialEq for TailwindConfig
Source§impl Serialize for TailwindConfig
impl Serialize for TailwindConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for TailwindConfig
Auto Trait Implementations§
impl Freeze for TailwindConfig
impl RefUnwindSafe for TailwindConfig
impl Send for TailwindConfig
impl Sync for TailwindConfig
impl Unpin for TailwindConfig
impl UnsafeUnpin for TailwindConfig
impl UnwindSafe for TailwindConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.