Skip to content
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

grid fallback over flexbox #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
101 changes: 82 additions & 19 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,26 @@ figcaption.jess

.test-grid
{
display: grid;
grid-template-columns: 6% 44% 25% 19%;
display: flex;
justify-content: space-between;
height: 85%;
width: 82%;
width: 77%;

transform: translate(-56%, -40%);
}

@supports (display: grid)
{
.test-grid
{
display: grid;
grid-template-columns: 6% 44% 25% 19%;
justify-content: start;
height: 85%;
width: 82%;

transform: translate(-52%, -40%);
transform: translate(-52%, -40%);
}
}

.col-1
Expand Down Expand Up @@ -335,16 +349,49 @@ figcaption.jess
width: 221px;
}

.all-links
{
position: absolute;
transform: rotate(270deg) translateX(-100%);
height: 3rem;
width: 80vh;
max-width: 760px;
transform-origin: top left;
left: 0;
}

@supports (display: grid)
{
.all-links
{
position: relative;
transform-origin: top left;
}
}

@media (max-width: 1050px)
{
.test-grid
{
display: grid;
grid-template-columns: 6% 60% 25%;
display: flex;
justify-content: space-between;
height: 85%;
width: 100%;
width: 95%;

transform: translate(-55%, -40%);
}

transform: translate(-50%, -40%);
@supports (display: grid)
{
.test-grid
{
display: grid;
grid-template-columns: 6% 60% 25%;
justify-content: start;
width: 100%;

transform: translate(-50%, -40%);
}
}

.col-4
Expand All @@ -361,23 +408,29 @@ figcaption.jess
padding-bottom: 0;
text-align: center;
}
}

.all-links
{
position: relative;
transform: rotate(270deg) translateX(-100%);
height: 3rem;
width: 80vh;
max-width: 760px;
transform-origin: top left;
@supports not (display: grid)
{
.all-links
{
left: 2rem;
Copy link

Choose a reason for hiding this comment

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

Не понятно зачем тут конструкция not? Можно же без неё. У нас fallback, это как бы то, что работает по умолчанию. А вдруг у нас сама конструкция @support не поддерживается?

}
}
}

.test-h2
{
position: absolute;
top: -4rem;
left: 6%;
left: 7%;
}

@supports (display: grid)
{
.test-h2
{
left: 6%;
}
}

.link-p1
Expand Down Expand Up @@ -424,12 +477,22 @@ figcaption.jess

.bigimg
{
overflow: hidden;
padding-left: 5rem;
}

@supports (display: grid)
{
.bigimg
{
overflow: hidden;
padding-left: 0;
}
}

.smallimg
{
max-height: 760px;
overflow: hidden;
}

.t-form
Expand Down