Skip to content

Validator doesn't understand different layouts for different types of amp-carousels #20374

@Gregable

Description

@Gregable

From https://www.ampproject.org/docs/reference/components/amp-carousel#type

<amp-carousel type=carousel> for example, doesn't support the responsive layout.

The AMP Validator allows the superset of all layouts for either carousel or slides types. This is OK, but being more specific would produce more actionable information for developers when trying to build a page with an <amp-carousel>.

The plan is to constrain type=slides or unset type to the layouts:

    supported_layouts: FILL                                                     
    supported_layouts: FIXED                                                    
    supported_layouts: FIXED_HEIGHT                                             
    supported_layouts: FLEX_ITEM                                                
    supported_layouts: INTRINSIC                                                
    supported_layouts: NODISPLAY                                                
    supported_layouts: RESPONSIVE 

And to constrain type=carousel to the layouts:

    supported_layouts: FIXED                                                    
    supported_layouts: FIXED_HEIGHT                                             
    supported_layouts: NODISPLAY  

I think this is the correct set of supported layouts.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions