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

From IxWiki
Jump to navigation Jump to search
mNo edit summary
Tag: Manual revert
mNo edit summary
Line 2: Line 2:
     width: calc(100% / 6 * 5 - 0.4rem);
     width: calc(100% / 6 * 5 - 0.4rem);
     min-width: calc(860px / 6 * 5 - 0.4rem);
     min-width: calc(860px / 6 * 5 - 0.4rem);
    display: flex;
     flex-direction: row;
     flex-direction: row;
    overflow: hidden;
}
}


#featured_article .card-image {
#featured_article .card-image {
     width: calc(860px * 6 / 3 - 2.4rem);
     width: calc(860px * 6 / 3 - 2.4rem);
    min-width: 260px; /* Matches the x260px in your image tag */
     overflow: hidden;
     overflow: hidden;
     background-color: #f8f9fa;
     background-color: #f8f9fa;
Line 12: Line 15:


#featured_article .card-image img {
#featured_article .card-image img {
    width: 100%;
     height: 100%;
     height: 100%;
     width: auto;
     object-fit: cover;
     position: relative;
     object-position: center;
     /* Edit thumbnail offset here */
}
     /* margin-left: 100%; */
 
#featured_article .card-text {
    flex: 1;
    padding: 1rem;
}
 
#featured_article .byline {
    font-size: 0.9em;
     color: #72777d;
     margin-bottom: 0.5em;
}
}


@media (prefers-color-scheme: dark) {
#featured_article h3 {
    #featured_article .card-image {
    margin: 0 0 0.5em 0;
        background: #2b2f36;
     font-size: 1.2em;
     }
}
}

Revision as of 01:05, 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;
}

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

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

#featured_article .card-text {
    flex: 1;
    padding: 1rem;
}

#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;
}