hollykmsmith Posted August 1 Share Posted August 1 I'm having trouble getting the list section title to match the heading styling of the rest of my site (which uses H1). I have tried the attached code, matching the font size to the H1 size (which is 4rem). This works for desktop, however, when I switch to mobile, the heading size no longer matches the rest of my site. Is there a way to get the list section title to always match H1 styling, regardless of whether its dektop or mobile, rather than inputting a manual size (4rem)? I am already overriding header styling with a custom font (larken) by the way. And I am not yet able to publish the site, so I cannot give anyone direct access, other than the below screenshots. Link to comment
CassAggett Posted August 1 Share Posted August 1 Hi Holly, because the heading size is different on mobile, you'll need to use two codes - one for mobile and one for desktop. Easy fix 😊 Can you share a link to your site? If this helped you, please like or mark my solution as answer so others can scroll to it quickly 👆 Cass Aggett is a Squarespace website designer for go-getting women – no matter what stage of business. WEBSITE • INSTAGRAM Link to comment
hollykmsmith Posted August 1 Author Share Posted August 1 Hi Cass, The link is https://aspiring-dental.squarespace.com and the password is Aspiring-Dental-2023 (it's currently set to private). Thanks so much for your help! CassAggett 1 Link to comment
tuanphan Posted August 3 Share Posted August 3 You mean title "Pricing"? I see you solved with this code? .list-section-title * { font-family: 'larken' !important; font-size: 4rem !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
CassAggett Posted August 3 Share Posted August 3 On 8/1/2023 at 2:25 PM, hollykmsmith said: Hi Cass, The link is https://aspiring-dental.squarespace.com and the password is Aspiring-Dental-2023 (it's currently set to private). Thanks so much for your help! Thanks, sorry I didn't see your reply. Try this: @media screen and (max-width: 767px) { .list-section-title * { font-size: calc((var(--heading-1-size-value) - 1) * calc(.012 * min(100vh, 900px)) + 1rem) !important; } } (I didn't make this up, it's what the mobile version of H1 is set to haha) tuanphan 1 If this helped you, please like or mark my solution as answer so others can scroll to it quickly 👆 Cass Aggett is a Squarespace website designer for go-getting women – no matter what stage of business. WEBSITE • INSTAGRAM Link to comment
hollykmsmith Posted August 3 Author Share Posted August 3 Hi Cass, is this meant to replace what I've currently got there? Or do I add it underneath? In both instances, I get an error message when pasting your code in, "operation on an invalid type." And Tuanphan, the code that I have already used (the code you just pasted) works for desktop, but the sizing does not match the rest of the sections on mobile (see the screenshots I uploaded). Link to comment
Solution tuanphan Posted August 6 Solution Share Posted August 6 On 8/4/2023 at 6:35 AM, hollykmsmith said: Hi Cass, is this meant to replace what I've currently got there? Or do I add it underneath? In both instances, I get an error message when pasting your code in, "operation on an invalid type." And Tuanphan, the code that I have already used (the code you just pasted) works for desktop, but the sizing does not match the rest of the sections on mobile (see the screenshots I uploaded). When use calc symbol in CSS, you need to add some ~ and " character. Change code @CassAggett to this @media screen and (max-width: 767px) { .list-section-title * { font-size: calc(~"(var(--heading-1-size-value) - 1) * calc(.012 * min(100vh, 900px)) + 1rem") !important; } } CassAggett 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment