mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Move cursor property out of mako
This commit is contained in:
parent
671b69c0b7
commit
4ee9eb8563
17 changed files with 413 additions and 360 deletions
|
@ -57,6 +57,9 @@ pub use self::outline::OutlineStyle;
|
|||
pub use self::rect::LengthOrNumberRect;
|
||||
pub use self::percentage::Percentage;
|
||||
pub use self::position::{Position, PositionComponent, GridAutoFlow, GridTemplateAreas};
|
||||
pub use self::pointing::Cursor;
|
||||
#[cfg(feature = "gecko")]
|
||||
pub use self::pointing::CursorImage;
|
||||
pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind};
|
||||
pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
|
||||
pub use self::svg::MozContextProperties;
|
||||
|
@ -90,6 +93,7 @@ pub mod length;
|
|||
pub mod list;
|
||||
pub mod outline;
|
||||
pub mod percentage;
|
||||
pub mod pointing;
|
||||
pub mod position;
|
||||
pub mod rect;
|
||||
pub mod source_size_list;
|
||||
|
|
40
components/style/values/specified/pointing.rs
Normal file
40
components/style/values/specified/pointing.rs
Normal file
|
@ -0,0 +1,40 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! Specified values for Pointing properties.
|
||||
//!
|
||||
//! https://drafts.csswg.org/css-ui/#pointing-keyboard
|
||||
|
||||
use style_traits::cursor::CursorKind;
|
||||
#[cfg(feature = "gecko")]
|
||||
use values::specified::url::SpecifiedUrl;
|
||||
|
||||
/// The specified value for the `cursor` property.
|
||||
///
|
||||
/// https://drafts.csswg.org/css-ui/#cursor
|
||||
#[cfg(feature = "servo")]
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
pub struct Cursor(pub CursorKind);
|
||||
|
||||
/// The specified value for the `cursor` property.
|
||||
///
|
||||
/// https://drafts.csswg.org/css-ui/#cursor
|
||||
#[cfg(feature = "gecko")]
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue)]
|
||||
pub struct Cursor {
|
||||
/// The parsed images for the cursor.
|
||||
pub images: Box<[CursorImage]>,
|
||||
/// The kind of the cursor [default | help | ...].
|
||||
pub keyword: CursorKind,
|
||||
}
|
||||
|
||||
/// The specified value for the `image cursors`.
|
||||
#[cfg(feature = "gecko")]
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue)]
|
||||
pub struct CursorImage {
|
||||
/// The url to parse images from.
|
||||
pub url: SpecifiedUrl,
|
||||
/// The <x> and <y> coordinates.
|
||||
pub hotspot: Option<(f32, f32)>,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue