Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
SKYW4KR

Why are my YUI id's changing in 7.1?

Question

I'm trying to target images inside an element with a YUI id for css manipulation, however the YUI id is changing when the page reloads.

Repro steps:

  1. Inspect element
  2. find wrapper with YUI id
  3. Open custom css editor
  4. add "#yui ... id number" and styling code
  5. watch the styling apply correctly in real-time
  6. save changes
  7. reload page
  8. styles are no longer applied because after inspecting the same element, the YUI id has dynamically changed

Is this expected behavior? If so, what is the change to my workflow that i need to consider?

-lh

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 0
1 hour ago, SKYW4KR said:

So your insight gave me an idea to use #page-section-idXXX" .. which seems to have done the trick. Is that an acceptable practice? 

Yes.

Here's my guide to the IDs you should and shouldn't use: In Squarespace, what are the differences between #block-yui and #yui selectors?


sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi, I'm Paul, founder of SF Digital, a specialist company building the features that Squarespace didn't include
I am a Squarespace Expert and Squarespace Circle Leader with a
strong reputation on the Squarespace Forum. I'm trusted by thousands of Squarespace users worldwide, including designers, freelancers, business owners and agencies. My extensions add capabilities to Squarespace websites around the globe. They include the Enquiry Form ExtensionDatepicker Extension and Age Verification ExtensionNeed a custom Squarespace extension? Tell me about the functionality you need. Note that some links in my posts may be affiliate links. Book a Squarespace Expert when you need help.

Share this post


Link to post
  • 0

@tuanphan that worked for a single image, and i'm trying to address changes to a section of images. So your insight gave me an idea to use #page-section-idXXX" .. which seems to have done the trick. Is that an acceptable practice? 

TYIA!!

Share this post


Link to post
  • 0
Posted (edited)

@SKYW4KR Did you figure this out? I am trying to stop the links for about 80% of the images/titles on my blog summary post, but there is no block ID for each image/title, they are all yui ids that change each time. I tried disabling the whole summary's links then just forcing the 12 I do need to work... but... 

My code is as follows with the bold part being what changes (of course) and doesn't work. 

 //remove link in staff blog
div#block-yui_3_17_2_1_1590076520498_4551 .summary-title-link {
    pointer-events: none;
}
//add link to jordans profile
#yui_3_17_2_1_1591131927780_981 .summary-title-link {pointer-events: auto!important;}   <--- no block ID that I can see for this image

 

Thoughts? I

Edited by deaton72

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...