extensions/amp-list/0.1/amp-list.js
/**
   * Converts the amp-list to de facto layout container. Must be called in
   * mutation context.
   * @private
   */
Converts the amp-list to de facto layout container. Must be called in
mutation context.
@private
Converts the amp - list to de facto layout container . Must be called in mutation context . @private
changeToLayoutContainer_() {
    const previousLayout = this.element.getAttribute('layout');
    if (previousLayout == Layout.CONTAINER) {
      return;
    }
    this.undoPreviousLayout_(previousLayout);
    this.container_.classList.remove(
        'i-amphtml-fill-content',
        'i-amphtml-replaced-content'
    );
    const overflowElement = this.getOverflowElement();
    if (overflowElement) {
      toggle(overflowElement, false);
    }
    this.element.setAttribute('layout', 'container');
  }
changeToLayoutContainer_ ( ) { const previousLayout = this . element . getAttribute ( 'layout' ) ; if ( previousLayout == Layout . CONTAINER ) { return ; } this . undoPreviousLayout_ ( previousLayout ) ; this . container_ . classList . remove ( 'i-amphtml-fill-content' , 'i-amphtml-replaced-content' ) ; const overflowElement = this . getOverflowElement ( ) ; if ( overflowElement ) { toggle ( overflowElement , false ) ; } this . element . setAttribute ( 'layout' , 'container' ) ; }
Converts the amp-list to de facto layout container.
Converts the amp - list to de facto layout container .
// If we have already changed to layout container, no need to run again. // The overflow element is generally hidden with visibility hidden, // but after changing to layout container, this causes an undesirable // empty white space so we hide it with display none instead.