Skip to content

Commit

Permalink
Rename css.md to styling.md and add info on integrations with CSS fra…
Browse files Browse the repository at this point in the history
…meworks (#550)

Rename css.md to styling.md and add some more info on integrations with Sycamore
  • Loading branch information
lukechu10 authored Jan 4, 2023
1 parent d70a98c commit 14d5897
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
9 changes: 0 additions & 9 deletions docs/next/advanced/css.md

This file was deleted.

26 changes: 26 additions & 0 deletions docs/next/advanced/styling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Styling

Styling is definitely important for a modern web app. Sycamore is not opinionated when it comes to
styling and lets you use whichever method works best for you. Below are some common options.

TODO: Provide more details on current state of CSS in Sycamore.

## Raw CSS files

The simplest is just to use raw CSS files. This is very simple when using Trunk. For more
information, refer to [the Trunk docs](https://trunkrs.dev/assets/#css). Be sure to include the
`data-trunk` attribute in your <link> tag, otherwise Trunk will not serve it.

## CSS framework

Using a CSS framework is also definitely possible with Sycamore. Simply serve the framework's CSS
code using Trunk and you should be able to use the CSS classes like normal from your Sycamore code.

### Tailwind CSS

One particular kind of CSS frameworks worthy of note are utility-first CSS frameworks (such as
[Tailwind CSS](https://tailwindcss.com/) or [Windi CSS](https://windicss.org/)).

## Examples

- **Sycamore + Trunk + Tailwind CSS**: https://github.com/yerlaser/sycamore_tailwindcss_template
4 changes: 2 additions & 2 deletions docs/next/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
"href": "advanced/advanced_reactivity"
},
{
"name": "CSS",
"href": "advanced/css"
"name": "Styling",
"href": "advanced/styling"
},
{
"name": "Testing",
Expand Down

0 comments on commit 14d5897

Please sign in to comment.