Site logo

[Resolved] Change Font Weight of Heading just on Posts

Home Forums Support [Resolved] Change Font Weight of Heading just on Posts

Home Forums Support Change Font Weight of Heading just on Posts

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2399548
    Rostyslav

    Hello,

    I am using this code to change the font weight on all posts:

    .single.single-post h2, .single.single-post h3, .single.single-post h4, .single.single-post h5, .single.single-post h6{
    font-weight: 500;
    }

    Is there any way to combine that css in a shorter way or improve it?

    Thanks!!!

    #2399754
    David
    Staff
    Customer Support

    Hi there,

    modern browsers support the :is and :where pseudo properties that really help with that. Try:

    
    .single-post :is(h2,h3,h4,h5,h6) {
        font-weight: 900;
    }
    #2399946
    Rostyslav

    Thanks

    #2399955
    David
    Staff
    Customer Support

    You’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.