Jump to content

Css Code applies in editor but not on live page

Go to solution Solved by creedon,

Recommended Posts

Password: bconsult

The code reveal text on a hover code works in my editor view but not in live view when I access the page from the front ed. Here i the doe I am using: 

 

@media only screen and (min-width: 640px){
#block-50a60eabf9b7879fd7ec{
opacity: 0;
 transition: opacity 1s
}
#block-50a60eabf9b7879fd7ec:hover {
opacity: 1;
transition: opacity 1s
}
}
@media only screen and (min-width: 640px){
#block-b9c394e42cbe4f0614b7{
opacity: 0;
 transition: opacity 1s
}
#block-b9c394e42cbe4f0614b7:hover {
opacity: 1;
transition: opacity 1s
}
}
@media only screen and (min-width: 640px){
#block-8ac8af888d0f13c5a5f5{
opacity: 0;
 transition: opacity 1s
}
#block-8ac8af888d0f13c5a5f5:hover {
opacity: 1;
transition: opacity 1s
}
}
@media only screen and (min-width: 640px){
#block-207b0fa7a755d1b13c8a{
opacity: 0;
 transition: opacity 1s
}
#block-207b0fa7a755d1b13c8a:hover {
opacity: 1;
transition: opacity 1s
}
}
@media only screen and (min-width: 640px){
#block-1559eef8f75e1479225a{
opacity: 0;
 transition: opacity 1s
}
#block-1559eef8f75e1479225a:hover {
opacity: 1;
transition: opacity 1s
}
}
@media only screen and (min-width: 640px){
#block-ad4977c97fa2f8f9cc87{
opacity: 0;
 transition: opacity 1s
}
#block-ad4977c97fa2f8f9cc87:hover {
opacity: 1;
transition: opacity 1s
}
}

 

 

Link to comment
  • Replies 6
  • Views 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

On 12/22/2022 at 3:36 AM, CKW_242 said:

Password: bconsult

The code reveal text on a hover code works in my editor view but not in live view when I access the page from the front ed. Here i the doe I am using: 

 

@media only screen and (min-width: 640px){
#block-50a60eabf9b7879fd7ec{
opacity: 0;
 transition: opacity 1s
}
#block-50a60eabf9b7879fd7ec:hover {
opacity: 1;
transition: opacity 1s
}
}
@media only screen and (min-width: 640px){
#block-b9c394e42cbe4f0614b7{
opacity: 0;
 transition: opacity 1s
}
#block-b9c394e42cbe4f0614b7:hover {
opacity: 1;
transition: opacity 1s
}
}
@media only screen and (min-width: 640px){
#block-8ac8af888d0f13c5a5f5{
opacity: 0;
 transition: opacity 1s
}
#block-8ac8af888d0f13c5a5f5:hover {
opacity: 1;
transition: opacity 1s
}
}
@media only screen and (min-width: 640px){
#block-207b0fa7a755d1b13c8a{
opacity: 0;
 transition: opacity 1s
}
#block-207b0fa7a755d1b13c8a:hover {
opacity: 1;
transition: opacity 1s
}
}
@media only screen and (min-width: 640px){
#block-1559eef8f75e1479225a{
opacity: 0;
 transition: opacity 1s
}
#block-1559eef8f75e1479225a:hover {
opacity: 1;
transition: opacity 1s
}
}
@media only screen and (min-width: 640px){
#block-ad4977c97fa2f8f9cc87{
opacity: 0;
 transition: opacity 1s
}
#block-ad4977c97fa2f8f9cc87:hover {
opacity: 1;
transition: opacity 1s
}
}

 

 

What is your URL Site?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 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
  • Solution

Try the following.

/* image hover effect, uses LESS syntax */

@media only screen and ( min-width : 640px ) {

  html:not( .squarespace-damask ) {
  
    .fe-block-50a60eabf9b7879fd7ec,
    .fe-block-b9c394e42cbe4f0614b7,
    .fe-block-8ac8af888d0f13c5a5f5,
    .fe-block-1559eef8f75e1479225a,
    .fe-block-207b0fa7a755d1b13c8a,
    .fe-block-ad4977c97fa2f8f9cc87
    
      {
      
        opacity : 0;
        transition : opacity 1s;
        
        &:hover {
        
          opacity : 1;
          
          }
          
        }
        
    }
    
  }

One thing to note. I made it so the code would not be active in Preview as that might interfere the editing process. To view the effect you'll need to use Private browsing.

Let us know how it goes.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 10 months later...
2 hours ago, PUPILA said:

Would appreciate any help you can give me.

It's hard to help when we can't see your site.

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

We can then take a look at your issue.

You may find How to post a forum question post useful.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 1 month later...

I'm having a similar issue. I can see the change I want in the CSS editor/preview experience but not on the live site.

URL: https://embracewa.org
 

Use case: We use the Rye font family across all our other advertising channels advertising Embrace Washington's fundraising gala (The Backwoods Flannel Ball). We want it to style a few elements on the homepage.

Here is my block of code that works in preview mode:

@import url('https://fonts.googleapis.com/css?family=Rye&display=swap');

#block-7ff5670405e4c801c2fa,
#block-6afaec43d023f245655c,
#block-c47804bd540c1a7b22a4,
#block-1b8e7264c616ddad531c
{
font-family: 'Rye';
}

But if you go to the homepage, you can see that it doesn't render the font in the blocks I'm targeting. 

 

Screen Shot 2024-01-08 at 17.17.15 PM.png

 

Screen Shot 2024-01-08 at 17.16.41 PM.png

Edited by KevinInChicago
Link to comment

Create an account or sign in to comment

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

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.