function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JuanluJuanlu 

Siteforce doesn't support the CSS property "content"

Hi,

I'm using Siteforce in a Winter'12 prerelease Dev org. I have noticed that the CSS property "content" is not supported. This property is used in combination with the pseudo-selectors :before and :after.

This a standard property, available since CSS2 (almost ten years ago!) and therefore accepted by W3C. It should be supported by Siteforce, in order to fulfill the standards.

Regards.


Best Answer chosen by Admin (Salesforce Developers) 
JuanluJuanlu

I kind of find what is causing the problem. When adding CSS files you will be asked if you want to consider the files as CSS files or as regular assets. In both cases you have to link the css to the templates and/or pages in the properties tab.

 

1) If you choose CSS files, use the picklist in the bottom right corner.

 

2) If you choose assets, click on the "Edit Head Script" button and write the "<link ..." lines.

 

I chose to consider the CSS as CSS files but I was adding them using option 2), which didn't work.

 

Which option is better? Both have issues. The first one doesn't allow you to select for which media will a certain CSS be used, which is a big bug IMHO. The second one doesn't allow you to change the CSS files in Siteforce, so you have to change them locally and then reupload them, which is really annoying.

 

I hope this helpful for someone out there :-)

 

Regards

All Answers

JeremyWJeremyW

Agreed!  would you recommend this or stay away?   I am having a very hard time getting it enabled in a sandbox.  It's been over a week.  

JuanluJuanlu

I kind of find what is causing the problem. When adding CSS files you will be asked if you want to consider the files as CSS files or as regular assets. In both cases you have to link the css to the templates and/or pages in the properties tab.

 

1) If you choose CSS files, use the picklist in the bottom right corner.

 

2) If you choose assets, click on the "Edit Head Script" button and write the "<link ..." lines.

 

I chose to consider the CSS as CSS files but I was adding them using option 2), which didn't work.

 

Which option is better? Both have issues. The first one doesn't allow you to select for which media will a certain CSS be used, which is a big bug IMHO. The second one doesn't allow you to change the CSS files in Siteforce, so you have to change them locally and then reupload them, which is really annoying.

 

I hope this helpful for someone out there :-)

 

Regards

This was selected as the best answer
bryan.andersonbryan.anderson

I have found that special characters are getting stripped in some case when using the Stylesheet editor, such as when using an attribute substring selector (Ex: a[href$=".pdf"]). I was also trying to add a CSS class of "description" and found it was being partially stripped because it contains "script". For some of this CSS I ended up putting it in the Head Markup of the template or page. It works, but then you need to keep track of where all of the CSS is located. This definitely needs to be addressed.

AddisonAddison

Hi Juanlu and bryan,

 

We are aware of the CSS parser issues that you've raised here.  We always try to make our CSS parser better, so thanks for pointing them out and for your patience as we make improvements.

 

Addison

AddisonAddison

Hey Jeremy,

 

Siteforce is not supported on sandbox, so you should try signing up for a Developer Edition org to try out Siteforce.

 

Addison