ampproject / ampproject/amphtml

🍱 [amp-base-carousel:1.0] amp-base-carousel doesn't change aspect ratio on desktop as expected

Open
#37,024 1 comment 0 reactions 1 assignee Claimed by @alanorozco View on GitHub
Stale Type: Bug WG: components
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

AMP-base-carousel when used in Wordpress via the official plugin and when using `visible count` parameters doesn't work on Desktop because of hardcoded padding-top value on the `i-amphtml-sizer` node.

Code Snippet used:
```

```

Generated output
``

Because the padding-top property is appended as Style attribute the generated rules from visible-count' would not apply (screenshot below).

Schermata 2021-11-22 alle 12 44 47

### Reproduction Steps

- use amp-base-carousel component with visible-count setting in Wordpress via AMP plugin.
- observe the generated output.
- Desktop CSS rules to apply a different `visible-count `would not work due to the winning in style padding-top property value.

### Relevant Logs

_No response_

### Browser(s) Affected

_No response_

### OS(s) Affected

_No response_

### Device(s) Affected

_No response_

### AMP Version Affected

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.