mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(css): text-stroke support (#10399)
closes https://github.com/NativeScript/NativeScript/issues/3597 closes https://github.com/NativeScript/NativeScript/issues/3972
This commit is contained in:
@@ -14,6 +14,7 @@ import { CoreTypes } from '../../core-types';
|
||||
import { TextBase as TextBaseDefinition } from '.';
|
||||
import { Color } from '../../color';
|
||||
import { ShadowCSSValues, parseCSSShadow } from '../styling/css-shadow';
|
||||
import { StrokeCSSValues, parseCSSStroke } from '../styling/css-stroke';
|
||||
|
||||
const CHILD_SPAN = 'Span';
|
||||
const CHILD_FORMATTED_TEXT = 'formattedText';
|
||||
@@ -288,6 +289,16 @@ export const textShadowProperty = new CssProperty<Style, string | ShadowCSSValue
|
||||
});
|
||||
textShadowProperty.register(Style);
|
||||
|
||||
export const textStrokeProperty = new CssProperty<Style, string | StrokeCSSValues>({
|
||||
name: 'textStroke',
|
||||
cssName: 'text-stroke',
|
||||
affectsLayout: global.isIOS,
|
||||
valueConverter: (value) => {
|
||||
return parseCSSStroke(value);
|
||||
},
|
||||
});
|
||||
textStrokeProperty.register(Style);
|
||||
|
||||
const whiteSpaceConverter = makeParser<CoreTypes.WhiteSpaceType>(makeValidator<CoreTypes.WhiteSpaceType>('initial', 'normal', 'nowrap'));
|
||||
export const whiteSpaceProperty = new CssProperty<Style, CoreTypes.WhiteSpaceType>({
|
||||
name: 'whiteSpace',
|
||||
|
||||
Reference in New Issue
Block a user