MediaWiki:Vgrid.css

From Elwiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* vertical grid table */
.vgrid-table {
    display: grid;
    grid-template-columns: 135px auto;
    gap: 5px;
}

.vgrid-table > div {
    padding: 2px;
    box-shadow: 0 0 0 1px var(--border-color);
    height: 100%;
}

/* title */
.vgrid-table > .vgrid-cat {
    font-weight: 500;
    width: 100%;
    height: 100%;
    display: flex;
    place-content: center;
    place-items: center;
    text-align: center;
    background-color: var(--theme-tone-5);
}

/* content */
.vgrid-table > div:not(.vgrid-cat) {
    display: flex;
    place-content: start;
    flex-direction: row;
    place-items: center;
    background-color: var(--theme-tone-6);
}

.vgrid-table > div:not(.vgrid-cat) ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    list-style-type: none;
    gap: 0.3em;
    place-items: center;
    padding: 0 0.9em;
    padding-left: 0;
}

.vgrid-table > div:not(.vgrid-cat) ul li {
    position: relative;
    padding: 3px;
}

.vgrid-table > div:not(.vgrid-cat) ul li::after {
    content: "▪";
    position: absolute;
    right: -0.37em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
}

.vgrid-table > div:not(.vgrid-cat) ul li:last-child::after {
    content: unset;
}

.vgrid-table > div:not(.vgrid-cat) ul li a {
    font-weight: 500;
    color: var(--text-color) !important;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.2s;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    text-decoration: none;
}

.vgrid-table > div:not(.vgrid-cat) ul li a:hover,
.vgrid-table > div:not(.vgrid-cat) ul li a.mw-selflink {
    color: white !important;
    background-color: var(--accent-color);
}

.vgrid-table > .vgrid-cat > span {
    padding: 4px;
}

.vgrid-table .textfloat {
    color: #fff !important;
    text-shadow: 1px 1px 1px #000 !important;
}

.vgrid-table > div .vgrid-cat {
    background: var(--theme-tone-5);
    padding: 2px 6px;
    font-weight: 500;
    margin-left: -2px;
    height: 100%;
    width: 135px;
    min-width: 135px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

table .vgrid-table {
    margin-bottom: 5px;
}