mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Document style_traits and deny missing docs on it.
This commit is contained in:
parent
40a6a1f971
commit
82b6825a86
4 changed files with 37 additions and 7 deletions
|
@ -8,14 +8,17 @@ use super::ToCss;
|
|||
|
||||
macro_rules! define_cursor {
|
||||
($( $css: expr => $variant: ident = $value: expr, )+) => {
|
||||
/// https://drafts.csswg.org/css-ui/#cursor
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize, HeapSizeOf))]
|
||||
#[repr(u8)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum Cursor {
|
||||
$( $variant = $value ),+
|
||||
}
|
||||
|
||||
impl Cursor {
|
||||
/// Given a CSS keyword, get the corresponding cursor enum.
|
||||
pub fn from_css_keyword(keyword: &str) -> Result<Cursor, ()> {
|
||||
match_ignore_ascii_case! { keyword,
|
||||
$( concat!($css) => Ok(Cursor::$variant), )+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue