Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  outline.rs

  Sprache: Rust
 

/* 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 https://mozilla.org/MPL/2.0/. */


//! Specified values for outline properties

use crate::parser::{Parse, ParserContext};
use crate::values::specified::BorderStyle;
use cssparser::Parser;
use selectors::parser::SelectorParseErrorKind;
use style_traits::ParseError;

#[derive(
    Clone,
    Copy,
    Debug,
    Eq,
    MallocSizeOf,
    Ord,
    PartialEq,
    PartialOrd,
    SpecifiedValueInfo,
    ToComputedValue,
    ToCss,
    ToResolvedValue,
    ToShmem,
)]
#[repr(C, u8)]
/// <https://drafts.csswg.org/css-ui/#propdef-outline-style>
pub enum OutlineStyle {
    /// auto
    Auto,
    /// <border-style>
    BorderStyle(BorderStyle),
}

impl OutlineStyle {
    #[inline]
    /// Get default value as None
    pub fn none() -> OutlineStyle {
        OutlineStyle::BorderStyle(BorderStyle::None)
    }

    #[inline]
    /// Get value for None or Hidden
    pub fn none_or_hidden(&self) -> bool {
        match *self {
            OutlineStyle::Auto => false,
            OutlineStyle::BorderStyle(ref style) => style.none_or_hidden(),
        }
    }
}

impl Parse for OutlineStyle {
    fn parse<'i, 't>(
        _context: &ParserContext,
        input: &mut Parser<'i, 't>,
    ) -> Result<OutlineStyle, ParseError<'i>> {
        if let Ok(border_style) = input.try_parse(BorderStyle::parse) {
            if let BorderStyle::Hidden = border_style {
                return Err(input
                    .new_custom_error(SelectorParseErrorKind::UnexpectedIdent("hidden".into())));
            }

            return Ok(OutlineStyle::BorderStyle(border_style));
        }

        input.expect_ident_matching("auto")?;
        Ok(OutlineStyle::Auto)
    }
}

Messung V0.5 in Prozent
C=89 H=99 G=94

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-19) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik