refactor(core): remove global hidden attribute (#25829)

resolves #17583

BREAKING CHANGE: 

The `[hidden]` attribute has been removed from Ionic's global stylesheet. The `[hidden]` attribute can continue to be used, but developers will get the [native `hidden` implementation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden) instead. The main difference is that the native implementation is easier to override using `display` than Ionic's implementation.

Developers can add the following CSS to their global stylesheet if they need the old behavior:

```css
[hidden] {
  display: none !important;
}
```
This commit is contained in:
Liam DeBeasi
2022-08-26 08:34:41 -05:00
committed by GitHub
parent 9e611f5c03
commit f5a6b5a4c4
2 changed files with 17 additions and 2 deletions

View File

@ -16,6 +16,8 @@ This is a comprehensive list of the breaking changes introduced in the major ver
- [Overlays](#version-7x-overlays)
- [Virtual Scroll](#version-7x-virtual-scroll)
- [Browser and Platform Support](#version-7x-browser-platform-support)
- [Utilities](#version-7x-utilities)
- [hidden attribute](#version-7x-hidden-attribute)
<h2 id="version-7x-components">Components</h2>
@ -62,6 +64,20 @@ This section details the desktop browser, JavaScript framework, and mobile platf
| iOS | 14+ |
| Android | 5.1+ with Chromium 79+ |
<h2 id="version-7x-utilities">Utilities</h2>
<h4 id="version-7x-hidden-attribute">`hidden` attribute</h4>
The `[hidden]` attribute has been removed from Ionic's global stylesheet. The `[hidden]` attribute can continue to be used, but developers will get the [native `hidden` implementation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden) instead. The main difference is that the native implementation is easier to override using `display` than Ionic's implementation.
Developers can add the following CSS to their global stylesheet if they need the old behavior:
```css
[hidden] {
display: none !important;
}
```
## Version 6.x

View File

@ -195,8 +195,7 @@ ion-modal-controller,
ion-picker-controller,
ion-popover-controller,
ion-toast-controller,
.ion-page-hidden,
[hidden] {
.ion-page-hidden {
/* stylelint-disable-next-line declaration-no-important */
display: none !important;
}