-
Notifications
You must be signed in to change notification settings - Fork 1
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
ДЗ - Лекция 2 - 1. Компонент «Гистограмма» #13
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.histogramCard { | ||
display: flex; | ||
flex-wrap: wrap; | ||
font-family: 'Inter', sans-serif; | ||
padding: 24px; | ||
font-size: 16px; | ||
line-height: 24px; | ||
color: var(--black); | ||
border: 1px solid var(--grey-3); | ||
border-radius: 8px; | ||
} | ||
|
||
.histogramCard__result { | ||
flex-basis: 50%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. лишнее |
||
margin: 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. лишнее There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Без этого маржина большие отступы - наследуются от нормалайз. |
||
opacity: 0.8; | ||
text-align: left; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. лишнее |
||
} | ||
|
||
.histogramCard__link { | ||
flex-basis: 50%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. лишнее |
||
margin: 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. лишнее (что можно было бы - марджин слева 8px) |
||
text-align: right; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. лишнее |
||
color: #4263EB; | ||
} | ||
|
||
.histogramCard__resultNumber { | ||
flex-basis: 100%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. лишнее |
||
margin-top: 6px; | ||
margin-bottom: 39px; | ||
font-size: 20px; | ||
font-weight: 400; | ||
} | ||
|
||
.histogram { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. наш блок называется как я вижу .histogramCard, так что - .histogramCard__chart? |
||
display: flex; | ||
flex-basis: 100%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. лишнее |
||
flex-wrap: nowrap; | ||
gap: 1px; | ||
align-items: end; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. и еще высоту фиксируем как 50px |
||
} | ||
|
||
.histogram__item { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. .histogramCard__chartItem |
||
background: #4263EB; | ||
height: 50px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. чтобы здесь задавать в процентах |
||
flex-grow: 1; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,42 @@ | |
<link rel="stylesheet" href="./histogram.css"> | ||
</head> | ||
<body> | ||
|
||
<div class="histogramCard"> | ||
<p class="histogramCard__result">Total orders</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. чтобы result + link были на одном уровне и располагались по разных сторонам - нужно завернуть в общего родителя, флекс контейнер, и выравнивать |
||
<p class="histogramCard__link">View all</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<h4 class="histogramCard__resultNumber">50254</h4> | ||
<div class="histogram"> | ||
<div class="histogram__item" style="height: 50%"></div> | ||
<div class="histogram__item" style="height: 35%"></div> | ||
<div class="histogram__item"></div> | ||
<div class="histogram__item" style="height: 85%"></div> | ||
<div class="histogram__item" style="height: 60%"></div> | ||
<div class="histogram__item" style="height: 20%"></div> | ||
<div class="histogram__item" style="height: 5%"></div> | ||
<div class="histogram__item" style="height: 55%"></div> | ||
<div class="histogram__item" style="height: 75%"></div> | ||
<div class="histogram__item" style="height: 95%"></div> | ||
<div class="histogram__item"></div> | ||
<div class="histogram__item" style="height: 10%"></div> | ||
<div class="histogram__item" style="height: 50%"></div> | ||
<div class="histogram__item" style="height: 25%"></div> | ||
<div class="histogram__item" style="height: 80%"></div> | ||
<div class="histogram__item" style="height: 30%"></div> | ||
<div class="histogram__item"></div> | ||
<div class="histogram__item"></div> | ||
<div class="histogram__item" style="height: 95%"></div> | ||
<div class="histogram__item" style="height: 60%"></div> | ||
<div class="histogram__item" style="height: 10%"></div> | ||
<div class="histogram__item" style="height: 5%"></div> | ||
<div class="histogram__item" style="height: 25%"></div> | ||
<div class="histogram__item" style="height: 50%"></div> | ||
<div class="histogram__item" style="height: 75%"></div> | ||
<div class="histogram__item"></div> | ||
<div class="histogram__item" style="height: 55%"></div> | ||
<div class="histogram__item" style="height: 45%"></div> | ||
<div class="histogram__item" style="height: 70%"></div> | ||
<div class="histogram__item"></div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
.footer { | ||
font-family: 'Inter', sans-serif; | ||
padding: 39px 160px 136px; | ||
|
||
} | ||
|
||
.footer__heading { | ||
|
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.
16 24 24