pub struct EditorTheme {Show 46 fields
pub name: String,
pub is_dark: bool,
pub bg: String,
pub fg: String,
pub gutter_bg: String,
pub gutter_fg: String,
pub gutter_active_fg: String,
pub line_highlight: String,
pub selection_bg: String,
pub caret: String,
pub border: String,
pub panel_bg: String,
pub panel_border: String,
pub find_match_bg: String,
pub find_active_bg: String,
pub bracket_match_bg: String,
pub fold_badge_bg: String,
pub fold_badge_fg: String,
pub minimap_bg: String,
pub minimap_slider: String,
pub tok_keyword: String,
pub tok_control: String,
pub tok_type: String,
pub tok_function: String,
pub tok_macro: String,
pub tok_identifier: String,
pub tok_parameter: String,
pub tok_property: String,
pub tok_string: String,
pub tok_string_escape: String,
pub tok_number: String,
pub tok_boolean: String,
pub tok_comment: String,
pub tok_doc_comment: String,
pub tok_operator: String,
pub tok_punctuation: String,
pub tok_tag: String,
pub tok_attribute: String,
pub tok_namespace: String,
pub tok_heading: String,
pub tok_link: String,
pub tok_variable: String,
pub diag_error: String,
pub diag_warning: String,
pub diag_info: String,
pub diag_hint: String,
}Expand description
Complete theme definition for the Monaco-class code editor.
Fields§
§name: String§is_dark: bool§bg: String§fg: String§gutter_bg: String§gutter_fg: String§gutter_active_fg: String§line_highlight: String§selection_bg: String§caret: String§border: String§panel_bg: String§panel_border: String§find_match_bg: String§find_active_bg: String§bracket_match_bg: String§fold_badge_bg: String§fold_badge_fg: String§minimap_bg: String§minimap_slider: String§tok_keyword: String§tok_control: String§tok_type: String§tok_function: String§tok_macro: String§tok_identifier: String§tok_parameter: String§tok_property: String§tok_string: String§tok_string_escape: String§tok_number: String§tok_boolean: String§tok_comment: String§tok_doc_comment: String§tok_operator: String§tok_punctuation: String§tok_tag: String§tok_attribute: String§tok_namespace: String§tok_heading: String§tok_link: String§tok_variable: String§diag_error: String§diag_warning: String§diag_info: String§diag_hint: StringImplementations§
Source§impl EditorTheme
impl EditorTheme
Sourcepub fn css_variables_dark() -> Self
pub fn css_variables_dark() -> Self
Default dark theme referencing --strata-editor-* CSS variables with dark fallbacks.
Sourcepub fn css_variables_light() -> Self
pub fn css_variables_light() -> Self
Default light theme referencing --strata-editor-* CSS variables with crisp daylight fallbacks.
Sourcepub fn obsidian_dark() -> Self
pub fn obsidian_dark() -> Self
Obsidian dark engineering theme preset.
Sourcepub fn daylight_light() -> Self
pub fn daylight_light() -> Self
Daylight light workstation theme preset.
Sourcepub fn token_css(&self, token_type: TokenType) -> &str
pub fn token_css(&self, token_type: TokenType) -> &str
Resolves the CSS color expression for a syntax TokenType.
Sourcepub fn diagnostic_css(&self, severity: DiagnosticSeverity) -> &str
pub fn diagnostic_css(&self, severity: DiagnosticSeverity) -> &str
Resolves the CSS color expression for a diagnostic severity.
Sourcepub fn minimap_token_rgba(&self, token_type: TokenType) -> Rgba
pub fn minimap_token_rgba(&self, token_type: TokenType) -> Rgba
Resolves an RGBA color for rasterizing a token bar inside the Canvas2D minimap.
pub fn minimap_bg_rgba(&self) -> Rgba
pub fn minimap_slider_rgba(&self) -> Rgba
pub fn minimap_slider_border_rgba(&self) -> Rgba
pub fn minimap_cursor_rgba(&self) -> Rgba
pub fn minimap_search_rgba(&self) -> Rgba
pub fn diagnostic_rgba(&self, severity: DiagnosticSeverity) -> Rgba
Sourcepub fn to_css_variables_block(&self) -> String
pub fn to_css_variables_block(&self) -> String
Exports a CSS custom property declaration block suitable for stylesheet injection.
Trait Implementations§
Source§impl Clone for EditorTheme
impl Clone for EditorTheme
Source§impl Debug for EditorTheme
impl Debug for EditorTheme
Source§impl Default for EditorTheme
impl Default for EditorTheme
Source§impl<'de> Deserialize<'de> for EditorTheme
impl<'de> Deserialize<'de> for EditorTheme
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EditorTheme
Source§impl PartialEq for EditorTheme
impl PartialEq for EditorTheme
Source§impl Serialize for EditorTheme
impl Serialize for EditorTheme
impl StructuralPartialEq for EditorTheme
Auto Trait Implementations§
impl Forget for EditorTheme
impl Freeze for EditorTheme
impl Move for EditorTheme
impl RefUnwindSafe for EditorTheme
impl Send for EditorTheme
impl Sync for EditorTheme
impl Unpin for EditorTheme
impl UnsafeUnpin for EditorTheme
impl UnwindSafe for EditorTheme
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.