mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Use the rust color representation.
Differential Revision: https://phabricator.services.mozilla.com/D25976
This commit is contained in:
parent
691eb36ffe
commit
53ccbc5751
5 changed files with 9 additions and 209 deletions
|
@ -19,4 +19,4 @@ pub type Cursor = generics::Cursor<CursorImage>;
|
|||
pub type CursorImage = generics::CursorImage<ComputedImageUrl, Number>;
|
||||
|
||||
/// A computed value for `scrollbar-color` property.
|
||||
pub type ScrollbarColor = generics::ScrollbarColor<Color>;
|
||||
pub type ScrollbarColor = generics::GenericScrollbarColor<Color>;
|
||||
|
|
|
@ -86,7 +86,8 @@ impl<ImageUrl: ToCss, Number: ToCss> ToCss for CursorImage<ImageUrl, Number> {
|
|||
ToCss,
|
||||
ToShmem,
|
||||
)]
|
||||
pub enum ScrollbarColor<Color> {
|
||||
#[repr(C, u8)]
|
||||
pub enum GenericScrollbarColor<Color> {
|
||||
/// `auto`
|
||||
Auto,
|
||||
/// `<color>{2}`
|
||||
|
@ -98,6 +99,8 @@ pub enum ScrollbarColor<Color> {
|
|||
},
|
||||
}
|
||||
|
||||
pub use self::GenericScrollbarColor as ScrollbarColor;
|
||||
|
||||
impl<Color> Default for ScrollbarColor<Color> {
|
||||
#[inline]
|
||||
fn default() -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue