ericmandel / js9

astronomical image display everywhere
https://js9.si.edu
Other
121 stars 50 forks source link

Conflicting CSS #69

Closed timbeccue closed 4 years ago

timbeccue commented 4 years ago

Hi Eric,

My specific issue is that the js9 .control class style conflicts with another css library that I use. Changing js9.css to

.control {
    ...
    padding: 0px;  /* used to be 2px */
}

fixes the problem for me. But I had trouble finding the js9 components that use the .control class. Will this cause any issues?

In general, it looks like a lot of the class names are unique enough that maybe these conflicts are best addressed on an as-needed basis... though if there's an easy way to namespace all the classes, that might be a better permanent (albeit less readable) solution. What do you think?

ericmandel commented 4 years ago

tl;dnr: I suspect you can just change .control as you need to ...

Wow, I have no idea where .control is being used and I strongly suspect it is not being used anywhere ... given that it does not have a js9 prefix, it could be an early addition to the .css file, or an override to an early 3rd-party library. I do have a few simple directives pertaining to column placement that don't have hs9 prefixes but not many, and I don't think .control is part of that group.

I agree that the css needs work, and I'd love to have someone straighten it out, it's just not something I have the time or expertise to do ... that was the hope for putting it all into GitHub!

ericmandel commented 4 years ago

I found it and yes, its in an early plugin (the archive plugin) that was developed by someone else. I'll fix that plugin so there is no conflict ... I see that the css directives are all very simply named, inviting conflict.

timbeccue commented 4 years ago

Thanks for the fix!