More specific namespacing for CSS classes?
See original GitHub issueRight now our widget CSS classes are namespaced as .widget-*
. .widget
is pretty generic. For example, #2893 showed at least one conflict with another library.
Perhaps we should change the namespace to something like .jw-*
, which seems more specific to ‘jupyter widgets’ and less generic than .widget
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (7 by maintainers)
Top Results From Across the Web
CSS Namespacing for reusable code | by Richard Oliver Bray
Ever since I came across this namespacing by by Harry Roberts I've been unable to name a class without adding a namespace. It...
Read more >namespace - CSS: Cascading Style Sheets - MDN Web Docs
The defined namespaces can be used to restrict the universal, type, and attribute selectors to only select elements within that namespace.
Read more >Writing modular CSS (Part 2) — Namespaces | Zell Liew
Here's an example. Let's say I switched the code above to one with namespaces. The HTML will be completely the same (less a...
Read more >How to namespace your CSS?
There are no namespaces in CSS. All you do in CSS ends up in global scope. This is by design. This leads to...
Read more >CSS Practice: Namespaces in Complex Projects
They mean more safety when it comes to. new page elements,; foreign code injections, and; new team members; · they preserve ID and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@maartenbreddels, I don’t think following BEM now is a good idea because nothing else in
ipywidgets
does. But seems like a very good name convention. Maybe for a next version @jasongrout ?I’m ok with that, but I thought it was good to put it on our radar.