Brent_Dickens Posted May 17, 2021 Posted May 17, 2021 How do I target a section 'sectionTheme' using custom css. I want to target: "sectionTheme": "light" within the: data-current-styles {} Beyondspace 1
Beyondspace Posted May 17, 2021 Posted May 17, 2021 2 hours ago, Brent_Dickens said: How do I target a section 'sectionTheme' using custom css. I want to target: "sectionTheme": "light" within the: data-current-styles {} it's call attribute selector, you can use something like [data-section-theme="white"] Brent_Dickens, tuanphan and Rasmus_SparkPlugin 3 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
AndyB Posted July 25, 2022 Posted July 25, 2022 On 5/16/2021 at 10:58 PM, Brent_Dickens said: How do I target a section 'sectionTheme' using custom css. I want to target: "sectionTheme": "light" within the: data-current-styles {} Assuming you want to apply CSS to all sections with a light color theme assigned to them, you can use the data-section-theme attribute, or it looks like Squarespace creates a class based on the assigned color theme. To use the attribute: [date-section-theme="light"] You'll notice this attribute in the first line of the <section> tag. I'm sure "light" changes to correspond with whatever color theme is chosen for that section. To use the class: .light If you look at the end of the list of classes assigned to that section, you'll notice "light" show up right before the data-section-id attribute. It's sort of hidden by showing up right there, but it should work for selecting all sections with the light color theme assigned to them. The same is likely true with this class in that it changes to correspond with whatever color theme is chosen for that section. Looking for help with a project? 💻 www.connectionmadedesign.com ✅ for hire on Upwork (Top Rated Plus)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment