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
Responsive design #14
Conversation
maquetado/scss/styles.scss
Outdated
.book-container { | ||
align-items: center; | ||
flex-direction: column; | ||
height: 520px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to set a height for your containers, you can let the inner content set this for you.
maquetado/scss/styles.scss
Outdated
@@ -13,6 +13,7 @@ | |||
|
|||
.book-container { | |||
display: flex; | |||
flex-direction: row; | |||
background-color: $white; | |||
box-shadow: 4px 4px 10px 0 $black-05; | |||
max-width: 1000px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have margin: 60px auto;
set in this class. You shouldn't use margin top in this case to separate this element from the redirect arrow. It's better to set margin-bottom in the arrow itself as margin-bottom: 60px;
maquetado/scss/styles.scss
Outdated
} | ||
|
||
.redirect-arrow { | ||
margin-left: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned above, the redirect arrow should have margin: 0 0 60px 100px;
instead of setting margin: 60px auto;
in your book-container
class. Then set margin: 0;
here in the media query.
maquetado/scss/styles.scss
Outdated
@@ -13,6 +13,7 @@ | |||
|
|||
.book-container { | |||
display: flex; | |||
flex-direction: row; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember the alphabetical order.
maquetado/scss/styles.scss
Outdated
box-shadow: 4px 4px 10px 0 $black-05; | ||
flex-direction: column; | ||
max-width: 330px; | ||
margin: 30px auto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, you should only use margin-bottom: 30px;
to separate one element from another and padding for positioning inner elements. The auto part is not need since you are already centering your content with align-items: center;
maquetado/scss/styles.scss
Outdated
left: 220px; | ||
position: absolute; | ||
top: 20px; | ||
transform: rotate(15deg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following properties are already set outside the media query:
content: '';
background: url('./assets/book-badge.png') no-repeat center/contain;
left: 220px;
position: absolute;
transform: rotate(15deg);
Don't re write them unless you're going to override them for other value
maquetado/scss/styles.scss
Outdated
|
||
.book-info-container { | ||
flex-grow: 0; | ||
margin-right: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maquetado/scss/styles.scss
Outdated
} | ||
|
||
.book-title-container { | ||
margin-bottom: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maquetado/scss/styles.scss
Outdated
|
||
.book-title { | ||
font-size: 20px; | ||
margin-right: 10px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment. This element has top and bottom margins. Set them to 0
outside this media query and use the title container to set the margin bottom to separate the title from the content
@@ -56,3 +56,79 @@ | |||
display: flex; | |||
flex-direction: row; | |||
} | |||
|
|||
@media only screen and (max-width: 1024px) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line
…d responsiveness margins properties for index
maquetado/scss/styles.scss
Outdated
@@ -39,7 +39,7 @@ | |||
|
|||
.redirect-arrow { | |||
font-size: 20px; | |||
margin-left: 100px; | |||
margin-left: 0 0 60px 100px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are using a shorthand. This should be
margin-left: 0 0 60px 100px; | |
margin: 0 0 60px 100px; |
Summary
Added responsive style @
index.html
for mobile view.Screenshots
Mobile:
Default:
Trello Card
https://trello.com/c/5zaWJ1dG/14-dise%C3%B1o-responsive