Skip to content

Commit 5facf58

Browse files
Eric LeeseDevtools-frontend LUCI CQ
authored andcommitted
Add autocomplete support for font-variant-alternates
Also fixed a bug where a @font-feature-values subsection has its indentation increase on any style change. Bug: 408969009 Change-Id: I9e8894447b53f331948602a4ef597a657706e30a Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7156358 Commit-Queue: Eric Leese <[email protected]> Reviewed-by: Philip Pfaffe <[email protected]>
1 parent 6428614 commit 5facf58

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

front_end/core/sdk/CSSMetadata.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,8 @@ const cornerShapeValuePresetMap = new Map([
455455
]);
456456

457457
const valuePresets = new Map([
458-
['filter', filterValuePresetMap],
459-
['backdrop-filter', filterValuePresetMap],
460-
['background', imageValuePresetMap],
461-
['background-image', imageValuePresetMap],
462-
['-webkit-mask-image', imageValuePresetMap],
458+
['filter', filterValuePresetMap], ['backdrop-filter', filterValuePresetMap], ['background', imageValuePresetMap],
459+
['background-image', imageValuePresetMap], ['-webkit-mask-image', imageValuePresetMap],
463460
[
464461
'transform',
465462
new Map([
@@ -486,6 +483,17 @@ const valuePresets = new Map([
486483
]),
487484
],
488485
['corner-shape', cornerShapeValuePresetMap],
486+
[
487+
'font-variant-alternates',
488+
new Map([
489+
['stylistic', 'stylistic(||)'],
490+
['styleset', 'styleset(||)'],
491+
['character-variant', 'character-variant(||)'],
492+
['swash', 'swash(||)'],
493+
['ornaments', 'ornaments(||)'],
494+
['annotation', 'annotation(||)'],
495+
]),
496+
]
489497
]);
490498

491499
const distanceProperties = new Set<string>([
@@ -766,6 +774,10 @@ const extraPropertyValues = new Map<string, Set<string>>([
766774
'ruby',
767775
]),
768776
],
777+
[
778+
'font-variant-alternates',
779+
new Set(['historical-forms', 'stylistic', 'styleset', 'character-variant', 'swash', 'ornaments', 'annotation'])
780+
],
769781
['vertical-align', new Set(['top', 'bottom', '-webkit-baseline-middle'])],
770782
['page-break-after', new Set(['left', 'right', 'always', 'avoid'])],
771783
['text-emphasis-style', textEmphasisStyle],

front_end/panels/elements/StylePropertiesSection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ export class StylePropertiesSection {
839839

840840
this.#ancestorRuleListElement.prepend(atRuleElement);
841841
this.#ancestorClosingBracesElement.prepend(this.indentElement(this.createClosingBrace(), 0));
842-
this.nestingLevel++;
842+
this.nestingLevel = 1;
843843
}
844844
}
845845

0 commit comments

Comments
 (0)