safeframe icon indicating copy to clipboard operation
safeframe copied to clipboard

Is there a way to config the host to allow css and fonts to be access from ext?

Open Sandilly opened this issue 6 years ago • 1 comments

In the docs (under the PosConfig section), one of the fields is css Style-sheet text or a URI to a CSS file that defines additional CSS to be used inside the SafeFrame iframe. Default value is "". How do I implement this for the host to pass down font styles and css so that the ext can use it? And how do I access this from $sf.ext if the host were able to pass down these files?

Sandilly avatar Sep 06 '18 17:09 Sandilly

So the "css" prop would be like any other CSS if you want to create a style sheet inline via a stile tag:

   {
         dest:   'tgtLREC',
         css:     ' div { font-family: arial; } `
 }

Or you could give it a URL and it will create a link tag to your style sheet. . . As far as accessing it via $sf.ext there is no official way to do that, nor am I sure why'd you'd need too. . .you are just setting up the position config on the publisher side.

seansd-zz avatar Sep 10 '18 14:09 seansd-zz