pub struct Extras {Show 62 fields
pub object_fit: Option<ObjectFit>,
pub window_drag: Option<WindowDrag>,
pub window_control: Option<WindowControl>,
pub fixed: Option<bool>,
pub drop_shadow: Option<DropShadow>,
pub sticky: Option<bool>,
pub z_index: Option<Option<i32>>,
pub isolate: Option<bool>,
pub positioned: Option<bool>,
pub pointer_events_none: Option<bool>,
pub visibility_hidden: Option<bool>,
pub user_select: Option<UserSelect>,
pub inline_level: Option<bool>,
pub appearance_none: Option<bool>,
pub accent_color: Option<Option<Hsla>>,
pub fill: Option<SvgPaint>,
pub stroke: Option<SvgPaint>,
pub svg_presentation: Option<Rc<Vec<(&'static str, Rc<str>)>>>,
pub text_transform: Option<TextTransform>,
pub white_space: Option<WhiteSpaceMode>,
pub content: Option<Rc<str>>,
pub content_none: bool,
pub background_clip_text: Option<bool>,
pub text_fill_color: Option<TextFill>,
pub background_key_color: Option<Hsla>,
pub background_images: Option<Rc<Vec<BackgroundLayer>>>,
pub background_urls: Option<Rc<Vec<BackgroundUrl>>>,
pub background_size: Option<Rc<Vec<BackgroundSize>>>,
pub background_position: Option<Rc<Vec<(TileLength, TileLength)>>>,
pub background_repeat: Option<Rc<Vec<(bool, bool)>>>,
pub list_marker: Option<ListMarker>,
pub list_marker_inside: Option<bool>,
pub web_font: Option<Rc<[String]>>,
pub underline_offset: Option<f32>,
pub decoration: DecorationPatch,
pub outline: OutlinePatch,
pub current_color: CurrentColorTargets,
pub current_color_overrides: CurrentColorTargets,
pub blur: Option<f32>,
pub filter_url: Option<Rc<str>>,
pub scrollbar_width: Option<ScrollbarWidth>,
pub scrollbar_color: Option<(Hsla, Hsla)>,
pub overscroll_x: Option<OverscrollBehavior>,
pub overscroll_y: Option<OverscrollBehavior>,
pub contain_paint: Option<bool>,
pub contain_size: Option<u8>,
pub container_type: Option<u8>,
pub container_name: Option<Option<Rc<[Rc<str>]>>>,
pub scroll_smooth: Option<bool>,
pub overflow_x: Option<OverflowKeyword>,
pub overflow_y: Option<OverflowKeyword>,
pub mask_images: Option<MaskImages>,
pub mask_clips: Option<MaskClips>,
pub mask_composite: Option<MaskCompositing>,
pub mask: MaskPatch,
pub radius_inherit: RadiusInherit,
pub view_transition_name: Option<Option<Rc<str>>>,
pub view_transition_class: Option<Rc<[Rc<str>]>>,
pub plus_lighter: Option<bool>,
pub snap: SnapPatch,
pub interpolate_size: Option<bool>,
pub dynamic_range_limit: Option<DynamicRangeLimit>,
}Fields§
§object_fit: Option<ObjectFit>§window_drag: Option<WindowDrag>None means undeclared, which lets the renderer inherit the parent’s value; Some(None) is
an explicit opt-out.
window_control: Option<WindowControl>§fixed: Option<bool>§drop_shadow: Option<DropShadow>§sticky: Option<bool>Whether sticky diverges depends on whether an ancestor scrolls, which only the renderer
knows (advise_out_of_flow).
z_index: Option<Option<i32>>§isolate: Option<bool>§positioned: Option<bool>The element declared a position other than static. gpui cannot say this: static and
relative both map onto its default Relative.
pointer_events_none: Option<bool>The cascade folds only the element’s own declaration; restyle_with rewrites it to the
effective (inherited) value before the states are stored.
The declared visibility. gpui’s own switch also goes off for the screen-reader-only clip: rect(0 0 0 0), while CSS visibility stays visible (read by el.focus()).
user_select: Option<UserSelect>user-select as declared; auto defers to the parent when a selection asks
(sk_tree::selection), so it is not folded down.
inline_level: Option<bool>The display had an inline outer type. taffy lays the box out block-level, which ignores
the parent’s text-align; the renderer advises (advise_inline_level).
appearance_none: Option<bool>§accent_color: Option<Option<Hsla>>§fill: Option<SvgPaint>§stroke: Option<SvgPaint>§svg_presentation: Option<Rc<Vec<(&'static str, Rc<str>)>>>§text_transform: Option<TextTransform>text-transform. gpui has no such text-style field: the shaper is handed a string, so the
case change is applied to that string by the renderer.
white_space: Option<WhiteSpaceMode>The whitespace-processing half of white-space; gpui models only whether a line may wrap,
so collapsing is applied to the string by the renderer, like text_transform.
content: Option<Rc<str>>§content_none: boolcontent: none / normal was declared: a later rule that says so takes back the string an
earlier one gave, where leaving content unset says nothing.
background_clip_text: Option<bool>§text_fill_color: Option<TextFill>-webkit-text-fill-color overrides foreground color, independently of the background
clipped behind the text.
background_key_color: Option<Hsla>§background_images: Option<Rc<Vec<BackgroundLayer>>>Kept apart from the refinement: size/position/repeat are separate properties, often from separate rules, folded onto the layers after the cascade.
background_urls: Option<Rc<Vec<BackgroundUrl>>>§background_size: Option<Rc<Vec<BackgroundSize>>>§background_position: Option<Rc<Vec<(TileLength, TileLength)>>>§background_repeat: Option<Rc<Vec<(bool, bool)>>>§list_marker: Option<ListMarker>§list_marker_inside: Option<bool>§web_font: Option<Rc<[String]>>The web fonts this element’s font-family asks for that are not loaded yet: the families of
the list, up to the one used, that set_web_font_families named, in order.
underline_offset: Option<f32>§decoration: DecorationPatch§outline: OutlinePatch§current_color: CurrentColorTargetscurrentColor is the computed color, unknown while a declaration is mapped (no inherited
text property is folded), so targets are recorded and substituted after the cascade.
current_color_overrides: CurrentColorTargets§blur: Option<f32>filter: blur() radius in px. Exact only for a solid, contentless leaf box (the “glow
blob”), which the renderer repaints as its own shadow.
filter_url: Option<Rc<str>>§scrollbar_width: Option<ScrollbarWidth>§scrollbar_color: Option<(Hsla, Hsla)>§overscroll_x: Option<OverscrollBehavior>§overscroll_y: Option<OverscrollBehavior>§contain_paint: Option<bool>contain includes paint containment: the box clips its content as overflow: clip does.
contain_size: Option<u8>The axes contain size-contains (Extras::CONTAIN_WIDTH, Extras::CONTAIN_HEIGHT).
container_type: Option<u8>container-type as the axes it queries (crate::container::INLINE, crate::container::BLOCK); Some(0) is normal.
container_name: Option<Option<Rc<[Rc<str>]>>>container-name; Some(None) is none.
scroll_smooth: Option<bool>scroll-behavior: smooth: a programmatic scroll of this box that does not say otherwise glides.
overflow_x: Option<OverflowKeyword>Only a qualifier of the refinement’s axis, which stays the truth (see compute_overflow).
overflow_y: Option<OverflowKeyword>§mask_images: Option<MaskImages>mask-image (or the mask shorthand’s images). The three mask_* fields are kept apart
because they cascade apart, and Extras::mask_ring reads them together.
mask_clips: Option<MaskClips>§mask_composite: Option<MaskCompositing>§mask: MaskPatch§radius_inherit: RadiusInherit§view_transition_name: Option<Option<Rc<str>>>view-transition-name; Some(None) is none, auto and match-element are kept as
written.
view_transition_class: Option<Rc<[Rc<str>]>>view-transition-class; empty is none.
plus_lighter: Option<bool>mix-blend-mode: plus-lighter (Some(false) is normal); only view transition images
blend.
snap: SnapPatch§interpolate_size: Option<bool>interpolate-size as declared (Some(true) is allow-keywords); it inherits, so the
renderer reads it through the ancestors.
dynamic_range_limit: Option<DynamicRangeLimit>dynamic-range-limit as declared; it inherits, so the renderer reads it through the
ancestors.
Implementations§
Source§impl Extras
impl Extras
pub fn mask_ring(&self) -> bool
pub fn resolve_background_layers(&self) -> Vec<Background>
pub fn resolve_background_stack(&self) -> Option<Vec<PaintLayer>>
Sourcepub fn resolve_mask_stack(&self) -> Option<MaskStack>
pub fn resolve_mask_stack(&self) -> Option<MaskStack>
The mask to paint, or None when every layer is none. Not for the gradient-border ring
(Extras::mask_ring), which the background paints itself.
pub fn z(&self) -> Option<i32>
Source§impl Extras
impl Extras
pub const CONTAIN_WIDTH: u8 = 1
pub const CONTAIN_HEIGHT: u8 = 2
pub fn overflow_names(&self, base: &StyleRefinement) -> [&'static str; 2]
Trait Implementations§
impl StructuralPartialEq for Extras
Auto Trait Implementations§
impl !Send for Extras
impl !Sync for Extras
impl Forget for Extras
impl Freeze for Extras
impl Move for Extras
impl RefUnwindSafe for Extras
impl Unpin for Extras
impl UnsafeUnpin for Extras
impl UnwindSafe for Extras
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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