From ebfdb1dafa430786db10dad2ef7d5467c1bdbed1 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 2 Jul 2023 19:59:52 +0200 Subject: Move everything into `crates/` directory --- src/model/styles.rs | 750 ---------------------------------------------------- 1 file changed, 750 deletions(-) delete mode 100644 src/model/styles.rs (limited to 'src/model/styles.rs') diff --git a/src/model/styles.rs b/src/model/styles.rs deleted file mode 100644 index 23748a3f..00000000 --- a/src/model/styles.rs +++ /dev/null @@ -1,750 +0,0 @@ -use std::fmt::{self, Debug, Formatter, Write}; -use std::iter; -use std::mem; -use std::ptr; - -use comemo::Prehashed; -use ecow::{eco_vec, EcoString, EcoVec}; - -use super::{Content, ElemFunc, Element, Selector, Vt}; -use crate::diag::{SourceResult, Trace, Tracepoint}; -use crate::eval::{cast, Args, FromValue, Func, IntoValue, Value, Vm}; -use crate::syntax::Span; - -/// A list of style properties. -#[derive(Default, PartialEq, Clone, Hash)] -pub struct Styles(EcoVec>); - -impl Styles { - /// Create a new, empty style list. - pub fn new() -> Self { - Self::default() - } - - /// Whether this contains no styles. - pub fn is_empty(&self) -> bool { - self.0.is_empty() - } - - /// Set an inner value for a style property. - /// - /// If the property needs folding and the value is already contained in the - /// style map, `self` contributes the outer values and `value` is the inner - /// one. - pub fn set(&mut self, style: impl Into