Skip to main content

EditorTheme

Struct EditorTheme 

Source
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: String

Implementations§

Source§

impl EditorTheme

Source

pub fn css_variables_dark() -> Self

Default dark theme referencing --strata-editor-* CSS variables with dark fallbacks.

Source

pub fn css_variables_light() -> Self

Default light theme referencing --strata-editor-* CSS variables with crisp daylight fallbacks.

Source

pub fn aerovex_dark() -> Self

Aerovex / Noxus Obsidian dark engineering theme preset.

Source

pub fn clean_light() -> Self

Clean Daylight light workstation theme preset.

Source

pub fn token_css(&self, token_type: TokenType) -> &str

Resolves the CSS color expression for a syntax TokenType.

Source

pub fn diagnostic_css(&self, severity: DiagnosticSeverity) -> &str

Resolves the CSS color expression for a diagnostic severity.

Source

pub fn minimap_token_rgba(&self, token_type: TokenType) -> Rgba

Resolves an RGBA color for rasterizing a token bar inside the Canvas2D minimap.

Source

pub fn minimap_bg_rgba(&self) -> Rgba

Source

pub fn minimap_slider_rgba(&self) -> Rgba

Source

pub fn minimap_slider_border_rgba(&self) -> Rgba

Source

pub fn minimap_cursor_rgba(&self) -> Rgba

Source

pub fn minimap_search_rgba(&self) -> Rgba

Source

pub fn diagnostic_rgba(&self, severity: DiagnosticSeverity) -> Rgba

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EditorTheme

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EditorTheme

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for EditorTheme

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for EditorTheme

Source§

impl PartialEq for EditorTheme

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for EditorTheme

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for EditorTheme

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoInitialState<T> for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,