Skip to content
Open

Develop #2956

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
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Boilerplate for layout tasks
Replace `<your_account>` with your Github username and copy the links to Pull Request description:
- [DEMO LINK](https://<your_account>.github.io/layout_snake/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_snake/report/html_report/)
- [DEMO LINK](https://Roman-Bilichenko.github.io/layout_snake/)
- [TEST REPORT LINK](https://Roman-Bilichenko.github.io/layout_snake/report/html_report/)

> Follow [this instructions](https://mate-academy.github.io/layout_task-guideline)

## ❗️❗️❗️ DON'T FORGET TO PROOFREAD YOUR CODE WITH [CHECKLIST](https://github.com/mate-academy/layout_snake/blob/master/checklist.md) BEFORE SENDING YOUR PULL REQUEST❗️❗️❗️

## The task
Display six colored blocks on the screen without any extra margins:

- Use `flexbox`
- Each block should be `300px` high.
- Each block should have its number (1 to 6) placed in its center in white Arial 100px font.
Expand Down
29 changes: 18 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Snake</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<h1>Snake</h1>
</body>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Snake</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="container">
<div class="block block-1">1</div>
<div class="block block-2">2</div>
<div class="block block-3">3</div>
<div class="block block-4">4</div>
<div class="block block-5">5</div>
<div class="block block-6">6</div>
</div>
</body>
</html>
74 changes: 74 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 100px;
color: white;
margin: 0;
--height: 300px;
}

.container {
display: flex;
background-color: rgb(0, 0, 0);
flex-wrap: wrap;
}

.block {
flex-grow: 1;
text-align: center;
line-height: var(--height);
height: var(--height);
min-width: var(--height);
}

.block-1 {
background-color: rgba(100%, 0%, 0%);
}

.block-2 {
background-color: rgba(80%, 0%, 0%);
}

.block-3 {
background-color: rgba(60%, 0%, 0%);
}

.block-4 {
background-color: rgba(40%, 0%, 0%);
}

.block-5 {
background-color: rgba(20%, 0%, 0%);
}

@media (min-width: 600px) and (max-width: 899px) {
.block-3 {
order: 2;
}

.block-4 {
order: 1;
}

.block-5,
.block-6 {
order: 3;
}
}

@media (min-width: 900px) {
.block-4 {
order: 3;
}

.block-5 {
order: 2;
}

.block-6 {
order: 1;
}

.block {
flex: 33.33%;
}
}