Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Css clash between Calendar/Weather and BiTD #132

Open
Petwag opened this issue Jun 27, 2021 · 3 comments
Open

Css clash between Calendar/Weather and BiTD #132

Petwag opened this issue Jun 27, 2021 · 3 comments

Comments

@Petwag
Copy link
Contributor

Petwag commented Jun 27, 2021

Hi,
First of all, thank you for your work, the system you made is great.

I found using Calendar/Weather with the blades in the dark system there is an issue with the css

The normal look should be like this
css normal

but it ends up like this
css clash

By removing the css files I could fix the weather module but the character sheet was of course broken.
f

I am not familiar with the css you are using in the Blades in the dark module and I will look more into it,
I just wantd to point it out, in case there is quick fix you might know of

@Petwag
Copy link
Contributor Author

Petwag commented Jun 27, 2021

So after a quick search, I think the issue comes from that piece of css.

issue

the override of all sections to flex-direction: column affects the modules as well.

@Petwag
Copy link
Contributor Author

Petwag commented Jun 27, 2021

In fact all the * selector are affecting the modules outside blade in the dark system.

Wouldn't it be possible to replace it by .blades-in-the-dark?

I noticed in the cess of the page that it is present for all content related to the module.

By doing so might be enough to encapsulate the styling to the module itself I believe

@justinross
Copy link
Contributor

justinross commented Jul 21, 2021

There are some things that don't get wrapped in a .blades-in-the-dark class, like dice rolls in chat.

In my character sheet redesign fork, I ended up cutting up the SCSS a bit and namespacing as much of it as possible to avoid this sort of thing. I don't have the cycles to port it back to the current version right now, but it was pretty quick to go through and split up the SCSS into specific parts and namespace it. I'd say to just cherry-pick those changes and pull them back into main, but I definitely cut out a lot of stuff that wasn't being used anymore (since I replaced the character sheet).

If you look at this commit, it should give you the gist if you want to give it a try.

The main takeaways: for several sheets, I added extra classes that weren't in the original. E.g.:
image

This let me better target those sheets directly, rather than relying on more generic css selectors.

From there, take a look at the different new scss files I made, then style.scss to see how I imported them mostly inside of namespaced selectors.

Really, though, if you cherry-pick that commit and figure out what I left out of the character sheet styles then re-add it, that'll get you 90% of the way there, I imagine.

If you take a swing at it and run into trouble, hit me up, either here, or on Discord: ThsJstIn#5654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants