diff --git a/src/core/apply.ts b/src/core/apply.ts index 877af59..0acc143 100644 --- a/src/core/apply.ts +++ b/src/core/apply.ts @@ -34,47 +34,49 @@ export const applyHelper = throw new Error("Invalid styling syntax."); } - // check if width & size using responsive method or not - instanceStyle.responsiveSize(syntax); + // Check for android platform only + instanceStyle.android(syntax); - // auto generate percentage size - instanceStyle.percentSize(syntax); + // Check for ios platform only + instanceStyle.ios(syntax); - // auto generate fixed width size - instanceStyle.fixedWidthSize(syntax); + // Check if there's notch or not. + instanceStyle.notch(syntax); - // auto generate fixed width size - instanceStyle.fixedHeightSize(syntax); + if (!syntax.includes("android:") && !syntax.includes("ios:") && !syntax.includes("notch:")) { + // check if width & size using responsive method or not + instanceStyle.responsiveSize(syntax); - // auto generate transform position - instanceStyle.transformTranslate(syntax); + // auto generate percentage size + instanceStyle.percentSize(syntax); - // auto generate transform scale - instanceStyle.transformScale(syntax); + // auto generate fixed width size + instanceStyle.fixedWidthSize(syntax); - // auto generate transform skew - instanceStyle.transformSkew(syntax); + // auto generate fixed width size + instanceStyle.fixedHeightSize(syntax); - // auto generate transform rotate - instanceStyle.transformRotate(syntax); + // auto generate transform position + instanceStyle.transformTranslate(syntax); - // Check if there's coloring opacity - instanceStyle.colorOpacity(syntax); + // auto generate transform scale + instanceStyle.transformScale(syntax); - // Check if there's any dark theme - instanceStyle.darkTheme(syntax, themeContext?.mode ?? "system"); + // auto generate transform skew + instanceStyle.transformSkew(syntax); - // Generate from pre-defined styles - instanceStyle.predefinedStyles(syntax); + // auto generate transform rotate + instanceStyle.transformRotate(syntax); - // Check for android platform only - instanceStyle.android(syntax); + // Check if there's coloring opacity + instanceStyle.colorOpacity(syntax); - // Check for ios platform only - instanceStyle.ios(syntax); + // Check if there's any dark theme + instanceStyle.darkTheme(syntax, themeContext?.mode ?? "system"); - // Check if there's notch or not. - instanceStyle.notch(syntax); + // Generate from pre-defined styles + instanceStyle.predefinedStyles(syntax); + } }); outputStyles.push(instanceStyle.getOutputStyle());