Skip to content

Commit 70e7248

Browse files
authored
fix(core): added missing inheritance support for text css properties (#10699)
1 parent c8bb0d7 commit 70e7248

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

packages/core/ui/text-base/index.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,15 @@ export const formattedTextProperty: Property<TextBase, FormattedString>;
194194
export const maxLinesProperty: InheritedCssProperty<Style, number>;
195195
export const textAlignmentProperty: InheritedCssProperty<Style, CoreTypes.TextAlignmentType>;
196196
export const textDecorationProperty: CssProperty<Style, CoreTypes.TextDecorationType>;
197-
export const textTransformProperty: CssProperty<Style, CoreTypes.TextTransformType>;
198-
export const textShadowProperty: CssProperty<Style, ShadowCSSValues>;
199-
export const textStrokeProperty: CssProperty<Style, StrokeCSSValues>;
200-
export const whiteSpaceProperty: CssProperty<Style, CoreTypes.WhiteSpaceType>;
197+
export const textTransformProperty: InheritedCssProperty<Style, CoreTypes.TextTransformType>;
198+
export const textShadowProperty: InheritedCssProperty<Style, ShadowCSSValues>;
199+
export const textStrokeProperty: InheritedCssProperty<Style, StrokeCSSValues>;
200+
export const whiteSpaceProperty: InheritedCssProperty<Style, CoreTypes.WhiteSpaceType>;
201201
export const textOverflowProperty: CssProperty<Style, CoreTypes.TextOverflowType>;
202-
export const letterSpacingProperty: CssProperty<Style, number>;
203-
export const lineHeightProperty: CssProperty<Style, number>;
202+
export const letterSpacingProperty: InheritedCssProperty<Style, number>;
203+
export const lineHeightProperty: InheritedCssProperty<Style, number>;
204204

205-
//Used by tab view
205+
// Used by tab view
206206
export function getTransformedText(text: string, textTransform: CoreTypes.TextTransformType): string;
207207

208208
export const resetSymbol: symbol;

packages/core/ui/text-base/text-base-common.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,15 @@ export const textAlignmentProperty = new InheritedCssProperty<Style, CoreTypes.T
290290
textAlignmentProperty.register(Style);
291291

292292
const textTransformConverter = makeParser<CoreTypes.TextTransformType>(makeValidator<CoreTypes.TextTransformType>('initial', 'none', 'capitalize', 'uppercase', 'lowercase'));
293-
export const textTransformProperty = new CssProperty<Style, CoreTypes.TextTransformType>({
293+
export const textTransformProperty = new InheritedCssProperty<Style, CoreTypes.TextTransformType>({
294294
name: 'textTransform',
295295
cssName: 'text-transform',
296296
defaultValue: 'initial',
297297
valueConverter: textTransformConverter,
298298
});
299299
textTransformProperty.register(Style);
300300

301-
export const textShadowProperty = new CssProperty<Style, string | ShadowCSSValues>({
301+
export const textShadowProperty = new InheritedCssProperty<Style, string | ShadowCSSValues>({
302302
name: 'textShadow',
303303
cssName: 'text-shadow',
304304
affectsLayout: __APPLE__,
@@ -308,7 +308,7 @@ export const textShadowProperty = new CssProperty<Style, string | ShadowCSSValue
308308
});
309309
textShadowProperty.register(Style);
310310

311-
export const textStrokeProperty = new CssProperty<Style, string | StrokeCSSValues>({
311+
export const textStrokeProperty = new InheritedCssProperty<Style, string | StrokeCSSValues>({
312312
name: 'textStroke',
313313
cssName: 'text-stroke',
314314
affectsLayout: __APPLE__,
@@ -319,7 +319,7 @@ export const textStrokeProperty = new CssProperty<Style, string | StrokeCSSValue
319319
textStrokeProperty.register(Style);
320320

321321
const whiteSpaceConverter = makeParser<CoreTypes.WhiteSpaceType>(makeValidator<CoreTypes.WhiteSpaceType>('initial', 'normal', 'nowrap'));
322-
export const whiteSpaceProperty = new CssProperty<Style, CoreTypes.WhiteSpaceType>({
322+
export const whiteSpaceProperty = new InheritedCssProperty<Style, CoreTypes.WhiteSpaceType>({
323323
name: 'whiteSpace',
324324
cssName: 'white-space',
325325
defaultValue: 'initial',

0 commit comments

Comments
 (0)