Gradients - Post ID 289496

User 2906089 Photo


Registered User
82 posts

Hello All,

Is there a way inside of SD to add the position, shape, or size options to the css property of gradients? I think I need to create my own custom css sheet to do this but I'm not sure. Any help would be appreciated.
User 122279 Photo


Senior Advisor
12,718 posts
Online Now

You get some way by using the tools you find on the Styles pane - Design tab - Background - New gradient. At least 4 colour stops/changes, linear and radial gradients are possible.
Ha en riktig god dag!
Inger, Norway
My new honey site, built with RFF: https://eikweb.com/horgenhonning/
Component sharing for RFF, RBB, RSD and SD: https://eikweb.com/sharing/


User 2906089 Photo


Registered User
82 posts

Hi Inger,

I know about those settings. I made a huge mistake of reading the css documentation and then found way too many sites that help with the css, but we can't add any css inside of SD if I'm understanding that right.

Could a component be made to be able to add different styles of gradients? I've never used or learned how the CC components work. Can they also store related JS files? You are the Queen of Components, that's for sure!

User 122279 Photo


Senior Advisor
12,718 posts
Online Now

Hi, I wouldn't be able to answer your question right off the top of my head. And besides, I'm just preparing for a wee hospitalisation of some few days' duration, so I'm a bit short of time right now. But you could also ask the 'King of Js', Eric, the same question. ;) He might have some ideas.
Ha en riktig god dag!
Inger, Norway
My new honey site, built with RFF: https://eikweb.com/horgenhonning/
Component sharing for RFF, RBB, RSD and SD: https://eikweb.com/sharing/


User 2906089 Photo


Registered User
82 posts

I'm now aware of several jquery plug-ins that will create gradients for backgrounds and text.

Can I create a SD component from outside code? Say for example I create a html, css, and a .js files. Is there a way to import that so it can be selected and then turned into a component? So much to learn!

Wishing you happy thoughts while at the hospital and hopefully the recover time will be short.


User 122279 Photo


Senior Advisor
12,718 posts
Online Now

You can use outside code. But be aware, that css or js, or anything you include into the 'resources' and link to in the page manager, will not be included in a component when you export it. If you check my sharing library, you will see any amount of building blocks where I'm saying something like 'don't forget the styles/js/whatever in the page manager'. I have learnt since, that if those styles/js or whatever are popped into a html element and stored in the page itself, then it will work, but it is not really a good practice. The developers are looking into this thing after I asked them to let stuff from the page manager be included in exported components, but I don't know how far that has got. And also, so far you cannot include php stuff in the page manager.
Ha en riktig god dag!
Inger, Norway
My new honey site, built with RFF: https://eikweb.com/horgenhonning/
Component sharing for RFF, RBB, RSD and SD: https://eikweb.com/sharing/


User 2907842 Photo


Registered User
42 posts

Bosco

Site designer does have limitations regarding CSS styling such as shapes, and other various advanced CSS properties. However, you're able to reference style sheets from your resources.

Inside page manager create the dependency; between your custom css and the page you're working on.
Assign the appropriate RSD elements the class names from the custom css file.

a small snip that applies a shape
.cBlob {
shape-outside: circle(50%);
width: 150px;
height: 200px;
float: left;
background: blue;
}


If you properly reference all appropriate files from resources into the page. You can create entire websites without having to add a single element (besides an HTML element).
User 2906089 Photo


Registered User
82 posts

Thanks Bas, your method is working out well.
User 2906089 Photo


Registered User
82 posts

Inger, I've had to read your response multiple times. Do I have this right, sd does not support or implement php code in any form meaning internal or external. I would have to add any php scripts and calls with a html editor after SD exports the code, each time you export?

Further more if you place your code into the appropriate location in the export directory, they will not get uploaded? I this is the case, I thank you in advance for the issues.
User 187934 Photo


Senior Advisor
18,828 posts
Online Now

Hi Bosco,
You can use php code in html elements within SD if you site is setup to parse php within html.
As far as php pages you can't use them directly but what I do if I need a php page I name it mypagename.php and SD will name it mypagename.php.html on export. This way all I need to do is remove the .html from the name and I'm good to go.
This doesn't apply to S-Dive sites. There you can't do any php or php hacks.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
https://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
https://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.