Template:Bracket.css: Difference between revisions
From TwogPedia
(Couchor changed the content model of the page Template:Bracket.css from "wikitext" to "Sanitized CSS") Tag: content model change |
No edit summary |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
.bracket-container-stage { | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
.bracket { | .bracket { | ||
display: flex; | display: flex; | ||
gap: 10px; | gap: 10px; | ||
width: | width: 100%; | ||
overflow-x: auto; | |||
} | |||
.bracket-container-stage .bracket-wrapper { | |||
width: 100%; | |||
} | |||
.bracket-container-stage .bracket-header, | |||
.bracket-container-stage .bracket-rounds { | |||
display: grid !important; | |||
width: 100% !important; | |||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; | |||
} | } | ||
Line 8: | Line 25: | ||
justify-content: flex-end; | justify-content: flex-end; | ||
} | } | ||
.grand-final-round {height: 100%;} | |||
.bracket-wrapper, .grand-final { | .bracket-wrapper, .grand-final { | ||
Line 20: | Line 39: | ||
.bracket-header { | .bracket-header { | ||
text-align: center; | |||
font-size: 10px; | |||
font-weight: 700; | |||
line-height: 18.86px; | |||
align-items: center; | |||
color: #C1C1CD; | |||
height: 26px; | height: 26px; | ||
} | |||
.teamName { | |||
color: #ECEBEB; | |||
font-weight: 400; | |||
padding: 5px 0; | |||
} | |||
.score { | |||
padding: 5px 0; | |||
color: #ECEBEB; | |||
} | } | ||
.bracket-header div:not(:empty) { | .bracket-header div:not(:empty) { | ||
background-color: | background-color: #19191E; | ||
padding: 5px 0; | |||
font-size: 15px; | |||
border: 2px solid #77737A; | |||
border-radius: 6px; | |||
} | } | ||
Line 48: | Line 87: | ||
width: 5px; | width: 5px; | ||
height: 2px; | height: 2px; | ||
background-color: | background-color: #77737A; | ||
} | } | ||
/* Vertical line to middle of height of next rounds team element */ | /* Vertical line to middle of height of next rounds team element */ | ||
Line 58: | Line 97: | ||
width: 2px; | width: 2px; | ||
height: calc(50% - 8px); | height: calc(50% - 8px); | ||
background-color: | background-color: #77737A; | ||
} | } | ||
Line 69: | Line 108: | ||
width: 5px; | width: 5px; | ||
height: 2px; | height: 2px; | ||
background-color: | background-color: #77737A; | ||
} | } | ||
Line 95: | Line 134: | ||
width: 5px; | width: 5px; | ||
height: 2px; | height: 2px; | ||
background-color: | background-color: #77737A; | ||
transform: translateX(-100%); | transform: translateX(-100%); | ||
} | } | ||
Line 113: | Line 152: | ||
height: calc(50% - 28px - 13px); | height: calc(50% - 28px - 13px); | ||
} | } | ||
.bracket.de .bracket-round.last:last-child .match::before { | .bracket.de .bracket-round.last:last-child .match::before { | ||
height: calc(50% + 26px + 10px + 10px + 14px + 1px); | height: calc(50% + 26px + 10px + 10px + 14px + 1px); | ||
top: auto; | top: auto; | ||
bottom: 50%; | bottom: 50%; | ||
} | |||
@media (min-width: 768px) { | |||
.bracket-container-stage { | |||
display: grid; | |||
grid-template-columns: repeat(2, 1fr); | |||
gap: 1rem; | |||
} | |||
} | } |
Latest revision as of 23:19, 16 May 2025
.bracket-container-stage {
display: flex;
flex-direction: column;
}
.bracket {
display: flex;
gap: 10px;
width: 100%;
overflow-x: auto;
}
.bracket-container-stage .bracket-wrapper {
width: 100%;
}
.bracket-container-stage .bracket-header,
.bracket-container-stage .bracket-rounds {
display: grid !important;
width: 100% !important;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}
.grand-final .match {
justify-content: flex-end;
}
.grand-final-round {height: 100%;}
.bracket-wrapper, .grand-final {
display: flex;
flex-direction: column;
row-gap: 10px;
}
.bracket-header, .bracket-rounds {
display: grid;
column-gap: 10px;
}
.bracket-header {
text-align: center;
font-size: 10px;
font-weight: 700;
line-height: 18.86px;
align-items: center;
color: #C1C1CD;
height: 26px;
}
.teamName {
color: #ECEBEB;
font-weight: 400;
padding: 5px 0;
}
.score {
padding: 5px 0;
color: #ECEBEB;
}
.bracket-header div:not(:empty) {
background-color: #19191E;
padding: 5px 0;
font-size: 15px;
border: 2px solid #77737A;
border-radius: 6px;
}
.bracket-round {
display: flex;
flex-direction: column;
row-gap: 10px;
justify-content: space-around;
}
.round-offset .match {
margin-top: 28px;
}
/* CONNECTOR */
/* From middle of winning bracket to the right*/
.bracket .conn-r .match::after {
content: "";
position: absolute;
top: calc(50% - 1px);
right: -5px;
width: 5px;
height: 2px;
background-color: #77737A;
}
/* Vertical line to middle of height of next rounds team element */
.bracket .conn-r .match::before {
content: "";
position: absolute;
top: 8px;
right: -5px;
width: 2px;
height: calc(50% - 8px);
background-color: #77737A;
}
/* If rounds-offset is present (meaning that two adjacent rounds have same amount of matches) */
.bracket .round-offset .match::after {
content: "";
position: absolute;
top: calc(50% - 1px);
right: -5px;
width: 5px;
height: 2px;
background-color: #77737A;
}
/* If vertical line needs to go down*/
.bracket .conn-r:not(.last) .match:nth-child(odd)::before {
top: 50%;
}
/* Adjust vertical line lengths if next round has round-offset */
.bracket .conn-r.conn-adj .match::before {
height: calc(50% - 23px);
top: 22px
}
.bracket .conn-r:not(.last).conn-adj .match:nth-child(odd)::before {
height: calc(50% + 6px);
}
/* If round is not the first child, then have line come out of the backs of teamnames */
.bracket .bracket-round:not(:first-child) .team::before,
.bracket .grand-final .team::before {
content: "";
position: absolute;
top: calc(50% - 1px);
left: 0;
width: 5px;
height: 2px;
background-color: #77737A;
transform: translateX(-100%);
}
.bracket .bracket-round.long:not(:first-child) .team::before {
width: calc(100% + 15px);
}
.bracket .bracket-round.first .team::before {
content: none;
}
.bracket .bracket-round:not(:first-child) .match-details .team::before {
content: none;
}
.bracket.de .bracket-round:last-child .match::before {
height: calc(50% - 28px - 13px);
}
.bracket.de .bracket-round.last:last-child .match::before {
height: calc(50% + 26px + 10px + 10px + 14px + 1px);
top: auto;
bottom: 50%;
}
@media (min-width: 768px) {
.bracket-container-stage {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
}
No categories