Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
55 changes: 55 additions & 0 deletions 04-lection2/01-histogram/histogram.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.histogram {
border: 1px solid #ACB5BD;
border-radius: 8px;
display: flex;
flex-direction: column;
padding: 16px 24px 24px;
}

.histogram__header {
display: flex;
justify-content: space-between;
}

.histogram__title {
display: inline-block;
font-family: Inter;
font-weight: 400;
font-size: 16px;
line-height: 24px;
letter-spacing: 0%;
margin-bottom: 6px;
}

.histogram__counter {
font-family: Inter;
font-weight: 400;
font-size: 20px;
line-height: 26px;
letter-spacing: 0%;

Choose a reason for hiding this comment

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

margin-bottom: 39px?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Почему 39px?
39 до первого столбика
до второго уже 54px
это же переменное расстояние

Choose a reason for hiding this comment

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

нет, марджин снизу это не переменное расстяние, это конкрентное расстояние от .histogram__counter до histogram__preview

margin-bottom: 39px;
}

.histogram__preview {
height: 50px;
display: flex;
align-items: flex-end;
height: 50px;
gap: 1px;
}

.histogram__column {
width: 100%;
background-color: #4263EB;
}

.histogram__link {
text-decoration: none;
font-family: Inter;
font-weight: 400;
font-size: 16px;
line-height: 24px;
letter-spacing: 0%;
color: #4263EB;
margin-top: 3px;
}
50 changes: 43 additions & 7 deletions 04-lection2/01-histogram/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,47 @@
<!DOCTYPE html>
<!-- Страница с гистограммой -->
<html lang="ru">
<head>
<link rel="stylesheet" href="../../assets/css/main.css">
<link rel="stylesheet" href="./histogram.css">
</head>
<body>

</body>
</html>
<head>
<link rel="stylesheet" href="../../assets/css/main.css">
<link rel="stylesheet" href="./histogram.css">
</head>

<body>
<div class="histogram">
<div class="histogram__header">
<div class="histogram__title">Total orders</div>
<a class="histogram__link" href="#">View all</a>
</div>
<div class="histogram__counter">50254</div>
<div class="histogram__preview">
<div style="height: 100%;" class="histogram__column"></div>
<div style="height: 45%;" class="histogram__column"></div>
<div style="height: 39%;" class="histogram__column"></div>
<div style="height: 18%;" class="histogram__column"></div>
<div style="height: 29%;" class="histogram__column"></div>
<div style="height: 46%;" class="histogram__column"></div>
<div style="height: 89%;" class="histogram__column"></div>
<div style="height: 92%;" class="histogram__column"></div>
<div style="height: 44%;" class="histogram__column"></div>
<div style="height: 88%;" class="histogram__column"></div>
<div style="height: 54%;" class="histogram__column"></div>
<div style="height: 19%;" class="histogram__column"></div>
<div style="height: 66%;" class="histogram__column"></div>
<div style="height: 46%;" class="histogram__column"></div>
<div style="height: 89%;" class="histogram__column"></div>
<div style="height: 92%;" class="histogram__column"></div>
<div style="height: 44%;" class="histogram__column"></div>
<div style="height: 88%;" class="histogram__column"></div>
<div style="height: 54%;" class="histogram__column"></div>
<div style="height: 19%;" class="histogram__column"></div>
<div style="height: 66%;" class="histogram__column"></div>
<div style="height: 85%;" class="histogram__column"></div>
<div style="height: 47%;" class="histogram__column"></div>
<div style="height: 62%;" class="histogram__column"></div>
<div style="height: 84%;" class="histogram__column"></div>
</div>
</div>
</body>

</html>
12 changes: 7 additions & 5 deletions assets/css/main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@import '../fonts/fonts.css';

@import 'normalize.css';
@import '../../components/content/content.css';
@import '../../components/footer/footer.css';
@import '../../components/header/header.css';
@import '../../components/page/page.css';
@import '../../components/wrapper/wrapper.css';
:root {
--white: #ffffff;
--black: #212429;
Expand All @@ -11,14 +15,12 @@
--grey-2: #DDE2E5;
--grey-3: #ACB5BD;
--grey-4: #495057;

--error: var(--red);
--success: var(--blue);

--primary: var(--blue);
--secondary: var(--purple);
}

* {
font-family: 'Roboto', sans-serif;
}
}
Loading