-
Notifications
You must be signed in to change notification settings - Fork 2.5k
solution #2966
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
base: master
Are you sure you want to change the base?
solution #2966
Changes from all commits
92561ff
0ae4595
85b10a3
02b986d
02685fd
32e9fd1
916b18d
8585816
134a279
e9c3921
66b63d3
8fd1317
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 |
|---|---|---|
| @@ -1,3 +1,49 @@ | ||
| { | ||
| "extends": "@mate-academy/linthtml-config" | ||
| "attr-bans": [ | ||
| "align", | ||
| "background", | ||
| "bgcolor", | ||
| "border", | ||
| "frameborder", | ||
| "style" | ||
| ], | ||
| "attr-name-ignore-regex": "viewBox", | ||
| "attr-no-dup": true, | ||
| "attr-quote-style": "double", | ||
| "attr-req-value": true, | ||
| "class-no-dup": true, | ||
| "doctype-first": true, | ||
| "doctype-html5": true, | ||
| "fig-req-figcaption": true, | ||
| "head-req-title": true, | ||
| "html-req-lang": true, | ||
| "id-class-style": false, | ||
| "id-no-dup": true, | ||
| "img-req-src": true, | ||
| "img-req-alt": "allownull", | ||
| "indent-width": 2, | ||
| "indent-style": "spaces", | ||
| "indent-width-cont": true, | ||
| "input-radio-req-name": true, | ||
| "spec-char-escape": true, | ||
| "tag-bans": [ | ||
| "b", | ||
| "i", | ||
| "u", | ||
| "center", | ||
| "style", | ||
| "marquee", | ||
| "font", | ||
| "s" | ||
| ], | ||
| "tag-name-lowercase": true, | ||
| "tag-name-match": true, | ||
| "tag-self-close": "never", | ||
| "tag-close": true, | ||
| "text-ignore-regex": "&", | ||
| "title-no-dup": true, | ||
| "line-end-style": "lf", | ||
| "attr-new-line": 2, | ||
| "attr-name-style": "dash", | ||
| "attr-no-unsafe-char": true | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <!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>Snakee</title> | ||
|
|
||
| <link rel="stylesheet" href="/style.e308ff8e.css"> | ||
| <script src="/style.e308ff8e.js"></script></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> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,23 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" | ||
| <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> | ||
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
| <title>Snakee</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> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| * { | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
| margin: 0; | ||
| } | ||
|
|
||
| .container { | ||
|
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. Generally you are doing a mobile first approach here, where you first style for screen smaller than 600px, that's good however when doing so logically these style for screen smaller than 600px should be declared before |
||
| display: flex; | ||
| flex-wrap: wrap; | ||
| flex-direction: row; | ||
| } | ||
|
|
||
| .block { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| height: 300px; | ||
| width: 100%; | ||
| font-size: 100px; | ||
| font-family: Arial, Helvetica, sans-serif; | ||
| color: white; | ||
| } | ||
|
|
||
| .block--1 { | ||
| background-color: rgb(255, 0, 0); | ||
| } | ||
|
|
||
| .block--2 { | ||
| background-color: rgb(204, 0, 0); | ||
|
|
||
| } | ||
|
|
||
| .block--3 { | ||
| background-color: rgb(153, 0, 0); | ||
|
|
||
| } | ||
|
|
||
| .block--4 { | ||
| background-color: rgb(102, 0, 0); | ||
|
|
||
| } | ||
|
|
||
| .block--5 { | ||
| background-color: rgb(51, 0, 0); | ||
|
|
||
| } | ||
|
|
||
| .block--6 { | ||
| background-color: black; | ||
| } | ||
|
|
||
| @media (min-width:600px) { | ||
| .container { | ||
| flex-direction: row; | ||
| } | ||
|
|
||
| .block { | ||
| flex-basis: 50%; | ||
| } | ||
|
|
||
| .block--4 { | ||
| order: 1; | ||
| } | ||
|
|
||
| .block--3 { | ||
| order: 2; | ||
| } | ||
|
|
||
| .block--5 { | ||
| order: 3; | ||
| } | ||
|
|
||
| .block--6 { | ||
| order: 4; | ||
| } | ||
| } | ||
|
|
||
| @media (min-width:900px) { | ||
| .container { | ||
| flex-direction: row; | ||
| } | ||
|
|
||
| .block { | ||
| flex-basis: 33.33%; | ||
| } | ||
|
|
||
| .block--4 { | ||
| order: 6; | ||
| } | ||
|
|
||
| .block--5 { | ||
| order: 5; | ||
| } | ||
|
|
||
| .block--6 { | ||
| order: 4; | ||
| } | ||
| } | ||
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.
Generally you should have an empty line only between siblings of a parent not parent and child,
also like here when you have exact same elements next to each other then don't do any empty lines between them, like in this example: