ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.81k stars 994 forks source link

bug: Tailwind styles not applied immediately in SvelteKit project #6281

Closed Tommertom closed 1 year ago

Tommertom commented 1 year ago

Bug Report

Capacitor Version

   Capacitor Doctor

Latest Dependencies:

  @capacitor/cli: 4.6.3
  @capacitor/core: 4.6.3
  @capacitor/android: 4.6.3
  @capacitor/ios: 4.6.3

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/android: 4.6.2
  @capacitor/cli: 4.6.2
  @capacitor/core: 4.6.2

[success] Android looking great! 👌

Platform(s)

Only tested Android - Pixel 3 API 30 (emulator) (Pixel_3_API_30)

Current Behavior

When launching the Skeleton starter template in an Android Emulator (via Capacitor), the styles are not immediately applied leadng to this initial view:

image

Later replaced (a few seconds) by

image

Steps To Reproduce

See repo https://github.com/Tommertom/skeleton-capacitor-test

Reproduction

Expected Behavior

Styles applied immediately.

Code Reproduction

See repo

Other Technical Details

Android Studio Dolphin | 2021.3.1 Patch 1

npm --version output: 8.10.0

node --version output: v16.14.2

Additional Context

Also posted on https://github.com/skeletonlabs/skeleton/issues/876

SkeletonUI is an UI library built using TailwindCSS - so this is assumed to be related to Tailwind icm SvelteKit and Capacitor. But that could be proven wrong - any hints on how to detect what is happening? Use chrome dev inspector?

Tommertom commented 1 year ago

After testing it seems more related to Skeleton bootstrapping. But not conclusive. I have posted some findings on the repo of Skeleton - https://github.com/skeletonlabs/skeleton/issues/876

jcesarmobile commented 1 year ago

I see the same behaviour on an android app that just uses a WebView with no Capacitor involved, so I don't think this is a Capacitor bug but a skeleton bug and they have closed the linked issue, so I'm closing it too.