← 返回首页
Upgrade dependencies · cdoublev/css@a0eda56 · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Commit a0eda56

Browse files
committed
Upgrade dependencies
The new version of `undici` no longer hangs when fetching a redirected URL with `no-cors`, but returns an opaque response if redirected to a cross-origin URL, which is conforming to the Fetch specification, but seems inconsistent since it returns a transparent response for a cross-origin resource. Depending on the outcome of the issue below, it might be replaced with a minimal implementation of the Fetch specification... nodejs/undici#4740
1 parent b9c3c1b commit a0eda56

15 files changed

Lines changed: 705 additions & 174 deletions

File tree

‎lib/parse/postprocess.js‎

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -536,18 +536,13 @@ function postParseDimension(dimension, { definition: { max, min, name } }) {
536536

537537
/**
538538
* @param {object|object[]} name
539-
* @param {object} node
540539
* @returns {object|object[]|null}
541540
* @see {@link https://drafts.csswg.org/css-fonts-4/#family-name-value}
542-
* @see {@link https://drafts.csswg.org/css-speech-1/#valdef-voice-family-family-name}
543541
*
544542
* It aborts parsing the name when it is invalid in the context.
545543
*/
546-
function postParseFamilyName(name, node) {
547-
const invalid = isDeclaredBy(node, 'voice-family')
548-
? reserved.voiceFamilyName
549-
: reserved.fontFamilyName
550-
if (name.types.includes('<string>') || 1 < name.length || !invalid.includes(toLowerCase(name[0].value))) {
544+
function postParseFontFamilyName(name) {
545+
if (name.types.includes('<string>') || 1 < name.length || !reserved.fontFamilyName.includes(toLowerCase(name[0].value))) {
551546
return name
552547
}
553548
return null
@@ -1895,6 +1890,20 @@ function postParseViewTransitionName(name, node) {
18951890
return reserved.viewTransitionName.includes(toLowerCase(name.value)) ? error(node) : name
18961891
}
18971892

1893+
/**
1894+
* @param {object|object[]} name
1895+
* @returns {object|object[]|null}
1896+
* @see {@link https://drafts.csswg.org/css-speech-1/#valdef-voice-family-family-name}
1897+
*
1898+
* It aborts parsing the name when it is invalid in the context.
1899+
*/
1900+
function postParseVoiceFamilyName(name) {
1901+
if (name.types.includes('<string>') || 1 < name.length || !reserved.voiceFamilyName.includes(toLowerCase(name[0].value))) {
1902+
return name
1903+
}
1904+
return null
1905+
}
1906+
18981907
/**
18991908
* @param {object[]} value
19001909
* @param {object} node
@@ -1966,7 +1975,7 @@ export default {
19661975
'<dashed-ident>': postParseDashedIdent,
19671976
'<dashndashdigit-ident>': postParseDashNDashDigitIdentifier,
19681977
'<decibel>': postParseDimension,
1969-
'<family-name>': postParseFamilyName,
1978+
'<family-name>': postParseFontFamilyName,
19701979
'<first-valid()>': postParseFirstValid,
19711980
'<flex>': postParseDimension,
19721981
'<font-format>': postParseFontFormat,
@@ -2025,6 +2034,7 @@ export default {
20252034
'<transform-interpolate()>': postParseInterpolate,
20262035
'<try-tactic>': postParseListToSpecifiedOrder,
20272036
'<urange>': postParseUnicodeRange,
2037+
'<voice-family-name>': postParseVoiceFamilyName,
20282038
'<whole-value>': postParseWholeValue,
20292039
'<zero>': postParseZero,
20302040
'@font-palette-values': postParseFontPaletteValues,

‎lib/parse/shorthand.js‎

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ function parseRule(rules, longhands, shorthand) {
885885
const declarations = longhands.map(longhand => [longhand, rules.get(longhand.replace('column', 'row'))])
886886
return new Map(declarations)
887887
}
888-
const declarations = new Map(longhands.map(longhand => [longhand, list()]))
888+
const declarations = new Map(longhands.map(longhand => [longhand, list([], ',')]))
889889
rules.forEach(rule => {
890890
if (isList(rule)) {
891891
const [width, style, color] = rule
@@ -910,6 +910,33 @@ function parseRule(rules, longhands, shorthand) {
910910
return declarations
911911
}
912912

913+
/**
914+
* @param {object[]} insets
915+
* @param {string[]} longhands
916+
* @param {string} shorthand
917+
* @returns {Map}
918+
* @see {@link https://drafts.csswg.org/css-gaps-1/#propdef-column-rule-edge-inset}
919+
* @see {@link https://drafts.csswg.org/css-gaps-1/#propdef-column-rule-inset}
920+
* @see {@link https://drafts.csswg.org/css-gaps-1/#propdef-column-rule-interior-inset}
921+
* @see {@link https://drafts.csswg.org/css-gaps-1/#propdef-row-rule-edge-inset}
922+
* @see {@link https://drafts.csswg.org/css-gaps-1/#propdef-row-rule-inset}
923+
* @see {@link https://drafts.csswg.org/css-gaps-1/#propdef-row-rule-interior-inset}
924+
* @see {@link https://drafts.csswg.org/css-gaps-1/#propdef-rule-edge-inset}
925+
* @see {@link https://drafts.csswg.org/css-gaps-1/#propdef-rule-inset}
926+
* @see {@link https://drafts.csswg.org/css-gaps-1/#propdef-rule-interior-inset}
927+
*/
928+
function parseRuleInset(insets, longhands, name) {
929+
if (name.endsWith('rule-inset')) {
930+
insets = insets.flat()
931+
insets.splice(2, 1)
932+
}
933+
const divisor = name.startsWith('rule') ? 2 : 1
934+
return new Map(longhands.map((longhand, index) => {
935+
const value = insets[Math.floor(index / divisor)]
936+
return [longhand, (!value || isOmitted(value)) ? properties[longhand].initial.parsed : value]
937+
}))
938+
}
939+
913940
/**
914941
* @param {object[]} values
915942
* @param {string[]} longhands
@@ -1076,6 +1103,8 @@ function parse(value, name, subProperties) {
10761103
case 'border-clip':
10771104
case 'border-inline-clip':
10781105
case 'color-adjust':
1106+
case 'column-rule-inset-end':
1107+
case 'column-rule-inset-start':
10791108
case 'glyph-orientation-vertical':
10801109
case 'marker':
10811110
case 'overflow-clip-margin':
@@ -1084,9 +1113,12 @@ function parse(value, name, subProperties) {
10841113
case 'page-break-after':
10851114
case 'page-break-before':
10861115
case 'page-break-inside':
1116+
case 'row-rule-inset-end':
1117+
case 'row-rule-inset-start':
10871118
case 'rule-break':
10881119
case 'rule-color':
1089-
case 'rule-outset':
1120+
case 'rule-inset-end':
1121+
case 'rule-inset-start':
10901122
case 'rule-style':
10911123
case 'rule-width':
10921124
return setLonghands(value, longhands)
@@ -1100,6 +1132,16 @@ function parse(value, name, subProperties) {
11001132
case 'row-rule':
11011133
case 'rule':
11021134
return parseRule(value, longhands, name)
1135+
case 'column-rule-edge-inset':
1136+
case 'column-rule-inset':
1137+
case 'column-rule-interior-inset':
1138+
case 'row-rule-edge-inset':
1139+
case 'row-rule-inset':
1140+
case 'row-rule-interior-inset':
1141+
case 'rule-edge-inset':
1142+
case 'rule-inset':
1143+
case 'rule-interior-inset':
1144+
return parseRuleInset(value, longhands, name)
11031145
case 'columns':
11041146
return parseColumns(value, longhands)
11051147
case 'container':

0 commit comments

Comments
 (0)

Footer

© 2026 GitHub, Inc.