Skip to content

Commit ecc7450

Browse files
committed
Make the serialize_alpha function public.
1 parent 6ce91af commit ecc7450

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/color.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ where
2626
}
2727
}
2828

29+
/// Serialize the alpha copmonent of a color according to the specification.
2930
/// <https://drafts.csswg.org/css-color-4/#serializing-alpha-values>
3031
#[inline]
31-
fn serialize_alpha(
32+
pub fn serialize_alpha(
3233
dest: &mut impl fmt::Write,
3334
alpha: Option<f32>,
3435
legacy_syntax: bool,

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +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, parse_color_with, parse_hash_color, AngleOrNumber,
72-
Color, ColorFunction, ColorParser, FromParsedColor, Hsl, Hwb, Lab, Lch, NumberOrPercentage,
73-
Oklab, Oklch, PredefinedColorSpace, RGBA,
71+
hsl_to_rgb, hwb_to_rgb, parse_color_keyword, parse_color_with, parse_hash_color,
72+
serialize_alpha, AngleOrNumber, Color, ColorFunction, ColorParser, FromParsedColor, Hsl, Hwb,
73+
Lab, Lch, NumberOrPercentage, Oklab, Oklch, PredefinedColorSpace, RGBA,
7474
};
7575
pub use crate::cow_rc_str::CowRcStr;
7676
pub use crate::from_bytes::{stylesheet_encoding, EncodingSupport};
@@ -84,7 +84,7 @@ pub use crate::parser::{Delimiter, Delimiters, Parser, ParserInput, ParserState}
8484
pub use crate::rules_and_declarations::{parse_important, parse_one_declaration};
8585
pub use crate::rules_and_declarations::{parse_one_rule, StyleSheetParser};
8686
pub use crate::rules_and_declarations::{AtRuleParser, QualifiedRuleParser};
87-
pub use crate::rules_and_declarations::{RuleBodyParser, RuleBodyItemParser, DeclarationParser};
87+
pub use crate::rules_and_declarations::{DeclarationParser, RuleBodyItemParser, RuleBodyParser};
8888
pub use crate::serializer::{serialize_identifier, serialize_name, serialize_string};
8989
pub use crate::serializer::{CssStringWriter, ToCss, TokenSerializationType};
9090
pub use crate::tokenizer::{SourceLocation, SourcePosition, Token};

0 commit comments

Comments
 (0)