Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to individually versioned packages with Lerna #265

Merged
merged 330 commits into from
Sep 19, 2019
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
330 commits
Select commit Hold shift + click to select a range
03eb7b0
Add support for copying workflow icons, if installed
lazd Jul 11, 2019
d39d4d8
Add missing gulp-rename dep, update package-lock
lazd Jul 11, 2019
01ad06f
Install spectrum-icons locally so releases can go out with 'em
lazd Jul 11, 2019
4419a76
Update package-lock with lerna hoisted deps
lazd Jul 11, 2019
3f3ad42
Move icon install to backwards compat tasks
lazd Jul 11, 2019
c3d5fa3
Just add @spectrum/spectrum-icons as an optional dependency
lazd Jul 11, 2019
b12e1ba
2.14.0-alpha.2
lazd Jul 11, 2019
01d9b48
Start on a specific-versioned package with a totally-not-an-iframe do…
lazd Jul 13, 2019
2475590
Silly fast navigation with fun little XMLHTTPRequest action
lazd Jul 14, 2019
295f70d
Complete fastloading docs (albeit without correctly calculated depend…
lazd Jul 14, 2019
db1b4a2
Keep track of where we are in nav
lazd Jul 14, 2019
bfb8302
Don't load every single dep for default pages, lazy load deps as docs…
lazd Jul 14, 2019
ea3dcf9
Fix syntax highlighting, rebuild docs pages when includes change
lazd Jul 15, 2019
388ee8d
Add titles to docs, fix wrapping of examples
lazd Jul 15, 2019
fdc00c5
Fix version number of package pages
lazd Jul 15, 2019
8884307
Fix loading of doc-only dev dependencies
lazd Jul 15, 2019
e34af35
Start breaking top-level build out as a separate package
lazd Jul 15, 2019
9272a7e
Add Accordion, oops
lazd Jul 15, 2019
9462b1b
Get dep order correct, swap titles out when pages are fastloaded
lazd Jul 15, 2019
a151e24
Fix dependencies for Tabs toomany example
lazd Jul 15, 2019
46b5570
Re-enable gh-pages for top level builder before testing release
lazd Jul 15, 2019
5ebe05c
Prepare to test publish with gh-pages, it SHOULD go to the right place
lazd Jul 15, 2019
b5d9a67
Manually commit and tag since npm won't do it unless it's in the root
lazd Jul 15, 2019
2bd0223
Fix ghpages deployment
lazd Jul 15, 2019
0e97ac3
v2.14.0-alpha.3
lazd Jul 15, 2019
53a01c1
Fix backwards compat icon copying (they're installed at the top level…
lazd Jul 15, 2019
30efcaa
v2.14.0-alpha.4
lazd Jul 15, 2019
4341815
Load workflow icons from the backwards compat copied folder
lazd Jul 15, 2019
3881d30
v2.14.0-alpha.5
lazd Jul 15, 2019
cfa3a8b
Block loading examples until their dependencies have been loaded
lazd Jul 15, 2019
0026e91
v2.14.0-alpha.6
lazd Jul 15, 2019
11c4983
Make examples scroll on their own
lazd Jul 15, 2019
15b0857
Make history actually work
lazd Jul 15, 2019
840644f
Remove circular deps in build, simplify per-component docs pages
lazd Jul 16, 2019
79d8f8f
Fix rendering in Safari, add favicon, move other head tags to depende…
lazd Jul 16, 2019
80d878a
Shorten a couple example titles a bit
lazd Jul 16, 2019
c7fb584
Remove X-UA-Compatible since we don't support < IE 11 anyway
lazd Jul 16, 2019
89ccdc9
Give that task a name so it shows up properly in logs, adjust path ah…
lazd Jul 16, 2019
fc838ce
Quickly update READMEs with relevant information for individually ver…
lazd Jul 16, 2019
2197e07
Update package-lock, fix vulnerabilities
lazd Jul 17, 2019
6c7c517
Break out toplevel-runner's tasks, fixup actual top level build
lazd Jul 17, 2019
c3e8f07
Build docs for deps when they change
lazd Jul 17, 2019
d7e2e7e
Fix buildPackages task completion, make top-level build run a build o…
lazd Jul 17, 2019
0ac0d85
Remove unused dependencies, run bootstrap after install
lazd Jul 17, 2019
4fec237
Remove incorrect scripts
lazd Jul 17, 2019
0ae9b58
Remove bootstrap, should happen automatically
lazd Jul 17, 2019
fc09c27
Perform a lite build before dev task starts
lazd Jul 17, 2019
9213c02
Don't kill dist folders or try to build unless we're at the top level
lazd Jul 17, 2019
a8141a6
Re-use the buildLite task in watch
lazd Jul 17, 2019
2591a53
Update README for individual versioning, add legacy README with legac…
lazd Jul 17, 2019
af309d8
Fix release instructions
lazd Jul 18, 2019
44b58e5
Add documentation for site updating and architecture
lazd Jul 18, 2019
774ae66
Add docs for documentation generation, link to docs, fix references t…
lazd Jul 18, 2019
2a28101
Fix dependencies for SplitButton and Pagination
lazd Jul 18, 2019
9b148b6
Add instructions for adding/editing components
lazd Jul 18, 2019
f50e970
Be consistent, period
lazd Jul 18, 2019
d454ada
Delete obsolete site folder
lazd Jul 18, 2019
03eda15
Fix heading levels
lazd Jul 18, 2019
2fb9b78
Add links to stuff
lazd Jul 18, 2019
914ea56
Fix heading links, make slug shorter since all examples aren't on the…
lazd Jul 22, 2019
2e9856b
Support using links as menu items, depend on Popover
lazd Jul 22, 2019
2e620f6
Basic accessible search with build-time index generation
lazd Jul 22, 2019
e36c1ad
Fix exec command
lazd Jul 22, 2019
1dc8ad6
Fix release task
lazd Jul 22, 2019
6316618
v2.14.0-alpha.7
lazd Jul 22, 2019
a9cbfc6
Fix full build
lazd Jul 22, 2019
2f25893
v2.14.0-alpha.8
lazd Jul 22, 2019
61781a3
Accessibility and Safari fixes for search
lazd Jul 22, 2019
3c05eb1
Remove duplicate button docs
lazd Jul 22, 2019
7abf5e8
Give more rank to name so Button - CTA comes before SplitButton - CTA
lazd Jul 22, 2019
5f7a015
Fix scrolling when using arrow keys within list of results
lazd Jul 22, 2019
b776b67
Add .is-highlighted so we can indicate highlight without mis-using .i…
lazd Jul 23, 2019
9a5cb3d
Better interactivity for arrow keys in search
lazd Jul 23, 2019
7d0262b
Responsive site, fix switcher, accessibility fixes
lazd Jul 24, 2019
b20c1cc
Fix navigation to hashes within the page
lazd Jul 24, 2019
0b9141c
Pretty examples, fix DNA status
lazd Jul 24, 2019
986558e
Fix incorrect height for small BarLoader
lazd Jul 24, 2019
c1f425a
Fix search for whole words
lazd Jul 24, 2019
667a483
Combine examples into single files
lazd Jul 24, 2019
a88691d
Add devDependencies to graph calculation
lazd Jul 24, 2019
fc4b69f
Remove useless ---, deprecated docs property, change Default -> Standard
lazd Jul 24, 2019
b27a73c
Add missing Asset docs
lazd Jul 24, 2019
05a99de
Add buildLite task, make search nicer
lazd Jul 25, 2019
186976d
Switch everything to peerDependencies and devDependencies
lazd Jul 25, 2019
7f9a4ae
Dispatch SitePageLoaded event so enhancement can be done when new con…
lazd Jul 25, 2019
eca0188
Fix duplicate includes
lazd Jul 25, 2019
47ed9af
Add ID = filename if none present in yml
lazd Jul 25, 2019
d0f1cf3
Support Status: Unverified
lazd Jul 25, 2019
8e8d314
Quick audit of DNA status for all components
lazd Jul 25, 2019
5e392db
Sentence casing
lazd Jul 25, 2019
2e44a9a
Handle errors when fastloading
lazd Jul 25, 2019
081e7c0
Add nvmrc
lazd Jul 25, 2019
017ac63
Fix DNA status of Breadcrumbs, don't assume Canon if verified in Spec…
lazd Jul 25, 2019
8aafc17
Fix DNA status
lazd Jul 25, 2019
d1b7b64
Add tokens for easing
lazd Jul 25, 2019
bf22ed8
Make the Sidebar and Overlay animation beautiful
lazd Jul 25, 2019
1ca208f
Fix dialog underlay not showing above markup link
lazd Jul 25, 2019
e5044fa
Fix DNA status for many components now that we rely on DNA when we sa…
lazd Jul 25, 2019
4cb21a8
v2.14.0-alpha.9
lazd Jul 25, 2019
80b9657
SDS-1843 Fix MQL listener on iOS
lazd Jul 26, 2019
41ade62
Bump Lighthouse Accessibility, Best Practices, and SEO scores a bit
lazd Jul 26, 2019
bcfe99b
SDS-1805 Bake vars into build output
lazd Jul 26, 2019
1a729ba
Remove crufty comments
lazd Jul 26, 2019
a53cded
Rename packages/ -> components/, tools/, bundles/
lazd Jul 26, 2019
0cd388d
Fix error handling when server is down
lazd Jul 26, 2019
186c0a0
Make site look much nicer on tiny devices
lazd Jul 27, 2019
c3b182c
Make homepage look nicer on small screens
lazd Jul 29, 2019
38074d0
SDS-1840 Fix gulp dev for docs
lazd Jul 29, 2019
fcc619d
SDS-1839 Consolidate docs source files between bundle-builder and com…
lazd Jul 30, 2019
07fdf4b
A start on removing commons
lazd Jul 30, 2019
c3fdd0b
Determine classNames for baked vars
lazd Jul 31, 2019
57faebe
Fix parsing of var statements
lazd Jul 31, 2019
8040c1c
Warn if globals are used directly in components
lazd Jul 31, 2019
1df1614
Add missing Form docs
lazd Aug 1, 2019
2c185d3
Fix injection of files when watching within packages
lazd Aug 1, 2019
adae185
Update Textarea line-height and min-height, closes #231
lazd Aug 1, 2019
0fc6c3b
Fix spinner buttons appearing on Steppers in Firefox, closes #214
lazd Aug 1, 2019
1155858
Fix missing dependencies
lazd Aug 1, 2019
4efe0a8
Exclude bundles from Lerna management
lazd Aug 1, 2019
f2ffcc6
Publish
lazd Aug 2, 2019
5ca55de
Add bundles back to lerna
lazd Aug 2, 2019
1500b1d
Stash and pop changes before switching branches
lazd Aug 2, 2019
51fe6bc
Fix release version
lazd Aug 3, 2019
cbc4841
Remove dependency on bundle-builder
lazd Aug 3, 2019
207acc2
Fix stash poppin'
lazd Aug 3, 2019
ab1d286
Make site content part of the repo, but not a package (otherwise Lern…
lazd Aug 2, 2019
fd3d8c6
Be quiet when stashing
lazd Aug 3, 2019
3a8a762
Make 3.x bundle its own lerna-managed package
lazd Aug 3, 2019
291a888
Test on the latest stable node
lazd Aug 3, 2019
022ccec
Remove unused dependencies, cruft from package.json, add package-locks
lazd Aug 3, 2019
ca9d576
Get components from top-level now that they're shared between two pac…
lazd Aug 3, 2019
3d2d7e8
Start on require.resolve
lazd Aug 4, 2019
e1dc51d
Make everything work with require.resolve
lazd Aug 4, 2019
e4375c8
Fix package linking
lazd Aug 5, 2019
35dcbde
Fix package resolution for toplevel builds
lazd Aug 5, 2019
e504a60
Don't throw exit codes around to determine if we need to stash
lazd Aug 5, 2019
f75bf84
Don't pipe output around at all, does this appease npm?
lazd Aug 5, 2019
ad273b8
Fix scrolling
lazd Aug 5, 2019
5a6fb11
Fix execution of git tasks
lazd Aug 5, 2019
aed2153
Add back missing Lerna dependency
lazd Aug 5, 2019
aa681e5
Run github pages publish serially once everything is done
lazd Aug 5, 2019
f3c974b
Publish
lazd Aug 6, 2019
e869128
Update peerDependency versions after everything has been versioned
lazd Aug 6, 2019
7c8f7da
Add note about manually releasing new components
lazd Aug 6, 2019
2e6ab29
Break at 768px per Spectrum scale guidelines
lazd Aug 6, 2019
421f138
Add missing QuickActions dependency
lazd Aug 6, 2019
fee84a0
Fix scrolling for individual component docs
lazd Aug 6, 2019
ba35c0a
More robust error handling for async tasks
lazd Aug 6, 2019
79987f1
Fix missing dependencies
lazd Aug 6, 2019
38689a8
Fail if dependencies are missing; adding them automatically will nece…
lazd Aug 6, 2019
f1d93fb
Update package-lock
lazd Aug 6, 2019
c688e77
Publish
lazd Aug 6, 2019
2ada9c0
Add missing Checkbox dependency to Quickactions
lazd Aug 8, 2019
b3d25e6
Add DNA update script, update to DNA 5.18.1
lazd Aug 8, 2019
385768d
Add A4U update script, update icons to 4.1.0
lazd Aug 8, 2019
6b37e6a
Make Slider grab handle look right
lazd Aug 8, 2019
85c63c5
Fix incorrect classname
lazd Aug 8, 2019
5115d4b
Build site resources first
lazd Aug 8, 2019
31dddbc
Export a tree-shakable DNA variable object from @spectrum-css/vars
lazd Aug 8, 2019
c762989
Vars should just export the generated index instead of using index.js
lazd Aug 8, 2019
ffafea0
Publish
lazd Aug 8, 2019
3143a76
Fix search field on iOS, closes #229
lazd Aug 9, 2019
0017fe2
Publish
lazd Aug 9, 2019
bed2efe
Fix Menu chevron vertical alignment, fixes #240
lazd Aug 11, 2019
40186dc
Fix horizontal alignment of labels in anchor buttons, fixes #239
lazd Aug 11, 2019
0fa4bf0
Remove button outline when focused in Firefox, fixes #161
lazd Aug 11, 2019
cd36042
Fix sidebar hide/show due to media query width mismatch
lazd Aug 11, 2019
cc3aa08
Fix bar loader label in IE 11, fixes #242
lazd Aug 12, 2019
9618a13
Fix multistop classnames
lazd Aug 12, 2019
d171012
Fix Radio label margins when labels are below, fixes #246
lazd Aug 12, 2019
fd5266e
Publish
lazd Aug 12, 2019
b5879eb
Fix Checkbox icon color when checkbox imported before icons, fixes #2…
jianliao Aug 13, 2019
9a63ee2
Fix injection/reload of /site/resources/** when changed
lazd Aug 13, 2019
69a3788
Fix keyboard navigation weirdness for Search
lazd Aug 13, 2019
de9ec6b
SDS-1970 Add docs to show how to update DNA and icons
lazd Aug 14, 2019
894ba26
SDS-1970 Add docs to show how to update DNA and icons
lazd Aug 14, 2019
b654fd7
Fix scrolling in Safari (again?)
lazd Aug 15, 2019
cb2646b
Merge remote-tracking branch 'origin' into lerna
Aug 19, 2019
d330522
Font fallbacks (#248)
lazd Aug 22, 2019
7a99f8e
Removed float from tags, fixes #218 (#237)
GarthDB Aug 22, 2019
46de1cb
Merge branch 'master' into lerna
lazd Aug 22, 2019
113423b
Fix package-lock which was grossly mangled by many unspeakable horrors
lazd Aug 22, 2019
6e86ff3
Copy vars from the right place
lazd Aug 22, 2019
5a113cc
Build/copy vars correctly for backwards compat
lazd Aug 23, 2019
c0b763e
Disable var baking for this release
lazd Aug 23, 2019
bc0f2d4
SDS-1972 Document issues with npm ci and installing optional dependen…
lazd Aug 23, 2019
2fee0ef
Merge remote-tracking branch 'origin/lerna' into lerna
Aug 23, 2019
42f6bbf
trivial: fix references to vars output
lazd Aug 26, 2019
1bc85fd
Merge remote-tracking branch 'origin/lerna' into lerna
Aug 27, 2019
b2a2412
Clean up and organize documentation a little better, fix version numb…
lazd Aug 27, 2019
36985b5
Rename @spectrum-css/icons -> @spectrum-css/icon
lazd Aug 27, 2019
6742383
Update package-lock
lazd Aug 27, 2019
ff3265a
Merge remote-tracking branch 'origin/lerna' into lerna
Aug 27, 2019
bcb3315
Fix spelling error and bad links, oops
lazd Aug 27, 2019
a1f1519
Add missing Apache headers for a few things
lazd Aug 27, 2019
53b69d8
IE 11 support for docs site (no Search or Fast Load)
lazd Aug 26, 2019
c42a109
Fix site error messages
lazd Aug 28, 2019
5aad6d9
Merge remote-tracking branch 'origin/lerna' into lerna
Aug 28, 2019
837965a
Added diff script that installs an old version of Spectrum CSS and co…
lazd Aug 29, 2019
74e7d4d
Roll back change from fix for #231, was causing text vertical text al…
lazd Aug 29, 2019
179f40f
Fix issue with nested .spectrum under colorstop (thanks @jianliao)
lazd Aug 29, 2019
d627b6d
Add site component to the bundles so the docs site generates
lazd Aug 29, 2019
f5adab6
Ignore diff script when releasing
lazd Aug 29, 2019
56ef896
Copy UI icon sprite sheets into icons folder for backwards compat
lazd Aug 29, 2019
02187c3
Publish
lazd Aug 29, 2019
2a0d10f
Merge remote-tracking branch 'origin/lerna' into lerna
Aug 30, 2019
9d4d059
Use open source workflow icons, fixes #60 (#266)
jianliao Sep 4, 2019
d0969f3
Merge remote-tracking branch 'origin/lerna' into lerna
Sep 4, 2019
c3bdee3
fix: Correct order of Icon classes: UI icon classes should override w…
lazd Sep 5, 2019
f6e2afd
Publish
lazd Sep 6, 2019
09e2625
Merge branch 'lerna' of https://github.com/adobe/spectrum-css into lerna
Sep 7, 2019
de7739c
chore: remove all the package-lock.json files of lerna managed package
Sep 7, 2019
2db7e3f
Merge pull request #273 from adobe/remove_package_lock
jianliao Sep 9, 2019
d958491
fix: SDS-2298 add correct placeholder opacity for textfields, closes …
bernhard-adobe Sep 16, 2019
d889604
docs: change all unpkg to node_modules, add note about <html> + scale…
lazd Sep 18, 2019
0ee67d5
build: rename docs to metadata, use arrays for examples (#276)
GarthDB Sep 19, 2019
08fc5a5
chore: move to conventional commits
lazd Sep 9, 2019
bec4195
chore: don't use lerna for bundles
lazd Sep 11, 2019
505cb3b
chore: use yarn for linking
lazd Sep 11, 2019
1863d6b
chore: generate a single commit per update
lazd Sep 12, 2019
3416a5b
chore: graduate bundles if all dependencies have graduated
lazd Sep 12, 2019
3811ea7
chore: correctly note breaking changes in commit body
lazd Sep 12, 2019
76b7754
chore: add release tasks for bundles
lazd Sep 12, 2019
3be79da
chore: write changelogs when releasing bundles
lazd Sep 13, 2019
518a65d
chore: conventional changelog for bundles
lazd Sep 14, 2019
f60d159
build: linked bundle changelogs
lazd Sep 15, 2019
60e6bba
chore: start version number at 1.0.0, be private for now
lazd Sep 15, 2019
24f7119
chore: add license and homepage fields
lazd Sep 16, 2019
a7df760
chore: add nice logging, fix homepage URL
lazd Sep 16, 2019
a422e1a
chore: cleanup, fix yarn.lock
lazd Sep 16, 2019
47b7a98
chore: try to fix Travis by ignoring optional deps
lazd Sep 16, 2019
23bedaf
ci: yarn optional-dependency issue (#281)
jianliao Sep 16, 2019
d1129d0
build: add release-bundles npm task, release gulp task for bundles
lazd Sep 16, 2019
c9a99eb
chore: put component names in list of bundle changes
lazd Sep 16, 2019
496bbe9
chore: make sure to push after releasing a bundle
lazd Sep 16, 2019
c960a88
build: add gulp releaseBundles task to perform bundle release
lazd Sep 17, 2019
4835f12
docs: update contribution docs to ref conventional commits
lazd Sep 17, 2019
dbdf165
docs: use title case for changelog sections, nicer emojis
lazd Sep 17, 2019
be18285
build: move icons to a top-level dependency so builds work again
lazd Sep 17, 2019
53f9666
build: fix site preview due to missing dirs.cwd, path
lazd Sep 17, 2019
47bab3e
chore: remove lerna packages declaration (workspaces handles this)
lazd Sep 17, 2019
9829c62
docs: update docs for new release process
lazd Sep 18, 2019
8a4e35d
build: bundle release scripts and peerDependencies
lazd Sep 18, 2019
bc5c0b7
docs: place the anchor above the heading, use name not id
lazd Sep 18, 2019
dbf1d2c
docs: fix global install instructions
lazd Sep 18, 2019
c04fbae
docs: document how peerDependencies and devDependencies are used
lazd Sep 18, 2019
8e3247a
docs: implement feedback from content strategy
lazd Sep 19, 2019
a26ec48
chore: fix merge
lazd Sep 19, 2019
8163b0b
Merge pull request #279 from adobe/ccc
jianliao Sep 19, 2019
1ab59d0
testing: BackstopJS visual regression testing (#271)
jianliao Sep 19, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ git push -u origin my-awesome-new-feature
git remote add upstream git@github.com:adobe/spectrum-css.git
```

Install dependencies:
Install dependencies (`npm ci` won't work unless you're inside the Adobe network):

```
npm install
Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/dist
/node_modules
/temp
dist
node_modules
temp
.npmrc*
.tmp
npm-debug.log*
Expand All @@ -9,4 +9,5 @@ npm-debug.log*
/backstop_data/bitmaps_test/
/backstop_data/build_data/
/backstop_data/html_report/
/.idea
.idea
lerna-debug.log
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
/gulpfile.js
npm-debug.log
/.github
/dist/docs/
/components
/tools
/bundles
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12.*
6 changes: 0 additions & 6 deletions .topdocrc

This file was deleted.

6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
language: node_js
node_js:
- "lts/*"
- "node"
install:
- npm install
before_script:
- npm install -g gulp-cli
script:
# This script should be the first that runs to reduce the risk of
# executing a script from a compromised NPM package.
- audit-ci --moderate
- gulp travis-build
- gulp build
126 changes: 126 additions & 0 deletions README-legacy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Spectrum CSS legacy usage

In order to enable graceful change to individual components, and to let you consume only the changes you want to consume on the timeline you want to consume it, Spectrum CSS has moved to individually versioned components. In addition, we've moved to a CSS custom properties approach as our default usage method.

Though these were necessary moves, we didn't want to leave existing users stranded while making them. As such, we still support the following legacy usage and distribution methods detailed below.

## Bundle packages

Bundle packages with all of the Spectrum CSS components are available for existing consumers that aren't yet ready to move to individually versioned components. All of the same files included in the individually versioned releases are present, albeit within `dist/components/`.

**Avoid the bundle packages if you're starting fresh with Spectrum CSS, and instead [install only the components you need](README.md#using-spectrum-css).**

### Backwards-compatible bundle

This package WILL NOT get updates to components that have had breaking changes, so it should be used only as a stand-in until your team has time to move to individually versioned components.

To install the backwards-compatible bundle:

```
npm install @adobe/spectrum-css
```

### Latest bundle

To install the bundle with the latest components:

```
npm install @spectrum-css/spectrum-css
```

## Legacy usage

The following are legacy methods for using Spectrum CSS. The [CSS custom properties method](README.md#using-spectrum-css) is preferred.

Spectrum CSS also builds 'multi-stop' and 'single-stop' versions of the CSS for older browsers (IE 11). This enables a consumer to either allow for multiple Spectrum colorstops in a single CSS file, or can limit the number of selectors to only those needed for a single colorstop.

**Do not use these methods if you are starting fresh with Spectrum CSS and do not need to support IE 11.**

### Multi-stop Strategy

The first method of applying colorstops, *multistop*, makes it possible to have any number of colorstops on the same page. This method results in slightly larger CSS files with more selectors, but is the method most products will use as dark and light colorstops are commonly mixed in Spectrum designs.

1. To get all Spectrum components, include `dist/spectrum-core.css` then `dist/spectrum-COLORSTOP.css` for each colorstop you need (where `COLORSTOP` is light, dark, etc).

2. To get only the CSS for components and colorstops you need, include the following to start:

* `node_modules/@spectrum-css/page/dist/index.css`
* `node_modules/@spectrum-css/page/dist/multiStops/COLORSTOP.css` for each colorstop
* `node_modules/@spectrum-css/typography/dist/index.css`
* `node_modules/@spectrum-css/typography/dist/multiStops/COLORSTOP.css` for each colorstop

Then, for each component you need:

* `node_modules/@spectrum-css/COMPONENT/dist/index.css` for each component
* `node_modules/@spectrum-css/COMPONENT/dist/multiStops/COLORSTOP.css` for each colorstop

Set `<body class="spectrum spectrum--light">` to skin the page with light colors, and add `<div class="spectrum--dark">` wherever you need dark styles, or any combination of the above.

Note that, due to CSS selector specificity, whatever colorstop you import last will win if you nest colorstops 3 levels deep. That is, if you first import the `light` colorstop, the the `dark` colorstop, and you have the following HTML, the 3rd button ends up dark.

```html
<body class="spectrum spectrum--light">
<button class="spectrum-Button">I'm light!</button>

<div class="spectrum--dark">
<button class="spectrum-Button">I'm dark!</button>

<div class="spectrum--light">
<button class="spectrum-Button">I'm still dark!</button>
</div>
</div>
</body>
```

### Single-stop Strategy

The second method of applying colorstops, *singlestops*, makes it so it's only possible to have a single colorstop on the page at once. This method results in less selectors and smaller CSS files.

1. To get all Spectrum components for a specific colorstop, include only `dist/standalone/spectrum-COLORSTOP.css`.

2. To get only the CSS for components you need and a single colorstop, include the following to start:

* `node_modules/@spectrum-css/page/dist/index.css`
* `node_modules/@spectrum-css/page/dist/colorStops/COLORSTOP.css` for the single colorstop
* `node_modules/@spectrum-css/typography/dist/index.css`
* `node_modules/@spectrum-css/typography/dist/colorStops/COLORSTOP.css` for the single colorstop

Then, for each component you need:

* `node_modules/@spectrum-css/COMPONENT/dist/index.css` for each component
* `node_modules/@spectrum-css/COMPONENT/dist/colorStops/COLORSTOP.css` for the single colorstop

As there is CSS for only one color stop present, simply set `<body class="spectrum">`. If mixing with individual components using the *multistop* strategy, you can add `class="spectrum--dark"` on `<body>` or anywhere else, but it only affects components whose colorstops were imported using the individual component multistop strategy.

### Import Order and Components

With Spectrum CSS, dependency management between components is the responsibility of the consumer, you. The framework you're building likely has dependencies itself, such as `dropdown` depends on `button`, and each of the components includes its CSS. If this is the case, you'll get the CSS in the right order automatically, since `dropdown` is going to depend on `button`, and `button` will import the necessary CSS.

However, if you're doing a more manual inclusion of CSS files, the easiest thing to do is to use the fully built `dist/spectrum-core.css` + `dist/spectrum-light.css` or `dist/standalone/spectrum-light.css` files described above. If you need only specific components, be sure to follow the order in `src/components.css` so components can override styles of their dependencies.

### Import Order and Colorstops

If your pages are light by default, with some dark elements embedded within (shell, etc), you should import the light colorstop first, adding `.spectrum--light` to an outer container (affecting the whole page), and adding `.spectrum--dark` to an inner container when you need dark elements (affecting only elements inside of it). That is, the import order of colorstops should match the nesting on your page.

### Scale support

Spectrum CSS supports two scale sizes:

* Medium - Desktop
* Large - Mobile

#### Medium only

By default, when you import `index.css` for each component or `spectrum-core.css`, you'll get the Medium scale.

#### Large only

If your site is always mobile, you can get large by default by importing `index-lg.css` for individual components, or `spectrum-core-lg.css` for all components.

#### Medium and Large

If you need to display both Medium and Large, you can import `index.css` and `index-diff.css` for individual components, or `spectrum-core.css` and `spectrum-core-diff.css` for all components.

You can then switch scales by adding the `.spectrum--large` or `.spectrum--medium` class on the `<html>` element.

Note that the Spectrum CSS UI icons must change as well, see below for a full example.
Loading