You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an effort to create a single source of truth
for our documentation and make it easier for
users to get started working with Spectrum CSS, this work:
- Includes a Quick start guide in the readme, inspired
by the tutorial that used to live in the docs site
- Removes said tutorial from the docs site and links
to the quick start guide in the readme instead
- Removes contributing guidelines from the readme, which
are replaced with a link to the contributing doc in github
- Storybook contributing docs link to the more general
contributing docs in github
- General updates to readme language
To ensure your Node environment is always aligned with the project, we strongly recommend using [nvm](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating). Once you have nvm installed, you can run:
51
+
52
+
```shell
53
+
nvm use
54
+
```
55
+
56
+
This will ensure the correct version of node is installed and used for the project. You always want to run nvm use when you first clone the project and whenever you switch branches.
**Important:** Requires >= Node 18.8.1 and Yarn 1.22.0.
71
+
62
72
To generate a new component, run the generator:
63
73
64
74
```shell
@@ -71,13 +81,9 @@ To kick-off the project's storybook locally, run:
71
81
yarn start
72
82
```
73
83
74
-
This is our development environment, where you can see all the components in action, and develop new components. All components must have a storybook entry.
75
-
76
-
Working on the documentation site? Run:
84
+
This is our development environment, where you can see all the components in action, and develop new components. All components must have a storybook entry. Edits to any of the `*.css`, `*.stories.js`, or `template.js` files in `components/*` will live reload in your browser. For more details about how to work within our Storybook setup, take a look at our [getting started Storybook guide](https://opensource.adobe.com/spectrum-css/preview/?path=/docs/guides-contributing--docs).
77
85
78
-
```shell
79
-
yarn dev
80
-
```
86
+
This project is leveraging caching from [Nx](https://nx.dev/) to speed up the build process. If you are seeing unexpected results, you can clear the cache by running `yarn nx reset`.
81
87
82
88
Commit all changes with a [conventional commit message](https://www.conventionalcommits.org), making sure to correctly use `feat:`, `fix:`, and `BREAKING CHANGE` accordingly, and referencing the relevant issue number (if any):
83
89
@@ -110,7 +116,7 @@ At this point you're waiting on us. We do our best to keep on top of all the pul
110
116
111
117
Some things that will increase the chance that your pull request is accepted:
112
118
113
-
- Write a thorough pull request description, include screenshots, and test your changes across all evergreen browsers.
119
+
- Write a thorough pull request description, include screenshots, and test your changes across all [evergreen browsers](https://github.com/adobe/spectrum-css?tab=readme-ov-file#browser-support).
114
120
- Write out your test cases for any new features or bug fixes in as much detail as possible and include them in the pull request description.
115
121
- Make sure the PR merges cleanly with the latest main.
116
122
- Describe your feature/bugfix and why it's needed/important in the pull request description.
Spectrum CSS components utilize custom properties in order to change themes and scales. For these to apply, a couple of classes need to be added to the document’s `<html>` tag based on the [visual language](https://github.com/adobe/spectrum-css?tab=readme-ov-file#visual-language), [scale](https://github.com/adobe/spectrum-css?tab=readme-ov-file#scales), and [theme](https://github.com/adobe/spectrum-css?tab=readme-ov-file#themes-colorstops) you wish to use. For example, the following code snippet will display styling for the default Spectrum visual language using medium scale and light color theme:
Use the `index.css` files in your project to include component and global styles ([Spectrum and Express contexts](https://github.com/adobe/spectrum-css?tab=readme-ov-file#visual-language), [background theme/colorstop](https://github.com/adobe/spectrum-css?tab=readme-ov-file#themes-colorstops), [platform scaling](https://github.com/adobe/spectrum-css?tab=readme-ov-file#scales), etc.) for the component. If you don't need all of the global styles, peek at the docs for [including assets](https://github.com/adobe/spectrum-css?tab=readme-ov-file#including-assets)). Use this file by including the stylesheet (plus stylesheets for dependencies) in the `<head>` tag:
Inside the `<body>` tag, add the markup for your component (Spectrum button in our example). The example also includes the CSS class names `spectrum-Button--fill` and `spectrum-Button--accent`, to use the accent variant:
Another way to include Spectrum CSS components in your project is to use a CDN to link to the components you want, plus their dependencies, in the `<head>` tag of your HTML. If you choose to use a CDN, please note that Spectrum CSS doesn't manage a CDN, cannot confirm the availability or up-time of external CDNs, and doesn't recommend using a CDN for Spectrum CSS in a production environment.
Copy file name to clipboardExpand all lines: .storybook/guides/develop.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,14 +12,16 @@ Welcome to the development and exploration environment for Spectrum CSS, driven
12
12
13
13
## Table of contents
14
14
15
-
This guide is intended to help you get started contributing to the Spectrum CSS project. It will cover the following topics:
15
+
This guide is intended to get you up to speed on how we work within Storybook in the Spectrum CSS project. It will cover the following topics:
16
16
17
17
-[Architecture](#architecture)
18
18
-[Writing stories](#writing-stories)
19
19
-[Templates](#templates)
20
20
-[Testing stories](#testing-stories)
21
21
-[Changelog](#changelog)
22
22
23
+
For more general information about how to contribute to the Spectrum CSS project, take a look at our [contribution guidelines on GitHub](https://github.com/adobe/spectrum-css/blob/main/.github/CONTRIBUTING.md).
0 commit comments