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

Center content on desktop #186632607 #4444

Merged
merged 14 commits into from Apr 9, 2024
Merged

Conversation

tofarr
Copy link
Contributor

@tofarr tofarr commented Apr 4, 2024

Given the complexity of CSS rules, I tried to make my changes as limited as possible - using media rules to limit them to larger screens.

General questions sections are slightly wider than before and centered...
image

And the landing page now has a logo...
image

Mobile layouts should be unaffected..
image

image

Copy link

github-actions bot commented Apr 4, 2024

Heroku app: https://gyr-review-app-4444-538371ef0edb.herokuapp.com/
View logs: heroku logs --app gyr-review-app-4444 (optionally add --tail)

padding-left: 1rem;
padding-right: 1rem;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this because the layout of the landing page is fundamentally changing

@@ -46,4 +46,5 @@
</h2>
<% end %>
</div>
<%= image_tag 'questions/welcome.svg', class: 'fyst-home-image' %>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Landing page now has an image on it

@@ -5,7 +5,7 @@
<%= yield :form_question %>
<% end %>

<section class="slab question-layout">
<section class="slab question-layout <%= controller_name.gsub("_", "-") %>-outer">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a css class here that is dependent on the page allows us to do outer layout specific rules for each page

@media screen and (min-width: $tablet-up) {
.question-layout .question-wrapper {
margin: 0 auto;
max-width: 658px;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All questions pages now have their content a little bit wider and centered

display: flex;
.fyst-home-image {
width: 273px;
height: 250px;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding definite sizes here prevents annoying reflow as the image is loaded.

max-width: 658px;
}
.question-layout.landing-page-outer .question-wrapper {
max-width: none;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Landing page content has a logo and is wider - let it fill the main element

}
@media screen and (max-width: $tablet-up) {
.landing-page-container .fyst-home-image {
display: none
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide the logo on smaller screens

@tofarr tofarr force-pushed the center-on-desktop-#186632607 branch from 9211c6e to 541dc46 Compare April 8, 2024 20:23
@tofarr tofarr merged commit 61e3add into main Apr 9, 2024
7 checks passed
@tofarr tofarr deleted the center-on-desktop-#186632607 branch April 9, 2024 18:26
jenny-heath added a commit that referenced this pull request Apr 12, 2024
2024-04-12 Last release of tax season 2024

* Send reject resolution message on 4/13 and 4/22 for clients that have been notified of rejection and not yet been accepted (#4479)
* Update GYR banner for closing season (#4473)
* Always showing download button after April 25 #187355990  (#4481)
* Post-Deadline notification (#4475)
* Pre-Deadline notification (#4469)
* truncate 3rd party designee name (#4462)
* Change logic for Reminder notification (#4447)
* Close fyst #187355990 (#4472)
* Fix submission and skip flaky tests #187278919 (#4468)
* Refine AZ excise credit #186927846 (#4418)
* pre-populate w2 info (#4457)
* Center content on desktop #186632607 (#4444)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant