executablebooks / sphinx-panels

A sphinx extension for creating panels in a grid layout
https://sphinx-panels.readthedocs.io
MIT License
83 stars 20 forks source link

Override CSS for `.container` instead of adding a div directive #38

Closed pradyunsg closed 3 years ago

pradyunsg commented 3 years ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when I have to use .. div:: instead of .. container:: when using this package. This is unacceptable! 😜

Describe the solution you'd like

Change how this package is implemented by overriding bootstrap's CSS for the container class to remove/change the padding and max-width styling, instead of introducing specific directives to work around them.

Describe alternatives you've considered

Status quo?

Additional context

I'm annoyed at Reddit's r/programming while I'm writing this issue. Apologies for the terseness.

welcome[bot] commented 3 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

chrisjsewell commented 3 years ago

This is not really an issue with sphinx-panels, it is an issue with docutils adding an unnecessary an over generalised container class. You should raise it with them. I would entertain PRs, but otherwise, this is not something that I will be looking to change.

pradyunsg commented 3 years ago

Hmm... The following would be sufficient to stop weird behaviors due to bootstrap <-> docutils fighting -- would a PR adding it be acceptable?

[role="main"] .container {
   padding-left: 0;
   padding-right: 0;
   max-width: 100%;
}