Skip to content

Commit 5b20da8

Browse files
committed
Make the abstract color parser types public
1 parent 0a85c09 commit 5b20da8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/color.rs

+1
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ impl Color {
644644
}
645645
}
646646

647+
/// This trait is used by the [`ColorParser`] to construct colors of any type.
647648
pub trait FromParsedColor {
648649
/// Construct a new color from the CSS `currentcolor` keyword.
649650
fn from_current_color() -> Self;

src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ fn parse_border_spacing(_context: &ParserContext, input: &mut Parser)
6868
#![recursion_limit = "200"] // For color::parse_color_keyword
6969

7070
pub use crate::color::{
71-
hsl_to_rgb, hwb_to_rgb, parse_color_keyword, AngleOrNumber, Color, ColorFunction, ColorParser,
72-
Lab, Lch, NumberOrPercentage, Oklab, Oklch, PredefinedColorSpace, RGBA,
71+
hsl_to_rgb, hwb_to_rgb, parse_color_keyword, parse_color_with, AngleOrNumber, Color,
72+
ColorFunction, ColorParser, FromParsedColor, Lab, Lch, NumberOrPercentage, Oklab, Oklch,
73+
PredefinedColorSpace, RGBA,
7374
};
7475
pub use crate::cow_rc_str::CowRcStr;
7576
pub use crate::from_bytes::{stylesheet_encoding, EncodingSupport};

0 commit comments

Comments
 (0)