diff options
author | Shadab Khan <shadab.2005@gmail.com> | 2018-06-28 03:04:18 +0800 |
---|---|---|
committer | Shadab Khan <shadab.2005@gmail.com> | 2018-07-04 02:38:59 +0800 |
commit | a673785326d85fc0a2b27542c329b5dff8d397f4 (patch) | |
tree | 551116bf23cac92c587e98498f755831f856423a | |
parent | 4649f9202a93f7573d7fb425fbcbdd50e6d4407c (diff) | |
download | dexon-solidity-a673785326d85fc0a2b27542c329b5dff8d397f4.tar dexon-solidity-a673785326d85fc0a2b27542c329b5dff8d397f4.tar.gz dexon-solidity-a673785326d85fc0a2b27542c329b5dff8d397f4.tar.bz2 dexon-solidity-a673785326d85fc0a2b27542c329b5dff8d397f4.tar.lz dexon-solidity-a673785326d85fc0a2b27542c329b5dff8d397f4.tar.xz dexon-solidity-a673785326d85fc0a2b27542c329b5dff8d397f4.tar.zst dexon-solidity-a673785326d85fc0a2b27542c329b5dff8d397f4.zip |
Add custom.css for docs to change pre tag styles
Specify white space for table cells
Add custom.css for docs to change pre tag styles
Specify white space for table cells
Rearrange code
Delete theme_overrides.css
Remove extra code
-rw-r--r-- | docs/_static/theme_overrides.css | 13 | ||||
-rw-r--r-- | docs/conf.py | 13 | ||||
-rw-r--r-- | docs/docs-css/custom.css | 14 |
3 files changed, 17 insertions, 23 deletions
diff --git a/docs/_static/theme_overrides.css b/docs/_static/theme_overrides.css deleted file mode 100644 index d750f4f1..00000000 --- a/docs/_static/theme_overrides.css +++ /dev/null @@ -1,13 +0,0 @@ -/* override table width restrictions */ -@media screen and (min-width: 767px) { - - .wy-table-responsive table td { - /* !important prevents the common CSS stylesheets from overriding - this as on sphinx_rtd_theme they are loaded after this stylesheet */ - white-space: normal !important; - } - - .wy-table-responsive { - overflow: visible !important; - } -} diff --git a/docs/conf.py b/docs/conf.py index fcf46c11..55f4f1a8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,6 +27,8 @@ def setup(sphinx): from pygments_lexer_solidity import SolidityLexer sphinx.add_lexer('Solidity', SolidityLexer()) + sphinx.add_stylesheet('css/custom.css') + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -141,16 +143,7 @@ html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# A dictionary of values to pass into the template engine’s context for -# all pages. Single values can also be put in -# this dictionary using the -A command-line option of sphinx-build. -html_context = { - 'css_files': [ - '_static/theme_overrides.css', # override wide tables in sphinx_rtd_theme - ], - } +html_static_path = [] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/docs/docs-css/custom.css b/docs/docs-css/custom.css new file mode 100644 index 00000000..970148ed --- /dev/null +++ b/docs/docs-css/custom.css @@ -0,0 +1,14 @@ +pre { + white-space: pre-wrap; /* css-3 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; +} + +.wy-table-responsive table td, .wy-table-responsive table th { + white-space: pre-wrap; +} +.wy-table-responsive table td, .wy-table-responsive table th { + white-space: pre-wrap; +} |