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: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 1: Line 1:
/* Container for the main cards */
/* General container for all cards */
.card-container {
.card-container {
     display: flex;
     display: flex;
    justify-content: space-between;
     flex-wrap: wrap;
     flex-wrap: wrap;
     gap: 20px;
    justify-content: center; /* Center the cards */
     margin: 20px;
     gap: 20px; /* Space between cards */
     padding: 20px; /* Padding for the container */
    box-sizing: border-box;
}
}


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


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


/* Front side of the main card */
/* Front and back styling */
.card-front, .card-back {
.card-front, .card-back {
     position: absolute;
     position: absolute;
Line 45: Line 45:
}
}


/* The back side of the main card */
.card-back {
.card-back {
     transform: rotateY(180deg);
     transform: rotateY(180deg);
    background-color: #f8f8f8; /* Different background for back */
}
/* Flip effect on hover */
.card:hover .card-inner {
    transform: rotateY(180deg);
}
/* Sub-panel inside the back */
.sub-panel {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
    text-align: center;
}
}


/* Sub-card container in the back */
/* Styling for sub-card container */
.sub-card-container {
.sub-card-container {
     display: flex;
     display: flex;
Line 56: Line 69:
     gap: 10px;
     gap: 10px;
     justify-content: flex-start;
     justify-content: flex-start;
    align-items: center;
     width: 100%;
     width: 100%;
     padding: 10px;
     padding: 10px;
Line 61: Line 75:
}
}


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


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


/* Sub-card front and back */
/* Nested sub-card styling */
.sub-card-front, .sub-card-back {
.sub-card-container .sub-card-container {
     position: absolute;
     padding-left: 20px;
    width: 100%;
     border-left: 2px solid #ccc;
    height: 100%;
     margin-top: 10px;
    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);
}
}

Revision as of 02:36, 30 December 2024

/* General container for all cards */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the cards */
    gap: 20px; /* Space between cards */
    padding: 20px; /* Padding for the container */
    box-sizing: border-box;
}

/* Individual card styling */
.card {
    width: 300px; /* Adjust size for responsiveness */
    height: 200px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    perspective: 1000px; /* Enable 3D perspective */
    position: relative;
    cursor: pointer;
    transition: transform 0.6s ease;
}

/* Card inner wrapper */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

/* Front and back styling */
.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;
}

.card-back {
    transform: rotateY(180deg);
    background-color: #f8f8f8; /* Different background for back */
}

/* Flip effect on hover */
.card:hover .card-inner {
    transform: rotateY(180deg);
}

/* Sub-panel inside the back */
.sub-panel {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
    text-align: center;
}

/* Styling for sub-card container */
.sub-card-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

/* Sub-card styling */
.sub-card {
    width: 90%;
    height: 60px;
    background-color: #ececec;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.4s ease-in-out, background-color 0.3s;
}

.sub-card:hover {
    background-color: #ddd;
}

/* Nested sub-card styling */
.sub-card-container .sub-card-container {
    padding-left: 20px;
    border-left: 2px solid #ccc;
    margin-top: 10px;
}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.