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

From IxWiki
Jump to navigation Jump to search
mNo edit summary
Tag: Reverted
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
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;
    background-color: #f8f9fa;
    border-radius: 8px;
}
}


#featured_article .card-image {
#featured_article .card-image {
     width: calc(860px * 6 / 3 - 2.4rem);
     flex: 0 0 auto;
    max-width: 50%;
     overflow: hidden;
     overflow: hidden;
    background-color: #f8f9fa;
}
}


#featured_article .card-image img {
#featured_article .card-image img {
     height: 100%;
     display: block;
    max-width: 100%;
    max-height: 300px;  /* Adjust this value as needed */
     width: auto;
     width: auto;
     position: relative;
     height: auto;
     /* Edit thumbnail offset here */
     object-fit: contain;
     margin-left: 100%;  
}
 
#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;
}
}


@media (prefers-color-scheme: dark) {
#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 {
     #featured_article .card-image {
         background: #2b2f36;
         max-width: 100%;
     }
     }
}
}

Latest revision as of 01:11, 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 {
    flex: 0 0 auto;
    max-width: 50%;
    overflow: hidden;
}

#featured_article .card-image img {
    display: block;
    max-width: 100%;
    max-height: 300px;  /* Adjust this value as needed */
    width: auto;
    height: auto;
    object-fit: contain;
}

#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 {
        max-width: 100%;
    }
}