Designing an Enterprise CSS Framework is Hard, Stephanie Rewis
-
Upload
future-insights -
Category
Design
-
view
1.561 -
download
1
Transcript of Designing an Enterprise CSS Framework is Hard, Stephanie Rewis
![Page 1: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/1.jpg)
Designing an Enterprise CSS Framework is hard
Stephanie RewisSalesforce UX
![Page 2: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/2.jpg)
Stephanie Rewis@stefsullLead Developer, Design Systems, Salesforce UX
![Page 3: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/3.jpg)
Safe HarborSafe harbor statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
![Page 4: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/4.jpg)
Salesforce1
![Page 5: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/5.jpg)
![Page 6: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/6.jpg)
How do I get my app to look like this?
![Page 7: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/7.jpg)
Can I use the CSS in my app?
![Page 8: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/8.jpg)
![Page 9: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/9.jpg)
We'd like our prototypers to iterate more rapidly.
![Page 10: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/10.jpg)
We learned our style guide was too static.
![Page 11: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/11.jpg)
Lightning Design SystemThe next generation of living style guides
![Page 12: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/12.jpg)
Lightning Experience
![Page 13: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/13.jpg)
Design System ComponentsCSS Framework + UI Library
![Page 14: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/14.jpg)
Objects/Components
Lightweight
Modular
Reusable
Utilities
Non-semantic
Single Purpose
Dependencies
Tokens
![Page 15: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/15.jpg)
Objects/Components
Lightweight
Modular
ReusableDependencies
Tokens
Mixins
Functions
![Page 16: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/16.jpg)
clarity
Eliminate ambiguity. Enable people to see, understand, and act with confidence.
![Page 17: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/17.jpg)
Clarity and understandability in class names
![Page 18: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/18.jpg)
BEM Naming
BlockElementModifier
![Page 19: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/19.jpg)
Let's build a house!.house { block or component name }.house__door { element or component part }.house--red { modifier or component variation }.house__door--white { variation of a component part }
![Page 20: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/20.jpg)
We love documentation!
![Page 21: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/21.jpg)
![Page 22: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/22.jpg)
![Page 23: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/23.jpg)
efficiency
Streamline and optimize workflows. Intelligently anticipate needs to help people work better, smarter, and faster.
![Page 24: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/24.jpg)
Design audit and inventory of all components in designer's comps
![Page 25: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/25.jpg)
We broke the components down to their smallest patterns and objects.
![Page 26: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/26.jpg)
![Page 27: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/27.jpg)
![Page 28: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/28.jpg)
Enterprise applicationshave some unique traits.
![Page 29: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/29.jpg)
Enterprise applications demand content and data-rich interfaces.They lack vertical rhythm.
![Page 30: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/30.jpg)
Heading levels may vary and our components should be agnostic.
![Page 31: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/31.jpg)
Lists are used for their semantics.
![Page 32: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/32.jpg)
You can opt back in to the default element style using utility classes or a single wrapper.
<h2 class="slds-text-heading--medium slds-m-right--small"> Medium heading with a small margin on the right.</h2>
![Page 33: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/33.jpg)
![Page 34: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/34.jpg)
![Page 35: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/35.jpg)
Accessibility for all people and devices is very important.
![Page 36: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/36.jpg)
We baked accessibility in:
Semantics matter ARIA roles REM unit sizing We’ve documented what needs to happen when JS is added
![Page 37: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/37.jpg)
consistency
Create familiarity and strengthen intuition by applying the same solution to the same problem.
![Page 38: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/38.jpg)
Design TokensThe basic atoms of the Design System
![Page 39: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/39.jpg)
Types of Design Tokens
• Fonts• Font Sizes• Font Weights• Line Heights• Background Colors• Text Colors
• Border Colors
• Shadows
• Spacing
• Sizing
• Animation Durations
• Media Queries
• Z-indexes
![Page 40: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/40.jpg)
![Page 41: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/41.jpg)
Using Sass and tokens (variables), you can brand your app..slds-lookup__menu { position: absolute; width: 100%; margin-top: $spacing-xx-small; border: $border-width-thin solid $color-border; border-radius: $border-radius-medium; padding: $spacing-xx-small 0; background: $color-background-alt; z-index: $z-index-dropdown; }
![Page 42: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/42.jpg)
![Page 43: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/43.jpg)
We play well with others.
.button
.slds-button
![Page 44: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/44.jpg)
What is scoping anyway?
<div class="slds"><!-- Your components here -->
</div>
![Page 45: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/45.jpg)
How does scoping help?
<div class="slds"><!-- Your components here -->
</div>
ul li { margin-left: 20px; }.slds li { margin-left: 0; }
![Page 46: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/46.jpg)
beauty
Demonstrate respect for people’s time and attention through thoughtful and elegant craftsmanship.
![Page 47: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/47.jpg)
SVG icons for beauty at every size
![Page 48: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/48.jpg)
Components should render beautifully at any width.
![Page 49: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/49.jpg)
![Page 50: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/50.jpg)
![Page 51: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/51.jpg)
"I’ve been working on a mobile app that has a Salesforce1 look and feel for the past several weeks. I've been struggling to get the styling just right so I decided to scratch it and try out the framework.
I started this at 11am this morning and by the end of the day, I almost have a complete application that took me previously over 2 weeks to complete."
- Matt M. Sr. Software Engineer
![Page 52: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/52.jpg)
Resources
![Page 53: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/53.jpg)
Get the Design System
https://www.lightningdesignsystem.com/resources/downloads
https://github.com/salesforce-ux/design-system/
![Page 54: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/54.jpg)
Flexbox ResourcesA Complete Guide to Flexbox — CSS Trickshttps://css-tricks.com/snippets/css/a-guide-to-flexbox
Known Bugs and Workarounds for Flexbox — Phil Waltonhttps://github.com/philipwalton/flexbugs
![Page 55: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/55.jpg)
https://developer.salesforce.com/trailhead/module/lightning_design_system
![Page 56: Designing an Enterprise CSS Framework is Hard, Stephanie Rewis](https://reader031.fdocuments.in/reader031/viewer/2022030311/58ef29a41a28ab2c4e8b45bf/html5/thumbnails/56.jpg)
Thank you