Skip to content
Open
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
17 changes: 17 additions & 0 deletions home/docs/css-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ For the CSS, you can include it with the standard Rails helper:

You can copy the CSS to your project and adapt it to your needs.

## With a JavaScript bundler

If you installed the npm package and bundle your CSS (Vite, esbuild, webpack, etc.), import the stylesheet from its subpath:

```css
@import "@37signals/lexxy/lexxy.css";
```

The following subpaths are exposed:

| Import | Contents |
|-------------------------------------------|-----------------------------------------------------|
| `@37signals/lexxy/lexxy.css` | Everything (editor + rendered content) |
| `@37signals/lexxy/lexxy-content.css` | Rendered Action Text content only |
| `@37signals/lexxy/lexxy-editor.css` | Editor chrome only |
| `@37signals/lexxy/lexxy-variables.css` | CSS variables only, for theming |
Comment on lines +28 to +33

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The table uses single leading pipes (| Import | Contents |), which is valid GitHub-Flavored Markdown and renders correctly in the Files view — there are no || sequences in the source. Leaving as-is.


## Custom styles and dark mode

All of Lexxy's color styles are defiend as CSS variables in `app/stylesheets/lexxy-variables.css`. This enables a straightforward way to customize Lexxy to match your application's theme. You can see an example implementation of a custom dark mode style in the Sandbox's stylesheet at `test/dummy/app/assets/stylesheets/sandbox.css`.
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
"type": "module",
"exports": {
".": "./dist/lexxy.esm.js",
"./helpers": "./dist/lexxy_helpers.esm.js"
"./helpers": "./dist/lexxy_helpers.esm.js",
"./lexxy.css": "./dist/stylesheets/lexxy.css",
"./lexxy-content.css": "./dist/stylesheets/lexxy-content.css",
"./lexxy-editor.css": "./dist/stylesheets/lexxy-editor.css",
"./lexxy-variables.css": "./dist/stylesheets/lexxy-variables.css"
},
"files": [
"dist"
Expand Down