+ Start a Discussion
RodBRodB 

Encountering several CSS problems - does Siteforce "really" want to support CSS?

I'm having a number of problems with CSS in siteforce: 

 

  • if I set the main panel to use an ID #main and hit apply, when I go back later, siteforce has converted from the CSS #main to an inline definition - is this expected? 
  • I can't use selectors of the form div#main - no a big deal, but that is a standard syntax
  • NONE of the combinators work - that's a real pain and will require a significant re-write of my existing stylesheets. In particular the decendent combinator doesn't appear to be supported! 

I wholeheartedly agree with the documentation - use CSS instead of the inline styles - but siteforce is NOT making this easy!!!!! 

 

Am I missing something? Is there an option or some syntax in the Style Pane I'm missing? 

 

BTW: I can understand why the product doesn't do this - it's not easy getting this right. But it would be nice to know if this is pilot error or if planned for a future release. 

Best Answer chosen by Admin (Salesforce Developers) 
Ryan-GuestRyan-Guest

Full CSS support is planned in a feature release. As a workaround, I'd link to CSS files as a separate asset for now.

 

In the future it'd be nice to support all of the things you mentioned, including some of the new CSS3 features such a media queries.

 

 

All Answers

Ryan-GuestRyan-Guest

Full CSS support is planned in a feature release. As a workaround, I'd link to CSS files as a separate asset for now.

 

In the future it'd be nice to support all of the things you mentioned, including some of the new CSS3 features such a media queries.

 

 

This was selected as the best answer
RodBRodB

That works. I've got an additional work-around that works well for my particular style sheets which is to use larger panels and content blocks and use my classes for styling within the blocks. Most of these classes are for use in templates rather than contributor content so this should work out fine. 

 

Would definitly like to see more css3 support! 

subhajit13subhajit13

Ryan,

 

Could yo uplease give a small example of how you are linking stylesheets from assets.

 

I have added a stylesheet in asset bot not being able to link in the custom code (the html content). The contecnt of the code is as follow:

     <h2>Demo</h2>
     <ul id="navigation">
      <li><a href="#">Home</a></li>
      <li><a href="#">Accounts </a></li>
      <li><a href="#">Contacts</a></li>        
    </ul>

 

I need to add a style sheet (say tab.css in asset) to make the list look like tabs. Any help will be much appriciated. Thanks.