juxtopposed / realtimecolors

Real-time UI Colorpicking Tool. See your favorite colors of choice for a website in real time.
https://realtimecolors.com
Other
798 stars 31 forks source link

[Bug]: Trailing comma in Tailwind Themes export #107

Open marcellocurto opened 4 months ago

marcellocurto commented 4 months ago

Is there an existing issue for this?

Describe the bug

Hi, I just discovered a tiny bug.

When you copy the CSS text for Tailwind CSS and have Themes selected, there is a trailing comma where it shouldn't be.

@layer base {
  :root {
    --text: #050315;
    --background: #fbfbfe;
    --primary: #2f27ce;
    --secondary: #dedcff;
    --accent: #433bff;
  }
  .dark {
    --text: #ebe9fc;
    --background: #010104;
    --primary: #3a31d8;
    --secondary: #020024;
    --accent: #0600c2;
  }
}, <----- RIGHT HERE

Should be:

```css
@layer base {
  :root {
    --text: #050315;
    --background: #fbfbfe;
    --primary: #2f27ce;
    --secondary: #dedcff;
    --accent: #433bff;
  }
  .dark {
    --text: #ebe9fc;
    --background: #010104;
    --primary: #3a31d8;
    --secondary: #020024;
    --accent: #0600c2;
  }
}

Also love your site! Well done and super useful.

Reproduction Steps

  1. Go to https://www.realtimecolors.com/
  2. Click on Export -> Tailwind CSS
  3. Select Themes
  4. See error

Expected behavior

For the copied text to just work when I copy it into my CSS file.

Screenshots

No response

Device Info

MacOS 13 - Safari 16.5.2

Additional context

No response