MediaWiki:Tabs.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
.tab-content { | .tab-content { | ||
display: none; | display: none; | ||
background: | background: var(--surface); | ||
border-radius: 20px; | border-radius: 20px; | ||
border: 2px solid | border: 2px solid var(--border); | ||
box-shadow: 0 6px 24px | box-shadow: 0 6px 24px var(--shadow-medium); | ||
padding: 30px 20px; | padding: 30px 20px; | ||
} | } | ||
| Line 13: | Line 13: | ||
max-width: 1200px; | max-width: 1200px; | ||
width: 90%; | width: 90%; | ||
background: | background: var(--surface); | ||
border-radius: 16px; | border-radius: 16px; | ||
box-shadow: 0 4px 10px | box-shadow: 0 4px 10px var(--shadow-soft); | ||
padding: 20px 40px; | padding: 20px 40px; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
| Line 34: | Line 34: | ||
.nav-tab{ | .nav-tab{ | ||
background: | background: var(--surface); | ||
border: 2px solid | border: 2px solid var(--border); | ||
border-radius: 14px; | border-radius: 14px; | ||
padding: 12px 20px; | padding: 12px 20px; | ||
cursor: pointer; | cursor: pointer; | ||
transition: all 0.3s ease; | transition: all 0.3s ease; | ||
font-weight: 600; | font-weight: 600; | ||
color: | color: var(--text-muted); | ||
text-decoration: none; | text-decoration: none; | ||
display: inline-block; | display: inline-block; | ||
| Line 49: | Line 48: | ||
.nav-tab:hover { | .nav-tab:hover { | ||
background: | background: var(--surface-tint); | ||
border-color: | border-color: var(--border-strong); | ||
transform: translateY(-2px); | transform: translateY(-2px); | ||
box-shadow: 0 4px 12px | box-shadow: 0 4px 12px var(--shadow-soft); | ||
} | } | ||
.nav-tab.active { | .nav-tab.active { | ||
background: linear-gradient(135deg, | background: linear-gradient(135deg, var(--primary), var(--primary-hover)); | ||
border-color: | border-color: var(--primary); | ||
color: | color: var(--text-strong); | ||
box-shadow: 0 4px 12px | box-shadow: 0 4px 12px var(--shadow-medium); | ||
position: relative; | position: relative; | ||
animation: floatUpDown 2.5s ease-in-out infinite; | animation: floatUpDown 2.5s ease-in-out infinite; | ||
| Line 81: | Line 80: | ||
======================================== */ | ======================================== */ | ||
.nested-tabs { | .nested-tabs { | ||
margin: | margin: 20px 0; | ||
padding: | padding: 5px; | ||
list-style: none; | list-style: none; | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
gap: | gap: 12px; | ||
justify-content: center; | justify-content: center; | ||
background: transparent; | |||
border: none; | |||
box-shadow: none; | |||
} | } | ||
.nested-tab { | .nested-tab { | ||
background: | background: var(--surface); | ||
border: 2px solid | border: 2px solid var(--border); | ||
border- | border-bottom: 5px solid var(--border); | ||
border- | border-radius: 50px; | ||
padding: | padding: 10px 24px; | ||
cursor: pointer; | cursor: pointer; | ||
transition: all 0. | transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); | ||
font-weight: | font-weight: 700; | ||
color: | color: var(--text-muted); | ||
text-decoration: none; | text-decoration: none; | ||
font-size: 14px; | font-size: 14px; | ||
box-shadow: 0 4px 10px var(--shadow-soft); | |||
position: relative; | |||
top: 0; | |||
} | |||
.nested-tab:hover { | |||
background: var(--surface); | |||
border-color: var(--border-strong); | |||
border-bottom-color: var(--border-strong); | |||
color: var(--primary); | |||
transform: translateY(-4px); | |||
box-shadow: 0 8px 20px var(--shadow-medium); | |||
} | } | ||
.nested-tab: | .nested-tab:active { | ||
border-bottom-width: 2px; | |||
transform: translateY(0); | |||
box-shadow: none; | |||
transition: all 0.1s ease; | |||
} | } | ||
.nested-tab.active { | .nested-tab.active { | ||
background: linear-gradient(135deg, | background: linear-gradient(135deg, var(--primary), var(--primary-hover)); | ||
border: 2px solid | border: 2px solid var(--primary); | ||
border- | border-bottom: 5px solid color-mix(in srgb, var(--primary) 80%, black); | ||
color: var(--text-strong); | |||
color: | box-shadow: 0 10px 25px var(--shadow-strong); | ||
box-shadow: 0 4px | transform: translateY(-4px) scale(1.05); | ||
animation: pulseGlow 3s infinite; | |||
} | |||
@keyframes pulseGlow { | |||
0%, 100% { box-shadow: 0 10px 25px var(--shadow-strong); } | |||
50% { box-shadow: 0 10px 35px var(--shadow-strong), 0 0 15px var(--shadow-soft); } | |||
} | } | ||
| Line 128: | Line 143: | ||
display: none; | display: none; | ||
padding: 16px; | padding: 16px; | ||
background: | background: var(--bg-1); | ||
border-radius: 14px; | border-radius: 14px; | ||
margin-top: 8px; | margin-top: 8px; | ||
border: 1px solid | border: 1px solid var(--border); | ||
} | } | ||
.nested-content.active { | .nested-content.active { | ||
display: | display: grid; | ||
animation: fadeIn .25s ease; | animation: fadeIn .25s ease; | ||
min-width: 0; | |||
} | } | ||
/* Show nested tabs and content in active parent tabs that have them */ | /* Show nested tabs and content in active parent tabs that have them */ | ||
| Line 155: | Line 162: | ||
.tab-content.active .nested-content.active { | .tab-content.active .nested-content.active { | ||
display: | display: grid; | ||
} | } | ||
| Line 289: | Line 296: | ||
.tab-content.active { | .tab-content.active { | ||
padding: | padding: 8px 12px; | ||
border-radius: 8px; | border-radius: 8px; | ||
width: 100%; | width: 100%; | ||
} | } | ||
.nested-content.active { padding: 8px 12px } | |||
.nav-tabs { | .nav-tabs { | ||
Latest revision as of 08:24, 2 January 2026
.tab-content {
display: none;
background: var(--surface);
border-radius: 20px;
border: 2px solid var(--border);
box-shadow: 0 6px 24px var(--shadow-medium);
padding: 30px 20px;
}
.tab-content.active {
margin: 0 auto;
max-width: 1200px;
width: 90%;
background: var(--surface);
border-radius: 16px;
box-shadow: 0 4px 10px var(--shadow-soft);
padding: 20px 40px;
box-sizing: border-box;
display: block;
animation: fadeIn .35s ease;
}
.nav-tabs {
display: flex;
flex-wrap: wrap;
gap: 8px 8px;
padding: 12px 20px;
list-style: none;
border-bottom: none;
justify-content: center;
margin-bottom: 12px;
}
.nav-tab{
background: var(--surface);
border: 2px solid var(--border);
border-radius: 14px;
padding: 12px 20px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 600;
color: var(--text-muted);
text-decoration: none;
display: inline-block;
}
.nav-tab:hover {
background: var(--surface-tint);
border-color: var(--border-strong);
transform: translateY(-2px);
box-shadow: 0 4px 12px var(--shadow-soft);
}
.nav-tab.active {
background: linear-gradient(135deg, var(--primary), var(--primary-hover));
border-color: var(--primary);
color: var(--text-strong);
box-shadow: 0 4px 12px var(--shadow-medium);
position: relative;
animation: floatUpDown 2.5s ease-in-out infinite;
}
.nav-tab .short-text {
display: none;
}
.nav-tab .full-text {
display: inline;
}
.tab-footer {
display: flex;
justify-content: center;
}
/* [NAVIGATION] NESTED TABS
======================================== */
.nested-tabs {
margin: 20px 0;
padding: 5px;
list-style: none;
display: flex;
flex-wrap: wrap;
gap: 12px;
justify-content: center;
background: transparent;
border: none;
box-shadow: none;
}
.nested-tab {
background: var(--surface);
border: 2px solid var(--border);
border-bottom: 5px solid var(--border);
border-radius: 50px;
padding: 10px 24px;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
font-weight: 700;
color: var(--text-muted);
text-decoration: none;
font-size: 14px;
box-shadow: 0 4px 10px var(--shadow-soft);
position: relative;
top: 0;
}
.nested-tab:hover {
background: var(--surface);
border-color: var(--border-strong);
border-bottom-color: var(--border-strong);
color: var(--primary);
transform: translateY(-4px);
box-shadow: 0 8px 20px var(--shadow-medium);
}
.nested-tab:active {
border-bottom-width: 2px;
transform: translateY(0);
box-shadow: none;
transition: all 0.1s ease;
}
.nested-tab.active {
background: linear-gradient(135deg, var(--primary), var(--primary-hover));
border: 2px solid var(--primary);
border-bottom: 5px solid color-mix(in srgb, var(--primary) 80%, black);
color: var(--text-strong);
box-shadow: 0 10px 25px var(--shadow-strong);
transform: translateY(-4px) scale(1.05);
animation: pulseGlow 3s infinite;
}
@keyframes pulseGlow {
0%, 100% { box-shadow: 0 10px 25px var(--shadow-strong); }
50% { box-shadow: 0 10px 35px var(--shadow-strong), 0 0 15px var(--shadow-soft); }
}
.nested-content {
display: none;
padding: 16px;
background: var(--bg-1);
border-radius: 14px;
margin-top: 8px;
border: 1px solid var(--border);
}
.nested-content.active {
display: grid;
animation: fadeIn .25s ease;
min-width: 0;
}
/* Show nested tabs and content in active parent tabs that have them */
.tab-content.active .nested-tabs {
display: flex;
visibility: visible;
}
.tab-content.active .nested-content.active {
display: grid;
}
/* Hide nested tabs and content in inactive parent tabs */
.tab-content:not(.active) .nested-tabs {
display: none;
}
.tab-content:not(.active) .nested-content {
display: none;
}
.mw-parser-output .nested-tab .short-text {
display: none;
}
.mw-parser-output .nested-tab .full-text {
display: inline;
}
/* ========================================
RESPONSIVE DESIGN
======================================== */
/* Desktop médio: 992px - 1199px */
@media (max-width: 1199px) {
.tab-content {
padding: 25px 18px;
border-radius: 18px;
}
.tab-content.active {
padding: 18px 35px;
border-radius: 14px;
}
.nav-tabs {
padding: 10px 18px;
gap: 6px 6px;
margin-bottom: 10px;
}
.nav-tab {
padding: 10px 18px;
border-radius: 12px;
font-size: 0.9rem;
}
.nav-tab.active {
padding: 10px 18px;
}
}
/* Desktop pequeno: 768px - 991px */
@media (max-width: 991px) {
.tab-content {
padding: 20px 15px;
border-radius: 16px;
}
.tab-content.active {
padding: 15px 30px;
border-radius: 12px;
width: 95%;
}
.nav-tabs {
padding: 8px 15px;
gap: 8px 8px;
margin-bottom: 8px;
justify-content: center;
}
.nav-tab {
padding: 8px 15px;
border-radius: 10px;
font-size: 0.85rem;
flex: 0 0 calc(50% - 4px);
max-width: calc(50% - 4px);
text-align: center;
}
.nav-tab.active {
padding: 8px 15px;
}
}
/* Tablet: 576px - 767px */
@media (max-width: 767px) {
.tab-content {
padding: 18px 12px;
border-radius: 14px;
}
.tab-content.active {
padding: 12px 25px;
border-radius: 10px;
width: 98%;
}
.nav-tabs {
padding: 6px 12px;
gap: 6px 6px;
margin-bottom: 6px;
justify-content: center;
}
.nav-tab {
padding: 6px 12px;
border-radius: 8px;
font-size: 0.8rem;
flex: 0 0 calc(50% - 3px);
max-width: calc(50% - 3px);
text-align: center;
}
.nav-tab.active {
padding: 6px 12px;
}
.nav-tab:hover {
transform: translateY(-1px);
}
}
/* Mobile: até 575px */
@media (max-width: 575px) {
.tab-content {
padding: 15px 10px;
border-radius: 12px;
}
.tab-content.active {
padding: 8px 12px;
border-radius: 8px;
width: 100%;
}
.nested-content.active { padding: 8px 12px }
.nav-tabs {
padding: 4px 10px;
gap: 4px 4px;
margin-bottom: 4px;
justify-content: center;
}
.nav-tab {
padding: 5px 8px;
border-radius: 6px;
font-size: 0.7rem;
flex: 0 0 calc(50% - 2px);
max-width: calc(50% - 2px);
text-align: center;
}
.nav-tab.active {
padding: 5px 8px;
}
.nav-tab:hover {
transform: none;
}
}
@keyframes fadeIn {
0% {
opacity: 0;
transform: translateY(10px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
@keyframes floatUpDown {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-4px);
}
}