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.

[css] Show multiple elements suggestions

See original GitHub issue
input {
  &:hover, &:focus {
    &::placeholder {
      color: red;
    } 
  }
}

image

For example show it as:

<input :hover ::placeholder> or <input :focus ::placeholder>

or

<input :hover ::placeholder>
<input :focus ::placeholder>

Codepen: https://codepen.io/m0ksem/pen/qBjxxzo

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
aeschlicommented, Nov 8, 2022

Yes, let’s deal with the specificity issue in a different issue. Thanks @m0ksem for bringing this to attention.

0reactions
GauravB159commented, Nov 8, 2022

Hi @m0ksem, no worries! I’m new to open source, but really having fun contributing.

So for the specificity, I figured the values were wrong. But, there seems to be a bug in prod itself that causes the calculation to be wrong, if you check the screenshot. I’m not sure if I should address that bug in this issue, or create a separate issue for that.

Also, if you check my PR, I have added a case that has not been handled in my fix. Do you think that case should be handled, or the way it is currently coded is fine?

Edit: The issue seems to be in SCSS files only when nesting is used, CSS files work fine for specificity since there is no nesting. Can you try it out and let me know if you’re facing the same issue?

input { #id { p { color: red; } } } - Returns (0, 0, 1)

input #id p { color: red; } - Returns (1, 0, 2)

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML/CSS show/hide multiple elements? - Stack Overflow
I'm looking for an HTML/CSS solution to this challenge: I have multiple elements with the same class or same id, and I want...
Read more >
display - CSS: Cascading Style Sheets - MDN Web Docs
The display CSS property sets whether an element is treated as a block or inline element and the layout used for its children, ......
Read more >
CSS display property - W3Schools
Property Values ; list-item, Let the element behave like a <li> element, Demo ❯ ; run-in, Displays an element as either block or...
Read more >
Lesson 1: Understanding ID and Class in CSS
What if you want to stylize some div elements one way, and other div elements a different way? That's where id and class...
Read more >
10 VS Code emmet tips to make you more productive
Emmet is a plug-in-based infrastructure that can produce HTML/CSS code ... Use the + symbol to create multiple elements at the same level....
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