Jump to content

Custom CSS Appearing on back end but not front end

Recommended Posts

Site URL: https://www.agrifitsolutions.ca/

Hey guys,

I have some custom CSS to add a divider to the top of the block. As you can see in the first screenshot, the code appears on the backend.

Here is the code for reference:

[data-section-id="6099256065b40529aadc3eab"]
{
  .section-background {
  overflow: visible;
  &:before {
    content: '';
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: inherit;
  -webkit-mask: url(https://agrifit.squarespace.com/s/Orange-Triangle-Bottom.svg) bottom no-repeat;
    mask: url(https://agrifit.squarespace.com/s/Orange-Triangle-Bottom.svg) bottom no-repeat;
    transform: translateY(-100%);
    position: absolute;
    pointer-events: none;

    @media screen and (max-width: 800px) {
      -webkit-mask-size: 300% 50%;
              mask-size: 300% 50%;
    }}}
}

In the second screenshot, the CSS does not appear.

Any ideas?

Screen Shot 2021-08-04 at 10.47.59 AM.png

Screen Shot 2021-08-04 at 10.48.10 AM.png

Link to comment
  • 1 month later...
On 8/4/2021 at 11:59 PM, gmck said:

Site URL: https://www.agrifitsolutions.ca/

Hey guys,

I have some custom CSS to add a divider to the top of the block. As you can see in the first screenshot, the code appears on the backend.

Here is the code for reference:

[data-section-id="6099256065b40529aadc3eab"]
{
  .section-background {
  overflow: visible;
  &:before {
    content: '';
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: inherit;
  -webkit-mask: url(https://agrifit.squarespace.com/s/Orange-Triangle-Bottom.svg) bottom no-repeat;
    mask: url(https://agrifit.squarespace.com/s/Orange-Triangle-Bottom.svg) bottom no-repeat;
    transform: translateY(-100%);
    position: absolute;
    pointer-events: none;

    @media screen and (max-width: 800px) {
      -webkit-mask-size: 300% 50%;
              mask-size: 300% 50%;
    }}}
}

In the second screenshot, the CSS does not appear.

Any ideas?

Screen Shot 2021-08-04 at 10.47.59 AM.png

Screen Shot 2021-08-04 at 10.48.10 AM.png

I saw it display well

image.thumb.png.a5349a94a9d9173540ce7d0bc80c4850.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace (+100 Spark plugin customisations)
🥳 Freemium Squarespace Widget Templates (+1000 Elfsight 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

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.