Skip to content

Fix csswg urls #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};

const OPAQUE: f32 = 1.0;

/// https://w3c.github.io/csswg-drafts/css-color-4/#serializing-alpha-values
/// https://drafts.csswg.org/css-color-4/#serializing-alpha-values
#[inline]
fn serialize_alpha(dest: &mut impl fmt::Write, alpha: f32, legacy_syntax: bool) -> fmt::Result {
// If the alpha component is full opaque, don't emit the alpha value in CSS.
Expand Down Expand Up @@ -352,24 +352,24 @@ impl_lch_like!(Lch, "lch");
impl_lch_like!(Oklch, "oklch");

/// A Predefined color space specified in:
/// https://w3c.github.io/csswg-drafts/css-color-4/#predefined
/// https://drafts.csswg.org/css-color-4/#predefined
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum PredefinedColorSpace {
/// https://w3c.github.io/csswg-drafts/css-color-4/#predefined-sRGB
/// https://drafts.csswg.org/css-color-4/#predefined-sRGB
Srgb,
/// https://w3c.github.io/csswg-drafts/css-color-4/#predefined-sRGB-linear
/// https://drafts.csswg.org/css-color-4/#predefined-sRGB-linear
SrgbLinear,
/// https://w3c.github.io/csswg-drafts/css-color-4/#predefined-display-p3
/// https://drafts.csswg.org/css-color-4/#predefined-display-p3
DisplayP3,
/// https://w3c.github.io/csswg-drafts/css-color-4/#predefined-a98-rgb
/// https://drafts.csswg.org/css-color-4/#predefined-a98-rgb
A98Rgb,
/// https://w3c.github.io/csswg-drafts/css-color-4/#predefined-prophoto-rgb
/// https://drafts.csswg.org/css-color-4/#predefined-prophoto-rgb
ProphotoRgb,
/// https://w3c.github.io/csswg-drafts/css-color-4/#predefined-rec2020
/// https://drafts.csswg.org/css-color-4/#predefined-rec2020
Rec2020,
/// https://w3c.github.io/csswg-drafts/css-color-4/#predefined-xyz
/// https://drafts.csswg.org/css-color-4/#predefined-xyz
XyzD50,
/// https://w3c.github.io/csswg-drafts/css-color-4/#predefined-xyz
/// https://drafts.csswg.org/css-color-4/#predefined-xyz
XyzD65,
}

Expand Down Expand Up @@ -418,7 +418,7 @@ impl ToCss for PredefinedColorSpace {
}

/// A color specified by the color() function.
/// https://w3c.github.io/csswg-drafts/css-color-4/#color-function
/// https://drafts.csswg.org/css-color-4/#color-function
#[derive(Clone, Copy, PartialEq, Debug)]
pub struct ColorFunction {
/// The color space for this color.
Expand Down