mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
chore: sync with main
This commit is contained in:
@ -393,3 +393,30 @@ ion-input input::-webkit-date-and-time-value {
|
||||
width: 320px;
|
||||
min-height: 320px;
|
||||
}
|
||||
|
||||
/**
|
||||
* If a popover has a child ion-content (or class equivalent) then the .popover-viewport element
|
||||
* should not be scrollable to ensure the inner content does scroll. However, if the popover
|
||||
* does not have a child ion-content (or class equivalent) then the .popover-viewport element
|
||||
* should remain scrollable. This code exists globally because popover targets
|
||||
* .popover-viewport using ::slotted which only supports simple selectors.
|
||||
*
|
||||
* Note that we do not need to account for .ion-content-scroll-host here because that
|
||||
* class should always be placed within ion-content even if ion-content is not scrollable.
|
||||
*/
|
||||
.popover-viewport:has(> ion-content) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* :has has cross-browser support, but it is still relatively new. As a result,
|
||||
* we should fallback to the old behavior for environments that do not support :has.
|
||||
* Developers can explicitly enable this behavior by setting overflow: visible
|
||||
* on .popover-viewport if they know they are not going to use an ion-content.
|
||||
* TODO FW-6106 Remove this
|
||||
*/
|
||||
@supports not selector(:has(> ion-content)) {
|
||||
.popover-viewport {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user