Template:Bracket.css
From TwogPedia
.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