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.

[Feature Request] Don't style elements via element name selectors

See original GitHub issue

Here’s the problem I’m running into: I added vuetify to my app because I wanted to start using it for new features. Suddenly, all of my h1 are 112px tall, and my buttons have competing margins and font sizes.

For the most part, vuetify’s styles are namespaced by class names (this is good!). However, this is not true for button, h1, h2, etc, as well as a few other lesser-used elements (subheading, for example). It’s really irritating to pull in a ui framework and have it break a bunch of unrelated styles in your application. I’d love to be able to pull in vuetify and just start using it for new features, instead of having to go back and audit my entire app for style breakages.

I’d be equally fine if the solution here was to build component styles for single components that could be pulled in individually via something like import 'vuetify/dist/vBtn.min.css' (this is assuming they’re all well-namespaced). This would also have the advantage of not having to import tons of theming classes if they aren’t needed.

I expect to have to re-style parts of my app to conform with a ui framework, but not being able to choose when and how I get to do that kind of sucks, especially for big applications where being able to upgrade things piecemeal is crucial.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
asifmcommented, Dec 7, 2017
5reactions
johnleidercommented, Oct 31, 2017

This has already been completed on https://github.com/vuetifyjs/vuetify/tree/enhancement/theme-part-2 and will be merging into dev here soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What CSS selectors are supported for feature tagging?
Pendo uses CSS Selectors as feature rules to identify specific elements ... you can choose Custom CSS when tagging a feature to target...
Read more >
CSS selectors: Ability to match against attribute name, not just ...
I would like to select both divs with the attributes starting with some , but there's no way to specify this. Assume that...
Read more >
Type, class, and ID selectors - Learn web development | MDN
A type selector is sometimes referred to as a tag name selector or element selector because it selects an HTML tag/element in your...
Read more >
How and when to use the CSS :has selector - LogRocket Blog
The CSS :has() selector allows us to style an element based on its descendants or any succeeding elements.
Read more >
Selectors Level 4 - W3C
Pseudo-elements do not exist independently in the tree: they are always bound to another element on the page, called their originating element ....
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