Skip to content

Commit 9ca0dde

Browse files
committed
refactor: update serialization in String.swift and Url.swift
1 parent 76d21f5 commit 9ca0dde

File tree

2 files changed

+20
-33
lines changed

2 files changed

+20
-33
lines changed

Sources/W3C CSSOM/Serialization/String.swift

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
public struct CSSString: Sendable, Hashable {
2626
/// The raw string value (before serialization)
2727
public let value: String
28-
29-
/// Quote style enum (deprecated, kept for backward compatibility)
30-
@available(*, deprecated, message: "Per CSSOM spec, strings are always serialized with double quotes")
31-
public enum Quotes: Sendable, Hashable {
32-
case single
33-
case double
34-
}
28+
//
29+
// /// Quote style enum (deprecated, kept for backward compatibility)
30+
// @available(*, deprecated, message: "Per CSSOM spec, strings are always serialized with double quotes")
31+
// public enum Quotes: Sendable, Hashable {
32+
// case single
33+
// case double
34+
// }
3535

3636
/// Creates a new CSS string value
3737
///
@@ -42,19 +42,19 @@ public struct CSSString: Sendable, Hashable {
4242
public init(_ value: String) {
4343
self.value = value
4444
}
45-
46-
/// Creates a new CSS string value (deprecated API for backward compatibility)
47-
///
48-
/// - Parameters:
49-
/// - value: The raw string value
50-
/// - quotes: Ignored - CSSOM always uses double quotes
51-
///
52-
/// - Note: This initializer is provided for backward compatibility. Per CSSOM specification,
53-
/// strings are always serialized with double quotes. The `quotes` parameter is ignored.
54-
@available(*, deprecated, message: "Per CSSOM spec, strings are always serialized with double quotes. Use init(_:) instead.")
55-
public init(_ value: String, quotes: Quotes) {
56-
self.value = value
57-
}
45+
//
46+
// /// Creates a new CSS string value (deprecated API for backward compatibility)
47+
// ///
48+
// /// - Parameters:
49+
// /// - value: The raw string value
50+
// /// - quotes: Ignored - CSSOM always uses double quotes
51+
// ///
52+
// /// - Note: This initializer is provided for backward compatibility. Per CSSOM specification,
53+
// /// strings are always serialized with double quotes. The `quotes` parameter is ignored.
54+
// @available(*, deprecated, message: "Per CSSOM spec, strings are always serialized with double quotes. Use init(_:) instead.")
55+
// public init(_ value: String, quotes: Quotes) {
56+
// self.value = value
57+
// }
5858

5959
/// Creates an empty CSS string value
6060
public static let empty = CSSString("")

Sources/W3C CSSOM/Serialization/Url.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,6 @@ public struct Url: Sendable, Hashable {
3535
self.value = value
3636
}
3737

38-
/// Creates a new CSS URL value (deprecated API for backward compatibility)
39-
///
40-
/// - Parameters:
41-
/// - value: The raw URL string
42-
/// - quotes: Ignored - CSSOM always uses double quotes
43-
///
44-
/// - Note: This initializer is provided for backward compatibility. Per CSSOM specification,
45-
/// URLs are always serialized with double quotes. The `quotes` parameter is ignored.
46-
@available(*, deprecated, message: "Per CSSOM spec, URLs are always serialized with double quotes. Use init(_:) instead.")
47-
public init(_ value: String, quotes: CSSString.Quotes?) {
48-
self.value = value
49-
}
50-
5138
/// Creates a data URL for an embedded resource
5239
///
5340
/// - Parameters:

0 commit comments

Comments
 (0)