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

Update cribsheet docs #220

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion app/docs/md/enhance-styles/cribsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,35 @@
title: Cribsheet
---

Every Enhance app ships with a preconfigured, dynamic cribsheet to help you find the right Enhance Styles class for the job.
Most Enhance apps ship with a preconfigured, dynamic cribsheet to help you find the right Enhance Styles class for the job.

Just start your project (`npm start`) and navigate to `/_styleguide/cribsheet`. Here you'll be able to search through all the utility classes and custom properties available to your app. Any [customizations](/docs/enhance-styles/customization) you make to your styleguide will automatically be reflected in your cribsheet.

If you are [migrating from an Architect project](https://enhance.dev/cookbook/migrate-from-architect) to an Enhance project or you are starting with our [minimal template](https://github.com/enhance-dev/enhance-starter-project-minimal) then you will need to add the cribsheet to your project.

## Install Dependencies

First install the `@enhance/styles-cribsheet` package

```bash
npm install @enhance/styles-cribsheet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's also required that users install Enhance Styles as well, as it won't be included in the minimal template or an Arc migration (necessarily)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 of course. Which leads me to the question, do we even need this update?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm… I guess maybe not? 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make more sense to add to migration docs. Closing!

```

## Update Your `.arc` File

Next update your `.arc` file to load the cribsheet plugin.

<doc-code filename=".arc">

```diff
@app
your-app

@plugins
enhance/arc-plugin-enhance
+ enhance/styles-cribsheet
```

</doc-code>

Now, when you start your project (npm start) the `/_styleguide/cribsheet` route will be available.
10 changes: 5 additions & 5 deletions public/css/docs-highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
--hl-namespace: var(--dk-pink);

--hl-highlight-line: #202641;
--hl-deletion: #461e1f;
--hl-addition: #14301d;
--hl-deletion: #ec5f67;
--hl-addition: #99c794;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where'd these come from? 🧑🏻‍🎨

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From begin.com hljs diff colors. If you look at a diff in the docs you will not be able to read it.

}

/* Dark Theme: System */
Expand All @@ -72,9 +72,9 @@
--hl-namespace: var(--dk-pink);

--hl-highlight-line: #202641;
--hl-deletion: #461e1f;
--hl-addition: #14301d;
}
--hl-deletion: #ec5f67;
--hl-addition: #99c794;
}
}

.hljs-subst {
Expand Down
Loading