-
Notifications
You must be signed in to change notification settings - Fork 701
Добавляет адаптив в демки DOMContentLoaded
#5913
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: main
Are you sure you want to change the base?
Changes from all commits
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 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,7 +15,11 @@ | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| body { | ||||||||||||||||||||||||||||||
| padding: 50px 100px; | ||||||||||||||||||||||||||||||
| min-height: 100vh; | ||||||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||||||
| align-items: center; | ||||||||||||||||||||||||||||||
| justify-content: center; | ||||||||||||||||||||||||||||||
| padding: 50px; | ||||||||||||||||||||||||||||||
| background-color: #18191C; | ||||||||||||||||||||||||||||||
| color: #FFFFFF; | ||||||||||||||||||||||||||||||
| font-size: 16px; | ||||||||||||||||||||||||||||||
|
|
@@ -32,16 +36,17 @@ | |||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .container { | ||||||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||||||
| justify-content: space-between; | ||||||||||||||||||||||||||||||
| justify-content: center; | ||||||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .button-like { | ||||||||||||||||||||||||||||||
| display: block; | ||||||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||||||
| border: 2px solid transparent; | ||||||||||||||||||||||||||||||
| border-radius: 6px; | ||||||||||||||||||||||||||||||
| margin-bottom: 10px; | ||||||||||||||||||||||||||||||
| padding: 8px 15px; | ||||||||||||||||||||||||||||||
| margin-block-end: 10px; | ||||||||||||||||||||||||||||||
| padding: 9px 15px; | ||||||||||||||||||||||||||||||
| color: #000000; | ||||||||||||||||||||||||||||||
| font-size: 18px; | ||||||||||||||||||||||||||||||
| font-weight: 300; | ||||||||||||||||||||||||||||||
|
|
@@ -73,7 +78,7 @@ | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .timings-line + .timings-line { | ||||||||||||||||||||||||||||||
| margin-top: 25px; | ||||||||||||||||||||||||||||||
| margin-block-start: 25px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .timings span { | ||||||||||||||||||||||||||||||
|
|
@@ -96,7 +101,7 @@ | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .tip { | ||||||||||||||||||||||||||||||
| margin-top: 40px; | ||||||||||||||||||||||||||||||
| margin-block-start: 40px; | ||||||||||||||||||||||||||||||
|
Contributor
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. Скролл появляется даже на десктопе. При чём при первой загрузке всё ок, а при перезагрузке он появлется. Тут либо айфрем увеличить на 10 пикселей, либо чуть-чуть подрезать воздух кнопке
Suggested change
Часть демки с подписями и кнопкой имеет высоту 430.56. Если кто-то знает, почему при первой загрузке браузер не обращает внимание на эти полпикселя, а потом начинает, объясните мне, пожалуйста 🥹 |
||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .tip p { | ||||||||||||||||||||||||||||||
|
|
@@ -105,15 +110,62 @@ | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .scrollable { | ||||||||||||||||||||||||||||||
| min-width: 280px; | ||||||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||||||
| height: 425px; | ||||||||||||||||||||||||||||||
| margin-left: 70px; | ||||||||||||||||||||||||||||||
| max-width: 560px; | ||||||||||||||||||||||||||||||
| height: 430px; | ||||||||||||||||||||||||||||||
| margin-inline-start: 40px; | ||||||||||||||||||||||||||||||
| background-color: #282a2e; | ||||||||||||||||||||||||||||||
| color: #979797; | ||||||||||||||||||||||||||||||
| font-family: "Roboto Mono", monospace; | ||||||||||||||||||||||||||||||
| line-height: 1.2; | ||||||||||||||||||||||||||||||
| overflow: scroll; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @media (max-width: 768px) { | ||||||||||||||||||||||||||||||
| body { | ||||||||||||||||||||||||||||||
| padding: 30px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .description { | ||||||||||||||||||||||||||||||
| width: 250px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .scrollable { | ||||||||||||||||||||||||||||||
| min-width: 230px; | ||||||||||||||||||||||||||||||
| margin-inline-start: 30px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @media (max-width: 570px) { | ||||||||||||||||||||||||||||||
| .container { | ||||||||||||||||||||||||||||||
| flex-wrap: wrap; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .description, .scrollable { | ||||||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .scrollable { | ||||||||||||||||||||||||||||||
| margin-inline-start: 0; | ||||||||||||||||||||||||||||||
| margin-block-start: 40px; | ||||||||||||||||||||||||||||||
| height: 100px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
Comment on lines
+149
to
+153
Contributor
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. На экранах меньше 420 пояляется скролл. А так не появится даже на самых маленьких 💅
Suggested change
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .timings { | ||||||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||||||
| flex-wrap: wrap; | ||||||||||||||||||||||||||||||
| gap: 10px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .timings-line + .timings-line { | ||||||||||||||||||||||||||||||
| margin-block-start: 0; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| #domloaded-time, #load-time, #difference { | ||||||||||||||||||||||||||||||
| font-size: 2rem; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| </style> | ||||||||||||||||||||||||||||||
| </head> | ||||||||||||||||||||||||||||||
| <body> | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,7 +15,11 @@ | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
Contributor
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. В демке скроллы есть, их бы покрасить
Suggested change
|
||||||||||||||||||||||||||||||
| body { | ||||||||||||||||||||||||||||||
| padding: 50px 100px; | ||||||||||||||||||||||||||||||
| min-height: 100vh; | ||||||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||||||
| align-items: center; | ||||||||||||||||||||||||||||||
| justify-content: center; | ||||||||||||||||||||||||||||||
| padding: 50px; | ||||||||||||||||||||||||||||||
| background-color: #18191C; | ||||||||||||||||||||||||||||||
| color: #FFFFFF; | ||||||||||||||||||||||||||||||
| font-size: 16px; | ||||||||||||||||||||||||||||||
|
|
@@ -32,16 +36,17 @@ | |||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .container { | ||||||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||||||
| justify-content: space-between; | ||||||||||||||||||||||||||||||
| justify-content: center; | ||||||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .button-like { | ||||||||||||||||||||||||||||||
| display: block; | ||||||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||||||
| border: 2px solid transparent; | ||||||||||||||||||||||||||||||
| border-radius: 6px; | ||||||||||||||||||||||||||||||
| margin-bottom: 10px; | ||||||||||||||||||||||||||||||
| padding: 8px 15px; | ||||||||||||||||||||||||||||||
| margin-block-end: 10px; | ||||||||||||||||||||||||||||||
| padding: 9px 15px; | ||||||||||||||||||||||||||||||
| color: #000000; | ||||||||||||||||||||||||||||||
| font-size: 18px; | ||||||||||||||||||||||||||||||
| font-weight: 300; | ||||||||||||||||||||||||||||||
|
|
@@ -105,15 +110,62 @@ | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .scrollable { | ||||||||||||||||||||||||||||||
| min-width: 280px; | ||||||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||||||
| height: 425px; | ||||||||||||||||||||||||||||||
| margin-left: 70px; | ||||||||||||||||||||||||||||||
| max-width: 560px; | ||||||||||||||||||||||||||||||
| height: 430px; | ||||||||||||||||||||||||||||||
| margin-inline-start: 40px; | ||||||||||||||||||||||||||||||
| background-color: #282a2e; | ||||||||||||||||||||||||||||||
| color: #979797; | ||||||||||||||||||||||||||||||
| font-family: "Roboto Mono", monospace; | ||||||||||||||||||||||||||||||
| line-height: 1.2; | ||||||||||||||||||||||||||||||
| overflow: scroll; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @media (max-width: 768px) { | ||||||||||||||||||||||||||||||
| body { | ||||||||||||||||||||||||||||||
| padding: 30px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .description { | ||||||||||||||||||||||||||||||
| width: 250px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .scrollable { | ||||||||||||||||||||||||||||||
| min-width: 230px; | ||||||||||||||||||||||||||||||
| margin-inline-start: 30px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @media (max-width: 570px) { | ||||||||||||||||||||||||||||||
| .container { | ||||||||||||||||||||||||||||||
| flex-wrap: wrap; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .description, .scrollable { | ||||||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .scrollable { | ||||||||||||||||||||||||||||||
| margin-inline-start: 0; | ||||||||||||||||||||||||||||||
| margin-block-start: 40px; | ||||||||||||||||||||||||||||||
| height: 100px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
Comment on lines
+149
to
+153
Contributor
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. На экранах меньше 420 пояляется скролл. А так не появится даже на самых маленьких 💅
Suggested change
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .timings { | ||||||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||||||
| flex-wrap: wrap; | ||||||||||||||||||||||||||||||
| gap: 10px; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| .timings-line + .timings-line { | ||||||||||||||||||||||||||||||
| margin-block-start: 0; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| #domloaded-time, #load-time, #difference { | ||||||||||||||||||||||||||||||
| font-size: 2rem; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| </style> | ||||||||||||||||||||||||||||||
| </head> | ||||||||||||||||||||||||||||||
| <body> | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
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.
В демке скроллы есть, их бы покрасить