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

Background color is not supported #12

Closed
Albibek opened this issue May 10, 2022 · 1 comment
Closed

Background color is not supported #12

Albibek opened this issue May 10, 2022 · 1 comment

Comments

@Albibek
Copy link

Albibek commented May 10, 2022

Hi.

I've found that the example from the documentation frontpage does not work if you add the unwraps to inline or trace calls.

use tailwind_css::TailwindBuilder;

fn build() {
    let mut tailwind = TailwindBuilder::default();
    // The compiler will expand directly into the final css property
    // Inline style will not be tracked
    let inline = tailwind.inline("py-2 px-4 bg-green-500").unwrap();  // <----------unwrap added
    // The compiler will expand into a `class`, and record the style class used
    tailwind.trace("py-2 px-4 bg-green-500", false).unwrap();   // <----------unwrap added
    // Compile all traced classes into bundle
    let bundle = tailwind.bundle();
}

The error is
SyntaxError("Unknown bg instructions: green-500")

It looks like TailwindBackgroundColor is not defined somewhere. I suspect this code, but not sure.

@oovm
Copy link
Owner

oovm commented May 13, 2022

Due to covid control measures, I can't get a programmable device right now.

I'll fix this when the controls are lifted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants