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

panels CSS doesn't play great with default themes (e.g. alabaster) #21

Closed
chrisjsewell opened this issue May 17, 2020 · 2 comments · Fixed by #22
Closed

panels CSS doesn't play great with default themes (e.g. alabaster) #21

chrisjsewell opened this issue May 17, 2020 · 2 comments · Fixed by #22

Comments

@chrisjsewell
Copy link
Member

chrisjsewell commented May 17, 2020

See https://sphinx-panels.readthedocs.io/en/alabaster-theme/

The main egregious thing is that somehow alabaster CSS seems to set the width of the main container to less than 100% so that e.g. col-lg-6 doesn't work unless you set max-width from 50% to ~47%. (checked also for classic, traditional, agogo)

From a quick mess around, I couldn't find any specific theme CSS to override to "fix" this.

@pauleveritt coincidentally, given we just spoke on executablebooks/MyST-Parser#4, I come across your https://github.com/pauleveritt/sphinxstrap4, dealing with exactly alabaster/bootstrap hybrids! Perhaps you may have some insight to add here?

@chrisjsewell chrisjsewell changed the title Panels don't play great with alabaster theme Panels don't play great with default themes (e.g. alabaster) May 17, 2020
@chrisjsewell chrisjsewell pinned this issue May 17, 2020
@chrisjsewell chrisjsewell changed the title Panels don't play great with default themes (e.g. alabaster) panels CSS doesn't play great with default themes (e.g. alabaster) May 17, 2020
@chrisjsewell
Copy link
Member Author

chrisjsewell commented May 17, 2020

Ok sussed it:
The RTD and Bootstrap theme set box-sizing for everything:

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin-top: 0;
}

and the default themes don't. So something like this works:

a.btn.reference,
div.row div.d-flex,
div.row div.d-flex *,
details.dropdown * {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

div.row div.d-flex p,
details.dropdown p {
    margin-top: 0;
}

(probably best to add a specific top-level class to select, e.g. sphinx-bs)

@pauleveritt
Copy link

pauleveritt commented May 17, 2020

I see you already got to it. Feel free to nudge me on things in the future.

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

Successfully merging a pull request may close this issue.

2 participants