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.

how to make classname has underline when using `@apply`?

See original GitHub issue

When i using in the class attribute,it works fine:

微信截图_20220830131835

using @apply:

2

someone help me?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hequ9commented, Aug 31, 2022

i seem to have found something wrong.

when transformerDirectives in my uno.config.ts, it will fail.

1

2

the way i solved it was to add transformerDirectives to vite.config.ts, now it’s ok.

3

im not sure if this is a bug from unocss extension?

0reactions
lrstanleycommented, Sep 10, 2022

Using both the latest extension as well as the latest version of unocss with vite, running into the same issue with vscode. @apply is broken, including hovering over utility classes inside of @apply. What’s odd is this works for me inside of a vue SFC file, but not in .css files. Tried both loading the config from vite, as well as a standalone file. Properly set unocss.root as well in vscode.

EDIT: tried each unocss vscode extension version from latest, all the way back to 0.45.12, and this is the newest version that fixes those classes being properly picked up in vscode, with proper underline, hover intellisense, color circles, etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML/CSS need help creating an underline between two ...
I would solve this with flexbox and adapt the class .line to the width of the remaining content. For more information I would...
Read more >
How to underline text in CSS - Javatpoint
The content is underlined using the text-decoration-line attribute. Overline, underline, and line-through are the three options for this attribute.
Read more >
Text - Bootstrap
Documentation and examples for common text utilities to control alignment, wrapping, weight, and more.
Read more >
Specificity - CSS: Cascading Style Sheets - MDN Web Docs
The only way to override inline styles is by using !important . Many JavaScript frameworks and libraries add inline styles. Using !important ...
Read more >
CSS Remove Underline from Link - With Examples [Updated]
To remove the underline from the link CSS hover, we have to use CSS ":hover" Selector. Where we will add the "text-decoration: none"...
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