Does anyone know how I can access the standard CSS styling that SFDC uses for a record's edit page? I used pageBlock, pageBlockSection,a dn pageBlockSectionItem tags to mimic the styling, but I'm running into limitations in other areas that require me to now use HTML tables. I'd like to create those tables to mimic the same CSS styling. Any ideas? Thanks.
This is a tough path to go down. The best case would be to use apex elements. That being said, there are tons of use cases where you just need to write your own HTML. While it is more work, my suggestion would be to create your own stylesheet that mimics Salesforce styling. Trying to directly access their styles leaves you very prone down the road as Salesforce updates its styles. There are a number of other advantages to creating your own stylesheet for the pages:
- You can take the parts of Salesforce styling that you like, but tweak elements that you do not.
- If you are having to write your own HTML, it is probably the case that there is not a direct translation from the Salesforce styles to your use case. This gives you an option to tailor the page for your end users.
- You can easily tweak styles as you get feedback from your end users.
- Use LESS or SASS to create your stylesheet and maintaining it becomes a breeze.