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.

Too strong selectors

See original GitHub issue

The following selector Is a notch too strong (0, 2, 1) and overrides normal class names:

https://github.com/twbs/bootstrap/blob/6dd3d91768227a7ac03a63f8e47eacae99be8892/scss/_reboot.scss#L208-L220

It could be

a[name]:not([href]):not([tabindex]): {
  color: inherit;
  text-decoration: none;


  @include hover-focus {
    color: inherit;
    text-decoration: none;
  }


  &:focus {
    outline: 0;
  }
}

Note: Updated snippet to better reflect the purpose of the styling i.e. named anchors. Original selector was a:not([href]):not([tabindex]):not([class])

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (13 by maintainers)

github_iconTop GitHub Comments

14reactions
imoarkcommented, Aug 1, 2019

Same issue as @bmaehr Can confirm that a:not([href]):not([tabindex]) is basically too strong, that it overrides a class selector. Any good workaround??

2reactions
willimaesecommented, Jun 11, 2019

I have the same issue as @bmaehr . “a:not([href]):not([tabindex]), a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover” selector is too strong and overrides our app styles.

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 powerful CSS selectors that will really help you write clean ...
6 powerful CSS selectors that will really help you write clean CSS. · 1. div > a. This selector will enable us to...
Read more >
Css selector for a > strong - Stack Overflow
I have a simple Css rule like so:
Read more >
Specificity - CSS: Cascading Style Sheets - MDN Web Docs
The specificity algorithm calculates the weight of a CSS selector to determine which rule from competing CSS declarations gets applied to an ...
Read more >
Advanced Selectors - LearnHowToProgram.com
Selector Stacking ; <a> and ; <strong> tags will be colored red. Stacking selectors helps keep stylesheets DRY by applying similar styles to...
Read more >
7 Tips to build better selector in Microsoft Power Automate ...
Building strong selectors in power automate desktop is important for having flows that work properly and that do not break.
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