Skip to content

Commit

Permalink
Update cribsheet docs
Browse files Browse the repository at this point in the history
Signed-off-by: macdonst <[email protected]>
  • Loading branch information
macdonst committed Jun 25, 2024
1 parent 2b1bba2 commit a728886
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
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
```

## 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;
}

/* 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

0 comments on commit a728886

Please sign in to comment.