MediaWiki:Common.css: Difference between revisions

From Borsheim Crane Service Wiki
No edit summary
No edit summary
Line 36: Line 36:
}
}


/* Auto-adjust column widths */
/* No-wrap class for specific cells */
.wikitable td {
.wikitable .nowrap {
     width: auto; /* Columns size to content */
     white-space: nowrap !important;
     min-width: 80px; /* Minimum width to prevent too narrow */
     overflow: hidden;
     max-width: 300px; /* Maximum width to prevent too wide */
     text-overflow: ellipsis;
}
}


/* Show full text on hover */
/* Truncate class for long text */
.wikitable td:nth-child(10) {
.wikitable .truncate {
     white-space: nowrap;
     white-space: nowrap !important;
     overflow: hidden;
     overflow: hidden;
     text-overflow: ellipsis;
     text-overflow: ellipsis;
     max-width: 200px;
     max-width: 150px;
    position: relative;
}
}


.wikitable td:nth-child(10):hover {
/* Short text class */
    overflow: visible;
.wikitable .short {
     white-space: normal;
     white-space: nowrap !important;
     background-color: #f8f9fa;
     max-width: 100px;
     z-index: 999;
     overflow: hidden;
    position: absolute;
     text-overflow: ellipsis;
     border: 1px solid #a2a9b1;
    padding: 8px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}
}

Revision as of 19:55, 3 June 2025

/* Borsheim red navbar styling */
.navbar-default {
    background-color: #c41e3a !important;
    border: none !important;
}

.navbar-default .navbar-brand {
    color: white !important;
}

.navbar-default .navbar-nav > li > a {
    color: white !important;
}

.navbar-default .navbar-nav > li > a:hover {
    background-color: rgba(255,255,255,0.1) !important;
}

/* Red links */
a {
    color: #c41e3a !important;
}

.wikitable {
    table-layout: auto; /* Let table size itself */
    width: 100%; /* Use full width available */
}

.wikitable td, 
.wikitable th {
    height: auto; /* Auto height based on content */
    padding: 8px 12px; /* Comfortable padding */
    vertical-align: top;
    word-wrap: break-word; /* Handle long text */
    white-space: normal; /* Allow text wrapping */
}

/* No-wrap class for specific cells */
.wikitable .nowrap {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Truncate class for long text */
.wikitable .truncate {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* Short text class */
.wikitable .short {
    white-space: nowrap !important;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}