MOBILE-3814 collapsible: Change height var name to avoid confusion
parent
c626c38acd
commit
6d249498f4
|
@ -176,11 +176,11 @@ export class CoreCollapsibleItemDirective implements OnInit {
|
|||
*/
|
||||
protected setHeight(height?: number): void {
|
||||
if (height) {
|
||||
this.element.style.setProperty('--height', height + 'px');
|
||||
this.element.style.setProperty('--collapsible-height', height + 'px');
|
||||
} else if (this.expandedHeight) {
|
||||
this.element.style.setProperty('--height', this.expandedHeight + 'px');
|
||||
this.element.style.setProperty('--collapsible-height', this.expandedHeight + 'px');
|
||||
} else {
|
||||
this.element.style.removeProperty('--height');
|
||||
this.element.style.removeProperty('--collapsible-height');
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
.collapsible-item {
|
||||
--display-toggle: none;
|
||||
--height: none;
|
||||
--collapsible-height: none;
|
||||
--toggle-size: 24px;
|
||||
--gradient-size: 44px;
|
||||
|
||||
&.collapsible-loading-height {
|
||||
display: block !important;
|
||||
height: auto !important;
|
||||
--height: auto !important;
|
||||
--collapsible-height: auto !important;
|
||||
--display-toggle: none !important;
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
|||
position: relative;
|
||||
padding-bottom: var(--toggle-size); // So the Show less button can fit.
|
||||
--display-toggle: block;
|
||||
@include core-transition(height max-height, 300ms);
|
||||
height: calc(var(--height, auto) + var(--toggle-size));
|
||||
@include core-transition(height, 300ms);
|
||||
height: calc(var(--collapsible-height, auto) + var(--toggle-size));
|
||||
|
||||
.collapsible-toggle {
|
||||
position: absolute;
|
||||
|
@ -64,7 +64,7 @@
|
|||
&.collapsible-collapsed {
|
||||
overflow: hidden;
|
||||
min-height: calc(var(--toggle-size) + 12px);
|
||||
height: var(--height, auto);
|
||||
height: var(--collapsible-height, auto);
|
||||
|
||||
.collapsible-toggle-arrow {
|
||||
transform: rotate(90deg);
|
||||
|
|
|
@ -77,13 +77,15 @@ core-format-text {
|
|||
}
|
||||
&.collapsible-collapsed .core-format-text-content {
|
||||
overflow: hidden;
|
||||
height: var(--collapsible-height);
|
||||
@include core-transition(height, 300ms);
|
||||
}
|
||||
}
|
||||
|
||||
@if ($core-format-text-never-shorten) {
|
||||
&.collapsible-enabled {
|
||||
--display-toggle: none !important;
|
||||
--max-height: none !important;
|
||||
--collapsible-height: auto !important;
|
||||
|
||||
.collapsible-toggle {
|
||||
display: none !important;
|
||||
|
|
Loading…
Reference in New Issue