1use crate::{Hoverable, Refineable, RefinementCascade};
2
3pub trait Styled {
4 type Style: 'static + Refineable + Send + Sync + Default;
5
6 fn style_cascade(&mut self) -> &mut RefinementCascade<Self::Style>;
7 fn declared_style(&mut self) -> &mut <Self::Style as Refineable>::Refinement;
8
9 fn computed_style(&mut self) -> Self::Style {
10 Self::Style::from_refinement(&self.style_cascade().merged())
11 }
12
13 fn hover(self) -> Hoverable<Self>
14 where
15 Self: 'static + Sized + Send + Sync,
16 Self::Style: 'static + Refineable + Default + Send + Sync,
17 <Self::Style as Refineable>::Refinement: 'static + Default + Send + Sync,
18 {
19 Hoverable::new(self)
20 }
21
22 // fn active(self) -> Pressable<Self>
23 // where
24 // Self: Sized,
25 // {
26 // pressable(self)
27 // }
28}