mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Move user-select outside of mako.
This is the first step to unprefix user-select. This has no behavior change, it's just a nicer way to do the same thing which allows us to unship individual values more easily using parse(condition). Differential Revision: https://phabricator.services.mozilla.com/D11580
This commit is contained in:
parent
fcada8a71e
commit
1aa6725f9a
8 changed files with 47 additions and 9 deletions
|
@ -82,7 +82,7 @@ pub use self::transform::{Rotate, Scale, Transform};
|
|||
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
||||
#[cfg(feature = "gecko")]
|
||||
pub use self::ui::CursorImage;
|
||||
pub use self::ui::{ColorOrAuto, Cursor, MozForceBrokenImageIcon};
|
||||
pub use self::ui::{ColorOrAuto, Cursor, MozForceBrokenImageIcon, UserSelect};
|
||||
pub use super::generics::grid::GridTemplateComponent as GenericGridTemplateComponent;
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
|
|
|
@ -140,3 +140,39 @@ impl Parse for ScrollbarColor {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
/// The specified value for the `user-select` property.
|
||||
///
|
||||
/// https://drafts.csswg.org/css-ui-4/#propdef-user-select
|
||||
#[allow(missing_docs)]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Eq,
|
||||
MallocSizeOf,
|
||||
Parse,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
)]
|
||||
#[repr(u8)]
|
||||
pub enum UserSelect {
|
||||
Auto,
|
||||
Text,
|
||||
#[parse(aliases = "-moz-none")]
|
||||
None,
|
||||
Element,
|
||||
Elements,
|
||||
All,
|
||||
Toggle,
|
||||
TriState,
|
||||
/// Force selection of all children, unless an ancestor has `none` set.
|
||||
///
|
||||
/// See bug 48096.
|
||||
MozAll,
|
||||
/// Like `text`, except that it won't get overridden by ancestors having
|
||||
/// `all`.
|
||||
MozText,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue