pub struct AdminTheme {
pub accent: Option<String>,
pub bg: Option<String>,
pub surface: Option<String>,
pub text: Option<String>,
pub text_muted: Option<String>,
pub border: Option<String>,
}Expand description
Project-level override patch for the admin chrome palette.
admin.css is the single source of truth for the framework’s design
tokens (palette, semantic surfaces, typography scale, …).
AdminTheme is purely a patch layer: every field is
Option<String> and defaults to None, meaning “don’t override —
let the stylesheet decide.” Out of the box the framework emits no
inline <style> block at all.
Set a field — usually via the fluent builder methods or
Admin::accent_color — to inject a --rio-* custom-property
override on every page. Overrides are emitted as a single
html { ... } block after admin.css, so they win cascade ties
without !important. The framework is light-only.
Values are hex (#rrggbb or rrggbb); the leading # is
auto-normalised at construction. Malformed input is rejected at
override time rather than panicking — the admin path never breaks
over a config typo.
Fields§
§accent: Option<String>§bg: Option<String>§surface: Option<String>§text: Option<String>§text_muted: Option<String>§border: Option<String>Implementations§
Source§impl AdminTheme
impl AdminTheme
Sourcepub fn accent(self, color: impl Into<String>) -> Self
pub fn accent(self, color: impl Into<String>) -> Self
Override --rio-accent. Hex form, # optional.
Sourcepub fn surface(self, color: impl Into<String>) -> Self
pub fn surface(self, color: impl Into<String>) -> Self
Override --rio-surface (cards, topbar, sidebar, table body).
Sourcepub fn text_muted(self, color: impl Into<String>) -> Self
pub fn text_muted(self, color: impl Into<String>) -> Self
Override --rio-text-muted (secondary text, breadcrumb links).
Trait Implementations§
Source§impl Clone for AdminTheme
impl Clone for AdminTheme
Source§fn clone(&self) -> AdminTheme
fn clone(&self) -> AdminTheme
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 AdminTheme
impl Debug for AdminTheme
Source§impl Default for AdminTheme
impl Default for AdminTheme
Source§fn default() -> AdminTheme
fn default() -> AdminTheme
Source§impl PartialEq for AdminTheme
impl PartialEq for AdminTheme
Source§fn eq(&self, other: &AdminTheme) -> bool
fn eq(&self, other: &AdminTheme) -> bool
self and other values to be equal, and is used by ==.impl Eq for AdminTheme
impl StructuralPartialEq for AdminTheme
Auto Trait Implementations§
impl Freeze for AdminTheme
impl RefUnwindSafe for AdminTheme
impl Send for AdminTheme
impl Sync for AdminTheme
impl Unpin for AdminTheme
impl UnsafeUnpin for AdminTheme
impl UnwindSafe for AdminTheme
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,
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.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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more