jdb99 Posted February 26 Share Posted February 26 (edited) I've worked on maybe 8-10 Squarespace sites injecting custom css and code into previously published websites, but now I'm working on one that hasn't been published yet and it almost seems too...easy? By that I mean I'm using actual class names, instead of something like this .block-id123456789 {custom css} I'm able to use actual class names like so: .header-nav-list {custom css} Is there a point in time when block IDs and section IDs are actually assigned? I'm glad I'm getting all of my code to work now, but I'm nervous that when the time comes for blocks and sections to have IDs, especially for custom JS and using querySelect(), that I'm going to have to put a lot of hours into redoing everything I've done so far. Edited February 26 by jdb99 Link to comment
Solution Ziggy Posted February 26 Solution Share Posted February 26 40 minutes ago, jdb99 said: .block-id123456789 This is for a block. 40 minutes ago, jdb99 said: .header-nav-list This is a global class. Blocks will always have a unique block ID, which is generated when you create the block. All of the global elements, header components, footer, block types etc. have classes and IDs like .header-nav-list or .sqs-block .image-block Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? 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