Brent_Dickens Posted May 17, 2021 Share 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 Link to comment
Beyondspace Posted May 17, 2021 Share 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"] Spark_Plugin, Brent_Dickens and tuanphan 3 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
AndyB Posted July 25, 2022 Share 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. 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