question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Classes with parentheses doesn't work

See original GitHub issue

Hi!

Previously I used this in my tailwind.config

height: theme => ({
        '(custom)': `calc(100% - ${theme('spacing.18')})`,
})

And then used class like h-(custom). But after I moved to Windi noticed that this classes are not generated anymore.

My test windi.config

module.exports = {
  theme: {
    extend: {
      height: theme => ({
        '(hello)': '1000px'
      }),
    }
  }
}

PS: love what Windi did with Tailwind DX, thank you 😍

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
antfucommented, Mar 26, 2021

Before adding the parentheses to the regex rules, I am a bit curious about the reason to use them in the class name. My concern is that case would be confusing with the variant group hover:(text-bold border-none) feature. Would be great if you can share a bit more context on this, thanks.

1reaction
voorjaarcommented, Mar 26, 2021

The problem on my side has been solved. I just used your project to debug it. It should be a regex problem of vite-plugin. h-(hello) not been inputted to the processor.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python class definition syntax - Stack Overflow
The parentheses in class definitions are for defining from which class you inherit. You don't write def in front of it, and when...
Read more >
PYTHON: difference between defining a class with ... - Sololearn
So you can write either: class C(): Or: class C: Function/method definitions always take parentheses, even if you don't define parameters. If ...
Read more >
When to use parentheses or not with attributes, methods, and ...
Attributes will never have parenthesis since they cannot be executed. Classes have parenthesis because when initially called you're most likely ...
Read more >
what to put inside the brackets() when creating a class - Reddit
The parentheses accept other classes. This is called inheritance -- basically your new "MyClass" class will inherit all attributes and methods ( ...
Read more >
calling a method with parenthesis vs. no ... - Codecademy
... to add parenthesis but i've learned that it won't run if I dont do this. ... *Create a method called askTeller within...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found