Jump to content

Code to customise font size for "related-item-link-text"

Recommended Posts

I am hoping to get some code to customise "related-item-link-text" which is appearing very large and with no padding at the moment. I am unable to share the direct link as it's in a members area. I am hoping someone can provide me with some basic code to reduce the font size and having some padding at top please.

related-items.jpg

Link to comment
  • Replies 9
  • Views 910
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

My coding knowledge is limited, but I got this from inspecting the section, does this help?

<a class="related-item-link-text" href="/escape-to-the-ocean-the-wave/v/09-gradation-of-sky-colour-applying-to-canvas-mixing-glow-colour">
        09. Sky Gradation of colour. Applying to canvas. Mixing glow colour
      </a>

Link to comment

@seapixelcreative Try adding this code in Website > Pages > Website Tools > Custom CSS

.related-item-link-text {
    font-family: var(~'--product-grid-text-below-title-font-font-family') !important;
    font-style: var(~'--product-grid-text-below-title-font-font-style') !important;
    font-weight: var(~'--product-grid-text-below-title-font-font-weight') !important;
    line-height: var(~'--product-grid-text-below-title-font-line-height') !important;
    letter-spacing: var(~'--product-grid-text-below-title-font-letter-spacing') !important;
    text-transform: var(~'--product-grid-text-below-title-font-text-transform') !important;
    color: var(~'--tweak-product-grid-text-below-list-title-color') !important;
}

@media screen and (min-width: 768px), screen and (max-width: calc(1984.28px)) and (orientation: landscape) {
   .related-item-link-text {
        font-size: calc(~'(var(--product-grid-text-below-title-font-font-size-value) - 1) * 1.2vw + 1rem') !important;
    }
}

@media screen and (max-width: 767px) and (orientation: portrait) {
 .related-item-link-text {
        font-size: calc(~'(var(--product-grid-text-below-title-font-font-size-value) - 1) * calc(.012 * min(100vh, 900px)) + 1rem)') !important;
    }
}

Let me know how it goes. If the classname is correct, it should appear the same as the 'You may also like' suggestions in the shop with physical products styling.

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.