question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: bundle includes custom styles to support very old IE versions which cause UI issues

See original GitHub issue

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

The latest ionic 6.x does not support old IE browser versions - see https://ionicframework.com/docs/reference/browser-support, however, the bundle created still includes styles to fix some UI issues for old IE browser versions. For example, https://github.com/ionic-team/ionic-framework/blob/main/core/src/css/normalize.scss#L37

Please note that those styles are still included even though the .browserslistrc does not include the line to support for IE or Edge altogether. For example, here is my *.browserslistrc file

Chrome >=60
# Firefox >=63
# Edge >=79
Safari >=13
iOS >=13

The problem is that those fixes breaks some UI in my application (specifically, makes the images displayed with the wrong aspect ratio)

Expected Behavior

Not to include styles/fixes for unsupported/very old browsers

Steps to Reproduce

  1. create new ionic project from one of the started template projects
  2. add an image to the main page
  3. exclude support for IE/Edge browser from .browserslistrc
  4. build and run the application
  5. check that the image added has **max-width: 100%" style applied from normalize.css, which is the fix for IE 8/9/10 - see https://github.com/ionic-team/ionic-framework/blob/main/core/src/css/normalize.scss#L37

OR, you can clone this project https://github.com/ryaa/ionic-includes-old-ie-browser-styles, change to the project directory, run npm install and then ionic serve and check the styles applied to the image displayed on the main page (see the step 4 above).

Code Reproduction URL

https://github.com/ryaa/ionic-includes-old-ie-browser-styles

Ionic Info

Ionic:

   Ionic CLI                     : 6.20.3 (/Users/alexryltsov/.nvm/versions/node/v18.12.0/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.4.0
   @angular-devkit/build-angular : 15.0.3
   @angular-devkit/schematics    : 15.0.3
   @angular/cli                  : 15.0.3
   @ionic/angular-toolkit        : 6.1.0

Capacitor:

   Capacitor CLI      : 4.6.1
   @capacitor/android : not installed
   @capacitor/core    : 4.6.1
   @capacitor/ios     : not installed

Utility:

   cordova-res : not installed globally
   native-run  : 1.7.1

System:

   NodeJS : v18.12.0 (/Users/alexryltsov/.nvm/versions/node/v18.12.0/bin/node)
   npm    : 9.0.0
   OS     : macOS Monterey

Additional Information

See the style from from normalize.css applied to the image Screen Shot 2022-12-12 at 09 40 55 Screen Shot 2022-12-12 at 09 41 45

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
liamdebeasicommented, Dec 12, 2022

Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic-framework/pull/26465, and a fix will be available in an upcoming release of Ionic Framework.

0reactions
ryaacommented, Dec 12, 2022

Thanks for the reply. Are you able to ensure .leaflet-marker-icon has a higher selector specificity that way it overrides max-width: 100%?

yes. adding the below to my app wide scss fixed my problem

.leaflet-marker-icon {
    max-width: none;
}

We do not need this anymore, so I am removing the IE-specific code in https://github.com/ionic-team/ionic-framework/pull/26465. It looks like this was added years ago and never reevaluated when we dropped IE support.

Awesome. Thank you very much for the great support!!!

P.S. if you don’t mind, i will remove the screenshots from my previous post for the security reasons. thank you again

Read more comments on GitHub >

github_iconTop Results From Across the Web

bootstrap-ie11 - GitHub Pages
From Bootstrap 5.2 onwards, CSS custom properties are used extensively which can cause issues with the ie11CustomProperties polyfill.
Read more >
Bootstrap 5 dropping IE 10 & 11 browser support - Themesberg
Bootstrap 5 is officially dropping browser support for Internet Explorer 10 and 11. Where does that leave us and will the be workarounds...
Read more >
Internet Explorer (IE) mode troubleshooting and FAQ
Use this section as a guide to help you troubleshoot and fix the two most common issues when moving to Microsoft Edge with...
Read more >
10 Most Common Bootstrap Mistakes That Developers Make
It comes bundled with basic HTML and CSS design templates that include many common UI ... some Bootstrap mistakes are pretty subtle, or...
Read more >
Handling common JavaScript problems - MDN Web Docs
Things have improved significantly since then; modern browsers do a good job of supporting "classic JavaScript features", and the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found