Jump to content

Template:Navbox/styles.css: Difference between revisions

From TnPedia
Created page with "{{pp|small=y}}: .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1..."
 
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
/* {{pp|small=y}} */
/* Estilização geral da navbox */
.navbox {
.navbox {
box-sizing: border-box;
  font-size: 0.85em;
border: 1px solid #a2a9b1;
  border: 1px solid #ccc;
width: 100%;
  border-radius: 12px;
clear: both;
  background-color: #fdfdfd;
font-size: 88%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
text-align: center;
  margin-top: 1em;
padding: 1px;
margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */
}
}


.navbox .navbox {
/* Título completo (em duas "colunas") com botão na segunda */
margin-top: 0; /* No top margin for nested navboxes */
.navbox .navbox-title {
  display: table;
  width: 100%;
  background-color: #d9ecff;
  color: #003366;
  font-weight: bold;
  font-size: 1.1em;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
}


.navbox + .navbox, /* TODO: remove first line after transclusions have updated */
.navbox .navbox-title .title-cell {
.navbox + .navbox-styles + .navbox {
  display: table-cell;
margin-top: -1px; /* Single pixel border between adjacent navboxes */
  text-align: center;
  vertical-align: middle;
  padding: 0.4em;
  width: 95%;
}
}


.navbox-inner,
.navbox .navbox-title .toggle-cell {
.navbox-subgroup {
  display: table-cell;
width: 100%;
  text-align: right;
  vertical-align: middle;
  padding: 0.4em 0.8em;
  width: 5%;
  white-space: nowrap;
}
}


.navbox-group,
/* Estilo do botão de expand/collapse */
.navbox-title,
.navbox .mw-collapsible-toggle {
.navbox-abovebelow {
  font-size: 90%;
padding: 0.25em 1em;
  font-weight: normal;
line-height: 1.5em;
  color: #003366;
text-align: center;
  background: none;
  border: none;
  cursor: pointer;
}
}


.navbox-group {
/* Estilo dos grupos de itens */
white-space: nowrap;
.navbox .navbox-group {
/* @noflip */
  font-weight: bold;
text-align: right;
  background-color: #f2f2f2;
  padding: 0.3em 0.6em;
  border-top: 1px solid #ddd;
  text-align: center;
}
}


.navbox,
/* Listas horizontais com separador personalizado */
.navbox-subgroup {
.navbox .hlist li {
background-color: #fdfdfd;
  display: inline;
}
}


.navbox-list {
.navbox .hlist li:not(:last-child)::after {
line-height: 1.5em;
  content: " |";
border-color: #fdfdfd; /* Must match background color */
  font-weight: bold;
  padding: 0 0.4em;
  color: #444;
}
}


.navbox-list-with-group {
/* Links */
text-align: left;
.navbox a {
border-left-width: 2px;
  text-decoration: none;
border-left-style: solid;
}
}


/* cell spacing for navbox cells */
.navbox a:hover {
/* Borders above 2nd, 3rd, etc. rows */
  text-decoration: underline;
/* TODO: figure out how to replace tr as structure;
* with div structure it should be just a matter of first-child */
tr + tr > .navbox-abovebelow,
tr + tr > .navbox-group,
tr + tr > .navbox-image,
tr + tr > .navbox-list {
border-top: 2px solid #fdfdfd; /* Must match background color */
}
}


.navbox-title {
.tn-title-bar {
background-color: #ccf; /* Level 1 color */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #d9ecff;
  color: #003366;
  font-weight: bold;
  font-size: 120%;
  padding: 0.3em 0.8em;
  border-radius: 0.8em 0.8em 0 0;
  width: 100%;
  box-sizing: border-box;
}
}


.navbox-abovebelow,
.navbox-group,
.navbox-subgroup .navbox-title {
background-color: #ddf; /* Level 2 color */
}
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
background-color: #e6e6ff; /* Level 3 color */
}
.navbox-even {
background-color: #f7f7f7;
}
.navbox-odd {
background-color: transparent;
}
/* TODO: figure out how to remove reliance on td as structure */
.navbox .hlist td dl,
.navbox .hlist td ol,
.navbox .hlist td ul,
.navbox td.hlist dl,
.navbox td.hlist ol,
.navbox td.hlist ul {
padding: 0.125em 0;
}
.navbox .navbar {
display: block;
font-size: 100%;
}


.navbox-title .navbar {
.tn-title-bar .mw-collapsible-toggle {
/* @noflip */
  margin-left: auto;
float: left;
  font-size: 90%;
/* @noflip */
  font-weight: bold;
text-align: left;
  color: #003366;
/* @noflip */
  background: none;
margin-right: 0.5em;
  border: none;
  cursor: pointer;
}
}

Latest revision as of 19:35, 29 May 2025

/* Estilização geral da navbox */
.navbox {
  font-size: 0.85em;
  border: 1px solid #ccc;
  border-radius: 12px;
  background-color: #fdfdfd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-top: 1em;
}

/* Título completo (em duas "colunas") com botão na segunda */
.navbox .navbox-title {
  display: table;
  width: 100%;
  background-color: #d9ecff;
  color: #003366;
  font-weight: bold;
  font-size: 1.1em;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.navbox .navbox-title .title-cell {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
  padding: 0.4em;
  width: 95%;
}

.navbox .navbox-title .toggle-cell {
  display: table-cell;
  text-align: right;
  vertical-align: middle;
  padding: 0.4em 0.8em;
  width: 5%;
  white-space: nowrap;
}

/* Estilo do botão de expand/collapse */
.navbox .mw-collapsible-toggle {
  font-size: 90%;
  font-weight: normal;
  color: #003366;
  background: none;
  border: none;
  cursor: pointer;
}

/* Estilo dos grupos de itens */
.navbox .navbox-group {
  font-weight: bold;
  background-color: #f2f2f2;
  padding: 0.3em 0.6em;
  border-top: 1px solid #ddd;
  text-align: center;
}

/* Listas horizontais com separador personalizado */
.navbox .hlist li {
  display: inline;
}

.navbox .hlist li:not(:last-child)::after {
  content: " |";
  font-weight: bold;
  padding: 0 0.4em;
  color: #444;
}

/* Links */
.navbox a {
  text-decoration: none;
}

.navbox a:hover {
  text-decoration: underline;
}

.tn-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #d9ecff;
  color: #003366;
  font-weight: bold;
  font-size: 120%;
  padding: 0.3em 0.8em;
  border-radius: 0.8em 0.8em 0 0;
  width: 100%;
  box-sizing: border-box;
}


.tn-title-bar .mw-collapsible-toggle {
  margin-left: auto;
  font-size: 90%;
  font-weight: bold;
  color: #003366;
  background: none;
  border: none;
  cursor: pointer;
}