Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I'm trying to make the line height smaller.
I tried going into the base.css and changing this, however as I change the numbers in this line nothing changes. All help is appreciated!
.text-body {
font-size: 1.5rem;
letter-spacing: 0.06rem;
line-height: calc(1 + 0.8 / var(--font-body-scale));
font-family: var(--font-body-family);
font-style: var(--font-body-style);
font-weight: var(--font-body-weight);
}
Doing this shrunk the size of all text on my website, but did not affect the line height specifically.
I tried changing the 1 value and the 0.8 value and no result, I also tried removing the equation and just putting "1;" which also did not work, is that what you meant or is there something else I can do?
The Line-height value can be set as a unitlesse number like 1.2 rem, 12px or 120%. You can try test on your code and adjust it as you wish:
.text-body {
font-size: 1.5rem;
letter-spacing: 0.06rem;
line-height: 12px !important; /* Adjust this value as needed */
font-family: var(--font-body-family);
font-style: var(--font-body-style);
font-weight: var(--font-body-weight);
}
I hope it helps.
Esther
I tried changing the 1 value and the 0.8 value and no result, I also tried removing the equation and just putting "1;" as well as putting "80%;" which also did not work, is that what you meant or is there something else I can do?
Please provide the link of your store
Please specify which text needs editing and include a screenshot to point it out clearly.
Best,
Daisy
I was able to figure it out playing with some code, but I also wonder how to make the body text smaller if that is something you can help with.
In the settings -> typography -> font size scale it is already at the smallest (50) and I have tried a bunch of code in the assets.css and other files to change the size of it but it never changes.
For example on these two pages:
https://satorivintage.com/pages/about
https://satorivintage.com/products/dirk-bikkembergs-shorts
Password: aibewn
.product__description p {
font-size: 10px !important;
}
I hope this helps
Best,
Daisy