1

I am working on a proof of concept for a lightning component that will be available in the Community Builder. This component will become a part of a managed package so I would like to make it as flexible as possible. The community builder contains a lot of point-and-click customization like changing the color palette for a template, but my question is this:

From a lightning component that implements forceCommunity:availableForAllPageTypes, is there any way to access customization values from the Community Builder?

I can't find any documentation on that forceCommunity:availableForAllPageTypes other than you need to use it for your lightning component to show up. Additionally, it looks like the app.css file generated for the actual community does not use helper classes like .text-primary from Bootstrap but instead just drops color values into very specialized classes.

Thanks for any tips or links to documentation explaining this stuff! If we just drop in our own styles we will stick out like a sore thumb on the community page. Additionally, I know that we have the .design file to provide customization values, but I don't think that we can pull attributes from that file into the .css file and would have to instead use inline styling.

1

S. I work for Salesforce, specifically with Community Cloud. Seth mentioned that you were looking for this. I'm making some inquiries on exactly what's available, but for Lightning in general, it uses the Lightning Design System's design tokens functionality. An example is here: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/tokens_using.htm I believe that the font & color values populated in the branding view of Community Builder will automatically propagate to a set of design tokens (so you should not need to define them). I'm working with the team that builds it to determine exactly what those tokens are. Stay tuned!

  • Excellent, thanks for the info on the token usage. I'll do some more digging around too and see if I can find any more details on the community builder specific tokens. – dsharrison Jan 29 '16 at 23:16
  • Got a few more details. Remember, these are all pending official documentation so things may change a bit. The current tokens for all of Lightning are listed here: developer.salesforce.com/docs/atlas.en-us.lightning.meta/… Note that not all tokens will be available in Community Builder. I've had luck with the following: betaTokenActionColorText betaTokenActionColorBG betaTokenActionColorBorder betaTokenActionColorDarkerText betaTokenActionColorDarkerBG betaTokenActionColorDarkerBGHover betaTokenActionColorDarkerBorder betaTokenLinkColorText etc – Joe Morse Feb 1 '16 at 16:20
  • Thanks so much for looking into this. I will give those tokens a try. – dsharrison Feb 1 '16 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.