Toggle menu
Toggle preferences 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 19:47, 22 December 2024 by Idkman (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.
/* Container for the main cards */
.card-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px;
}

/* Main card */
.card {
    width: 400px;
    height: 200px;
    position: relative;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 0.6s ease-in-out;
}

/* Wrapper for the front and back sides */
.card-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-in-out;
}

/* Front side of the main card */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

/* The back side of the main card */
.card-back {
    transform: rotateY(180deg);
}

/* Sub-card container in the back */
.sub-card-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

/* Sub-card */
.sub-card {
    width: 100%;
    height: 80px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    transition: transform 0.6s ease-in-out;
}

/* Sub-card flip effect */
.sub-card-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-in-out;
}

/* Sub-card front and back */
.sub-card-front, .sub-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.sub-card-back {
    transform: rotateY(180deg);
}

/* Default state for sub-card back (hidden) */
.sub-card-back {
    display: none;
}

/* When sub-card is flipped, show the back */
.sub-card[data-expanded="true"] .sub-card-back {
    display: flex;
}

/* Main card flip effect */
.card.hovered .card-inner {
    transform: rotateY(180deg);
}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.