Template:MainPage/Vector/Featured article/styles.css: Difference between revisions

From IxWiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 5: Line 5:
     flex-direction: row;
     flex-direction: row;
     overflow: hidden;
     overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 8px;
}
}


#featured_article .card-image {
#featured_article .card-image {
     width: calc(860px * 6 / 3 - 2.4rem);
     width: 50%;
     min-width: 260px; /* Matches the x260px in your image tag */
     aspect-ratio: 16 / 9;
     overflow: hidden;
     overflow: hidden;
    background-color: #f8f9fa;
}
}


Line 24: Line 25:
     flex: 1;
     flex: 1;
     padding: 1rem;
     padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
}


Line 35: Line 39:
     margin: 0 0 0.5em 0;
     margin: 0 0 0.5em 0;
     font-size: 1.2em;
     font-size: 1.2em;
}
@media (max-width: 768px) {
    #featured_article.card {
        flex-direction: column;
    }
    #featured_article .card-image {
        width: 100%;
    }
}
}

Revision as of 01:06, 1 August 2024

#featured_article.card {
    width: calc(100% / 6 * 5 - 0.4rem);
    min-width: calc(860px / 6 * 5 - 0.4rem);
    display: flex;
    flex-direction: row;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 8px;
}

#featured_article .card-image {
    width: 50%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

#featured_article .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#featured_article .card-text {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#featured_article .byline {
    font-size: 0.9em;
    color: #72777d;
    margin-bottom: 0.5em;
}

#featured_article h3 {
    margin: 0 0 0.5em 0;
    font-size: 1.2em;
}

@media (max-width: 768px) {
    #featured_article.card {
        flex-direction: column;
    }

    #featured_article .card-image {
        width: 100%;
    }
}