sphinx-panels icon indicating copy to clipboard operation
sphinx-panels copied to clipboard

Add panels/droppdown/etc styles defaults

Open chrisjsewell opened this issue 5 years ago • 2 comments

There could be "top-level" styles option that initialize a bunch of bootstrap classes (maybe on multiple elements), i.e. warning wouldn't just relate to bg-danger; it might be e.g. font-weight-bold text-white bg-danger on the detail element, then potentially also other classes on the summary and div elements.

Originally posted by @chrisjsewell in https://github.com/executablebooks/sphinx-panels/issues/14#issuecomment-629441898

chrisjsewell avatar May 16 '20 01:05 chrisjsewell

Note styles could also be used for panels, and additional "project-wide" styles could perhaps be added in conf.py, e.g.:

dropdown_styles = {
  "my-style": {
     "container": ["mb-2"],
     "title": ["bg-primary", "text-center"],
     "body": ["text-justify"]
  }
}

Then in text:

.. dropdown:: Title
    :style: my-style

    Content

chrisjsewell avatar May 17 '20 04:05 chrisjsewell

I'll bring in the note from #39 -- regarding changing the "default" style uses when none are specified. :)

pradyunsg avatar Oct 03 '20 09:10 pradyunsg