Custom.css In Frontend Editing - Question | JoomShaper
SP Page Builder 6 is Here! Learn More →

Custom.css In Frontend Editing

sitte

sitte

SP Page Builder 3 months ago

The main styling of the template I do in the custom.css file, which is automatically loaded on the page. Unfortunately, when using the frontend editor, this file does not load, which makes it difficult to preview during editing.

Is it possible to enable loading custom.css in frontend editing?

0
7 Answers
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 3 months ago #199340

Hi there!

Sorry for your experience.

Would you please elaborate on loading issue of custom.css in frontend editing? I mean how you expect it to behave? Explain with screencast to understand it better.

Best regards,

0
sitte
sitte
Accepted Answer
3 months ago #199368

I greatly appreciate the work you do, and we use your tools all the time. They are the best on the market.

I analyzed the problem and realized that I was wrong; the custom.css file is loaded when editing the page on the frontend. The problem I have is that the editor sets the padding of sections inline even though they are empty in edit panel.

  1. padding is not set in the section settings
  2. in the section preview, the editor enters inline padding:0

screen capture

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 2 months ago #202092

Hi,

Thanks for your kind words.

I thought I replied to you before. But somehow I have missed, sorry bout that. The older versions of SPPB was designed this way that when a new section is taken it apears with space by default. Lately we have decided that it should start without any space and then users will manage this thing.

So, is there any issue happening for that inline paddin 0 value in the editor view?

Sorry again for not being there.

Thanks for being with us:)

0
sitte
sitte
Accepted Answer
2 months ago #202109

We have been designing websites for years and strive to optimize our actions. We often create websites that have dozens or hundreds of subpages, so minor changes allow for efficient management.

Let me give you an example: By seting default padding for sections in CSS styles, we can modify this value even if we already have dozens of PageBuilder subpages prepared:

:root{
  --padding-top: 70px;
  --padding-right: 0;
  --padding-bottom: 70px;
  --padding-left: 0;
}
@media (max-width:767px){
    :root{
      --padding-top: 30px;
      --padding-right: 0;
      --padding-bottom: 30px;
      --padding-left: 0;
    }       
}
.sppb-section { padding: var(--padding-top) var(--padding-right) var(--padding-bottom) var(--padding-left); }

Of course, each section is individual, so for many sections, the padding must be corrected manually. For example, the section above the footer may require more bottom padding. If we enter only bottom padding for it in SP Page Builder, only that should be processed. The rest of the parameters should still be inherited from global styles.

This is not important for websites with 3 subpages, but it is crucial for managing websites with dozens or hundreds of subpages based on SpPageBuilder.

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #202226

Hi sitte,

So, are you saying, there is an issue with the parameters of global styles if specific section gets specific style? Sorry if I'm bothering you, just trying to understand the issue clearly.

Thanks for your co-operation.

0
sitte
sitte
Accepted Answer
1 month ago #202245

Yes, exactly. The issue is that when I set a specific value in SP Page Builder for a section (for example only padding-bottom), the editor automatically applies inline styles for all paddings (top, right, bottom, left).

This means that instead of only overriding the bottom padding, it also forces 0 for the other paddings, so the global styles from custom.css are ignored.

What I would expect:

  • If I set only padding-bottom in the editor, then only that property should be output inline.
  • The other padding values (top, left, right) should still be inherited from my global CSS.
0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #202477

Hi,

Thanks for the explanation. May I have a screencast of the full scenario? Can you confirm you are doing this with an unlock icon there, please?

Best regards,

0