Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Positioning for amp-story-desktop-one-panel page elements #34824

Merged
merged 16 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions extensions/amp-story/1.0/amp-story-desktop-one-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,20 @@


.i-amphtml-story-desktop-one-panel {
--i-amphtml-story-page-large-desktop-ratio: 69 / 116;
--i-amphtml-story-page-small-desktop-ratio: 3 / 4;
}

.i-amphtml-story-desktop-one-panel amp-story-page {
margin: auto !important;
height: min(752px, calc(100vh - 148px)) !important;
width: min(447px, calc((100vh - 148px) * var(--i-amphtml-story-page-large-desktop-ratio))) !important;
processprocess marked this conversation as resolved.
Show resolved Hide resolved
border-radius: 10px !important;
}

@media(max-height: 756px) {
.i-amphtml-story-desktop-one-panel amp-story-page {
height: 100vh !important;
width: calc(100vh * var(--i-amphtml-story-page-small-desktop-ratio)) !important;
}
}
18 changes: 17 additions & 1 deletion test/visual-diff/visual-tests
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,28 @@
},
{
"url": "examples/visual-tests/amp-story/amp-story-desktop-one-panel.html",
"name": "amp-story: desktop one panel",
"name": "amp-story: desktop one panel desktop default margin",
"viewport": {"width": 1440, "height": 900},
"loading_complete_selectors": [
".i-amphtml-story-loaded",
],
},
{
"url": "examples/visual-tests/amp-story/amp-story-desktop-one-panel.html",
"name": "amp-story: desktop one panel desktop panel max height",
"viewport": {"width": 1440, "height": 1000},
"loading_complete_selectors": [
".i-amphtml-story-loaded",
],
},
{
"url": "examples/visual-tests/amp-story/amp-story-desktop-one-panel.html",
"name": "amp-story: desktop one panel short screen no margin",
"viewport": {"width": 1440, "height": 750},
"loading_complete_selectors": [
".i-amphtml-story-loaded",
],
},
{
"url": "examples/visual-tests/amp-story/basic.rtl.html",
"name": "amp-story: basic (rtl)",
Expand Down