Skip to content

Commit 219c8fa

Browse files
committed
Merge pull request salesforce-ux#480 from salesforce-ux/winter-16
Winter 16 - 0.12.2 Release
2 parents 313eaea + f0b08e8 commit 219c8fa

File tree

14 files changed

+118
-26
lines changed

14 files changed

+118
-26
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
/public
1111
/site/assets/downloads/design-tokens
1212
npm-debug.log
13+
design-system-regression-testing

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Salesforce Lightning Design System
22

3+
[![Build Status](https://travis-ci.org/salesforce-ux/design-system.svg?branch=winter-16)](https://travis-ci.org/salesforce-ux/design-system)
4+
35
Welcome to the [Salesforce Lightning Design System](https://www.lightningdesignsystem.com) brought to you by [Salesforce UX](https://twitter.com/salesforceux).
46

57
* Tailored for building Salesforce apps: Using the Lightning Design System markup and CSS framework results in UIs that reflect the Salesforce Lightning look and feel.

RELEASENOTES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# Salesforce Lightning Design System
22
# Release notes
33

4+
## Release 0.12.2 - February 8, 2015
5+
6+
**SITE IA**
7+
- Add Getting Started > Markup and Style guidelines with BEM information
8+
9+
**CHANGES**
10+
- Copy updates on components to represent Voice & Tone Guidelines
11+
- Some tokens that were unable to be overridden by not having a !default flag has been resolved
12+
- Reordered tokens so large form factor has priority
13+
- Fix for scoping issue with tabs and active state - bug [#106](https://github.com/salesforce-ux/design-system/issues/106)
14+
- Increased active tab state specificity
15+
416
## Release 0.12.1 - December 16, 2015
517

618
**SITE IA**

app_modules/global/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export default {
2828
{type: 'heroku-static-starter', url: 'https://github.com/salesforce-ux/demo_slds_heroku'}
2929
],
3030
unmanagedPackageUrls: [
31+
{ version: '0.12.2', url: 'https://login.salesforce.com/packaging/installPackage.apexp?p0=04t61000000Tmfp' },
3132
{ version: '0.12.1', url: 'https://login.salesforce.com/packaging/installPackage.apexp?p0=04t61000000Tl1A' },
3233
{ version: '0.12.0', url: 'https://login.salesforce.com/packaging/installPackage.apexp?p0=04t61000000Tji5' },
3334
{ version: '0.11.0', url: 'https://login.salesforce.com/packaging/installPackage.apexp?p0=04t61000000T0UT' },

app_modules/site/navigation/navigation.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export default [
3434
{
3535
route: 'getting-started:heroku',
3636
label: 'Heroku'
37+
},
38+
{
39+
route: 'getting-started:markup-and-style',
40+
label: 'Markup and Style'
3741
}
3842
]
3943
},

app_modules/site/navigation/sitemap.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default new SitemapRouter().map(function () {
2121
this.route('visualforce');
2222
this.route('lightning');
2323
this.route('heroku');
24+
this.route('markup-and-style');
2425
this.route('getting-started-node-js');
2526
});
2627

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "design-system",
3-
"version": "0.12.1",
3+
"version": "0.12.2",
44
"description": "Salesforce Lightning Design System",
55
"license": "SEE LICENSE IN README.md",
66
"repository": {
@@ -33,7 +33,7 @@
3333
"autoprefixer": "6.0.1",
3434
"babel": "5.8.23",
3535
"babel-core": "5.8.23",
36-
"babel-eslint": "4.1.1",
36+
"babel-eslint": "4.1.8",
3737
"babel-loader": "5.3.2",
3838
"babel-runtime": "5.8.20",
3939
"browser-sync": "2.9.1",

site/assets/images/house.png

13.4 KB
Loading
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
Copyright (c) 2015, salesforce.com, inc. All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
7+
Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
8+
9+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10+
*/
11+
12+
import React from 'react';
13+
import PageBody from 'app_modules/site/components/page/body';
14+
import version from '.generated/site.version';
15+
import { prefix as pf } from 'app_modules/ui/util/component';
16+
17+
18+
import g from 'app_modules/global';
19+
import { Link } from 'react-router';
20+
21+
const versionNumber = version.sldsVersion.replace(/(v|\.)/g, '');
22+
const moduleName = g.moduleName;
23+
const staticAssetName = g.filenamePrefix.toUpperCase() + versionNumber;
24+
const unmanagedPackageUrl = g.unmanagedPackageUrls[0].url;
25+
26+
export default (
27+
<PageBody anchorTitle="Markup and Style" contentClassName={pf('container--large')}>
28+
<p className="site-text-introduction">
29+
The Salesforce Lightning Design System (SLDS) component library was developed to enable Salesforce developers to create a uniform look and feel across all Salesforce-related applications while adhering to CSS best practices and conventions.
30+
</p>
31+
<p>In order to accomplish this goal, we’ve chosen to use very specific naming techniques. These allow us to keep our code base flat, with low specificity, and keeps us from fighting specificity wars that start with frustration and end with <code>!important</code>. Though we base our naming on the BEM method, we have a few additions of our own outlined below.
32+
</p>
33+
<h2 className="site-text-heading--large">BEM Naming</h2>
34+
<p><a href="https://en.bem.info/">BEM</a> is a well-known method of naming components — block, element, modifier. If you&rsquo;re comfortable with BEM, move down to the “Where we diverge from BEM” section. For those unfamiliar or who need a quick refresh, let&rsquo;s briefly look at how BEM works. As an example, we’ll build a house component.
35+
</p>
36+
<img src={`/assets/images/house.png`} width="400" height="371" alt="gray house with pink door and gray steps" className={pf('float--left')} />
37+
<h3 className="site-text-heading--medium">Block</h3>
38+
<p>A block represents the main component name. If you were building a house component, the class name would be <code>.house</code>. All of the properties you want included for all houses would be included in the base <code>.house</code> class.
39+
</p>
40+
<h3 className="site-text-heading--medium">Element</h3>
41+
<p>An element represents a part of a component and is separated by two underscores. The door of the house would be represented by the class <code>.house__door</code>. A window would be <code>.house__window</code>.
42+
</p>
43+
<p>Be careful to look for smaller component possibilities within a larger component. Especially if it&rsquo;s a pattern that might be repeated in an unrelated component. Avoid using a class like <code>.house__stair__step</code>. Instead, either use <code>.house__stair-step</code> (a single dash does not indicate anything in BEM and can simply be used for compound naming). Or if the stair portion of the component might be used inside another component, make the <code>.stair</code> a smaller component within the larger component and use <code>.stair__step</code> as an element of it.</p>
44+
<h3 className="site-text-heading--medium">Modifier</h3>
45+
<p>A modifier is a component or element variation and is separated by two dashes. The variation can apply to the overall component or it can be applied to an element within the component.</p>
46+
<p>Since the properties that should apply to every house are placed on the main <code>.house</code> class, all houses receive the <code>.house</code> class as the base. If there is a variation of a house — perhaps it is gray — the <code>.house--gray</code> class would be added to the component in addition to the <code>.house</code> class.</p>
47+
<p>If the house has a pink door, a variation can be placed on the door element itself — <code>.house__door--pink</code>.</p>
48+
<h2 className="site-text-heading--large">Where we diverge from BEM</h2>
49+
<p>In some cases, for reasons of brevity and comprehension, we&rsquo;ve added to, or deviated from, typical BEM naming conventions. These changes are outlined below.
50+
</p>
51+
<h3 className="site-text-heading--medium">Utility Classes</h3>
52+
<p>Though BEM syntax is traditionally based off an initial block, in some cases (in our utilities) we have opted to remove that requirement. For example, margin and padding are indicated with the formula <code>.m-top--medium</code> (margin, top, medium). So while there is no base <code>.m</code> or <code>.m-top</code> class as a base class, we feel it’s an easily understandable way to indicate that there is a size variation in these utility classes.</p>
53+
<p>Our spacing utilities similarly use the syntax <code>.size--1-of-2</code> without a base <code>.size</code> class. Text sizing uses class names like <code>.text-body--small</code> and <code>.text-heading--large</code> without a base <code>.text-body</code> or <code>.text-heading class</code>.
54+
</p>
55+
<h3 className="site-text-heading--medium">Component Containers</h3>
56+
<p>Though generic .container classes exist, sometimes a component has an optional container — but it is specific to that component alone. Those containers should be indicated by a class using a single underscore. For example, when a <code>.pill</code> has an optional container applied, that class is written as <code>.pill_container</code>.
57+
</p>
58+
<h3 className="site-text-heading--medium">Namespacing</h3>
59+
<p>In order to make this framework easy to use with other frameworks, we’ve added the .slds- namespace. Rather than using <code>.button</code>, our framework uses <code>.slds-button</code>. This allows you to integrate the Lightning Design System (SLDS) with your own bespoke CSS or to integrate it with an application that uses the modified Salesforce Bootstrap framework previously used as you wean your application away from it.
60+
</p>
61+
<h3 className="site-text-heading--medium">Scoping</h3>
62+
<p>In some cases, when you don&rsquo;t have full control of the DOM (for example, when integrating with Visualforce, Lightning Components or another framework), you may need to scope components built with SLDS. In this case, three different versions of the CSS framework are available in the download.</p>
63+
<p>The components built from SLDS should have the class .slds at the highest level of the DOM where they&rsquo;re included. In some cases this will be a wrapper at the component level, in other cases you may wrap several components. Do not place .slds on the body level of the application if you are including non-slds components within it. This would cause the non-slds components to be scoped and may override expected styles with negative effects.</p>
64+
<h2 className="site-text-heading--large">Component States</h2>
65+
<p>When a component has a variety of states, we add a class to indicate the state the component, or certain portions of the component, are in. Some examples are: <code>.is-selected</code>, <code>.is-active</code>, <code>.is-expanded</code>, <code>.is-nested</code>, <code>.is-open</code>, <code>.has-focus</code>, <code>.has-error</code>, etc.
66+
</p>
67+
<p>
68+
Please address any questions about our code style or contributing to our project to our <a href="https://github.com/salesforce-ux/design-system/issues">GitHub issues</a>.
69+
</p>
70+
</PageBody>
71+
);

site/index.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Overview extends React.Component {
7272
<ul className={pf('grid wrap grid--pull-padded-large site-grid--landing-primary')}>
7373
<li className={pf('col--padded-large p-vertical--xx-large clearfix')}>
7474
<p className={pf('size--1-of-1 medium-size--1-of-2 float--right')}>
75-
<img className="image" src="/assets/images/landing/img-icon-group.svg" alt="Image of a grouping of icons" />
75+
<img className="image" src="/assets/images/landing/img-icon-group.svg" alt="" />
7676
</p>
7777
<dl className={pf('medium-size--1-of-2')}>
7878
<dt className="site-text-heading--large">Style with Ease</dt>
@@ -81,7 +81,7 @@ class Overview extends React.Component {
8181
</li>
8282
<li className={pf('col--padded-large p-vertical--xx-large clearfix')}>
8383
<p className={pf('size--1-of-1 medium-size--1-of-2 float--left')}>
84-
<img className="image" src="/assets/images/landing/img-expertise.svg" alt="Image for designing with expertise" />
84+
<img className="image" src="/assets/images/landing/img-expertise.svg" alt="" />
8585
</p>
8686
<dl className={pf('medium-size--1-of-2 float--right')}>
8787
<dt className="site-text-heading--large">Design with Expertise</dt>
@@ -90,7 +90,7 @@ class Overview extends React.Component {
9090
</li>
9191
<li className={pf('col--padded-large p-vertical--xx-large clearfix')}>
9292
<p className={pf('size--1-of-1 medium-size--1-of-2 float--right')}>
93-
<img className="image" src="/assets/images/landing/img-opensource.svg" alt="Image of open source code" />
93+
<img className="image" src="/assets/images/landing/img-opensource.svg" alt="" />
9494
</p>
9595
<dl className={pf('medium-size--1-of-2')}>
9696
<dt className={pf('site-text-heading--large')}>Contribute with Purpose</dt>
@@ -101,7 +101,7 @@ class Overview extends React.Component {
101101
<ul className={pf('grid wrap grid--align-spread grid--pull-padded-large')}>
102102
<li className={pf('col--padded-large size--1-of-1 large-size--1-of-3')}>
103103
<div className="grid-card">
104-
<img src="" alt="Trustworthy Image" />
104+
<img src={`/assets/images/landing/icon-trust.svg`} alt="" />
105105
<dl>
106106
<dt className="site-text-heading--label-weak-large">Trustworthy</dt>
107107
<dd><hr className="hr hr--orange" />We’ve put the design system through its paces. We’ve engaged in thousands of hours of user research, and tested the system in all of the same browsers that the Lightning Experience supports.</dd>
@@ -110,7 +110,7 @@ class Overview extends React.Component {
110110
</li>
111111
<li className={pf('col--padded-large size--1-of-1 large-size--1-of-3')}>
112112
<div className="grid-card">
113-
<img src={`/assets/images/landing/icon-platform.svg`} alt="Platform-Agnostic Image" />
113+
<img src={`/assets/images/landing/icon-platform.svg`} alt="" />
114114
<dl>
115115
<dt className="site-text-heading--label-weak-large">Platform-Agnostic</dt>
116116
<dd><hr className="hr hr--purple" />You can use our CSS framework with any technology stack you can dream up. Additionally, we provide guidance around how to use it in conjunction with Salesforce technologies such as Lightning, Visualforce, and Heroku.</dd>
@@ -119,7 +119,7 @@ class Overview extends React.Component {
119119
</li>
120120
<li className={pf('col--padded-large size--1-of-1 large-size--1-of-3')}>
121121
<div className="grid-card">
122-
<img src={`/assets/images/landing/icon-living.svg`} alt="Living Design System Image" />
122+
<img src={`/assets/images/landing/icon-living.svg`} alt="" />
123123
<dl>
124124
<dt className="site-text-heading--label-weak-large">Living</dt>
125125
<dd><hr className="hr hr--pink" />The Salesforce UX team actively designs, develops, tests, and maintains the design system. As Salesforce pushes out UI changes with every release, the design system stays seamlessly in sync.</dd>
@@ -136,7 +136,7 @@ class Overview extends React.Component {
136136
<div className="grid-card">
137137
<div className={pf('grid grid--align-spread')}>
138138
<h3 className={pf('site-text-heading--label-weak-large align-middle')} id="downloads-header">Downloads</h3>
139-
<img src={`/assets/images/landing/icon-download.svg`} alt="Downloads" />
139+
<img src={`/assets/images/landing/icon-download.svg`} alt="" />
140140
</div>
141141
<hr className="hr hr--pink" />
142142
<p>Get all of the pieces of the {globals.displayName}, including our icons, fonts, and CSS&nbsp;framework.</p>
@@ -147,7 +147,7 @@ class Overview extends React.Component {
147147
<div className="grid-card">
148148
<div className={pf('grid grid--align-spread')}>
149149
<h3 className={pf('site-text-heading--label-weak-large align-middle')} id="tutorials-header">Tutorials</h3>
150-
<img src={`/assets/images/landing/icon-tutorial.svg`} alt="Tutorials" />
150+
<img src={`/assets/images/landing/icon-tutorial.svg`} alt="" />
151151
</div>
152152
<hr className="hr hr--orange" />
153153
<p>Learn best practices, tips and tricks on how to use, customize, and implement the {globals.displayName}.</p>

ui/components/notifications/flavors/alert/index.react.example.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ exports.preview = (
5454
<span className={pf('assistive-text')}>Error</span>
5555
<h2>
5656
<SvgIcon className={pf('icon icon-text-email icon--small m-right--x-small')} sprite="utility" symbol="ban" />
57-
Your browser is currently not supported. Your Salesforce may be degraded. <a href="#">More Information</a>
57+
Your browser is not currently supported. Your Salesforce experience may be degraded. <a href="#">More Information</a>
5858
</h2>
5959
</div>
6060

@@ -68,7 +68,7 @@ exports.preview = (
6868
<span className={pf('assistive-text')}>Offline</span>
6969
<h2>
7070
<SvgIcon className={pf('icon icon-text-email icon--small m-right--x-small')} sprite="utility" symbol="offline" />
71-
You are in offline mode. <a href="#">More Information</a>
71+
You’re working in Offline mode. <a href="#">More Information</a>
7272
</h2>
7373
</div>
7474

ui/components/notifications/flavors/toast/index.react.example.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ exports.preview = (
4747
<div className={pf('notify__content grid')}>
4848
<SvgIcon className={pf('icon icon--small m-right--small col no-flex')} sprite="utility" symbol="notification" />
4949
<div className={pf('col align-middle')}>
50-
<h2 className={pf('text-heading--small ')}>Your new contact <a href="#">Sara Smith</a> was successfully created.</h2>
50+
<h2 className={pf('text-heading--small ')}>You created the <a href="#">Sara Smith</a> contact.</h2>
5151
</div>
5252
</div>
5353
</div>
@@ -62,7 +62,7 @@ exports.preview = (
6262
symbol="close"
6363
assistiveText="Close" />
6464
<div className={pf('notify__content')}>
65-
<h2 className={pf('text-heading--small')}>Oops, you've missed some required form inputs.</h2>
65+
<h2 className={pf('text-heading--small')}>Make sure you fill out all the required fields.</h2>
6666
</div>
6767
</div>
6868
</div>
@@ -79,7 +79,7 @@ exports.preview = (
7979
<div className={pf('notify__content grid')}>
8080
<SvgIcon className={pf('icon icon--small m-right--small col no-flex')} sprite="utility" symbol="warning" />
8181
<div className={pf('col align-middle')}>
82-
<h2 className={pf('text-heading--small')}>You've encountered some errors when trying to save edits to Samuel Smith.</h2>
82+
<h2 className={pf('text-heading--small')}>We couldn’t save your edits to Samuel Smith.</h2>
8383
</div>
8484
</div>
8585
</div>

ui/components/tabs/flavors/default/index.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@
7777
margin-left: $spacing-large;
7878
}
7979
}
80+
81+
&.#{$css-prefix}active .#{$css-prefix}tabs--default__link {
82+
border-color: $color-text-tab-label-selected;
83+
color: $color-text-action-label-active;
84+
85+
&:focus {
86+
color: $color-text-tab-label-selected;
87+
}
88+
}
8089
}
8190

8291
.#{$css-prefix}tabs--default__content {
@@ -107,12 +116,3 @@
107116
box-shadow: $color-text-tab-label-selected 0 -#{$border-width-thin} 0 inset;
108117
}
109118
}
110-
111-
&.#{$css-prefix}active .#{$css-prefix}tabs--default__link {
112-
border-color: $color-text-tab-label-selected;
113-
color: $color-text-action-label-active;
114-
115-
&:focus {
116-
color: $color-text-tab-label-selected;
117-
}
118-
}

0 commit comments

Comments
 (0)