Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css

MediaWiki interface page
Revision as of 21:16, 16 December 2024 by GamingTwist (talk | contribs)

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.
.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: space-between;
    margin: 0 auto;
    padding: 1em;
    max-width: 1200px; /* Center the grid on larger screens */
}

.card {
    flex: 1 1 calc(33.333% - 1em); /* 3 columns with spacing */
    box-sizing: border-box;
    border: 2px solid var(--ooui-border-color-base); /* Theme-adaptive border */
    border-radius: 8px; /* Rounded corners */
    padding: 1em; /* Add padding inside the card */
    background-color: var(--ooui-background-color-base); /* Theme-adaptive background */
    color: var(--ooui-text-color); /* Theme-adaptive text color */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow */
    transition: transform 0.3s, box-shadow 0.3s; /* Smooth hover effects */
}

.card:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Slightly stronger shadow */
    border-color: var(--ooui-border-color-progressive); /* Theme-adaptive hover border */
}

/* Adjust for tablets */
@media (max-width: 768px) {
    .card {
        flex: 1 1 calc(50% - 1em); /* 2 columns */
    }
}

/* Adjust for mobile */
@media (max-width: 480px) {
    .card {
        flex: 1 1 100%; /* 1 column */
    }
}