Skip to content

Commit 87c612f

Browse files
Small FWE CSS tweak (#12994)
On screens smaller than 500px wide, images were wider than the viewport. ## Presubmit checklist - [x] If you are unwilling, or unable, to sign the CLA, even for a _tiny_, one-word PR, please file an issue instead of a PR. - [x] If this PR is not meant to land until a future stable release, mark it as draft with an explanation. - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style)—for example, it doesn't use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first-person pronouns). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 2d9444f commit 87c612f

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

site/lib/_sass/components/_tutorial_pages.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,19 @@
2828
margin: 3rem 1rem;
2929
}
3030

31-
img {
31+
img {
3232
display:flex;
3333
justify-self: center;
34+
max-width: 500px;
35+
width: 100%;
3436
}
3537
}
38+
39+
// Images are centered and have a
40+
// max width of 500px within the /learn directory
41+
.learn-image-wrapper {
42+
display: block;
43+
margin: 0 auto;
44+
max-width: 500px;
45+
width: 100%;
46+
}

src/content/learn/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ showToc: false
66
---
77

88
<img src='/assets/images/docs/learn/learn-flutter-anyway.png'
9-
alt="An image of Dash in front of a blackboard." class="image-wrapper" style="max-width: 500px; display:flex; justify-self: center;">
9+
alt="An image of Dash in front of a blackboard." class="image-wrapper learn-image-wrapper">
1010

1111
## For beginners
1212

src/content/learn/pathway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Deepen your understanding of how Flutter works under the hood by watching this v
3939

4040
</Stepper>
4141

42-
<img src="/assets/images/docs/learn/beginner.jpg" alt="Dash with question marks around her; looking curious." class="image-wrapper" style="max-width: 500px; display:flex; justify-self: center;">
42+
<img src="/assets/images/docs/learn/beginner.jpg" alt="Dash with question marks around her; looking curious." class="image-wrapper learn-image-wrapper">
4343

4444

4545

src/content/learn/tutorial/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If either of those aren't true, please start at the [Learning pathway page](/lea
2828

2929
</div>
3030
<div class="centered-rows">
31-
<DashImage figure image="learn/tutorial-hero.png" alt="Dash with magnifying glass" img-style="max-width: 500px;" />
31+
<DashImage figure image="learn/tutorial-hero.png" alt="Dash with magnifying glass" img-class="learn-image-wrapper" />
3232
</div>
3333
</div>
3434

0 commit comments

Comments
 (0)