ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.04k stars 13.51k forks source link

bug: css class .plt-desktop is used in native android #29798

Open lil5 opened 2 months ago

lil5 commented 2 months ago

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

.plt-desktop class is set to the html element in native android

Expected Behavior

Previously plt-desktop was only used in pwa mode and not used in the native app.

Steps to Reproduce

add the following to your css code css

html.plt-desktop {
  desplay: none;
}

Run in;

  1. native ios (selector is not used)
  2. pwa (selector is used)
  3. native android (selector is used)

Code Reproduction URL

https://github.com/lil5/bug-1

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/opt/homebrew/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/react 8.2.7

Capacitor:

Capacitor CLI : 6.1.2 @capacitor/android : 6.1.2 @capacitor/core : 6.1.2 @capacitor/ios : 6.1.2

Utility:

cordova-res : not installed globally native-run (update available: 2.0.1) : 1.7.3

System:

NodeJS : v22.5.1 (/opt/homebrew/Cellar/node/22.5.1/bin/node) npm : 10.8.2 OS : macOS Unknown

Additional Information

It would be nice if this is added as a breaking change in the changelog for ionic 8

lil5 commented 2 months ago

I managed to fix it for my use case with this selector instead: .plt-desktop:not(.plt-hybrid)