Skip to content

Commit

Permalink
Docs: remove CSS variables override for font-size (#11897)
Browse files Browse the repository at this point in the history
We don't need to tell the users to perform extra steps on these
documentation tools because addons is going to do this by default now:
readthedocs/addons#473

<!-- readthedocs-preview docs start -->
---
:books: Documentation previews :books:

- User's documentation (`docs`):
https://docs--11897.org.readthedocs.build/en/11897/

<!-- readthedocs-preview docs end -->

<!-- readthedocs-preview dev start -->
- Developer's documentation (`dev`):
https://dev--11897.org.readthedocs.build/en/11897/

<!-- readthedocs-preview dev end -->
  • Loading branch information
humitos authored Jan 9, 2025
1 parent ce422c1 commit 71d5320
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
20 changes: 0 additions & 20 deletions docs/user/intro/mdbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,6 @@ Getting started

.. _Getting started with mdBook: https://rust-lang.github.io/mdBook/guide/creating.html

Configuring mdBook and Read the Docs Addons
-------------------------------------------

Adjust the flyout menu font size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Add a ``readthedocs.css`` to your build with the `additional-css <https://rust-lang.github.io/mdBook/format/configuration/renderers.html#html-renderer-options>`_ flag,
so that the font in the :ref:`flyout-menu:Addons flyout menu` matches the theme better.

.. code-block:: css
:caption: readthedocs.css:
:root {
/* Increase the font size of the flyout menu */
--readthedocs-flyout-font-size: 1.3rem;
/* Increase the font size of the notifications */
--readthedocs-notification-font-size: 1.3rem;
}

Example repository and demo
---------------------------
Expand Down
21 changes: 0 additions & 21 deletions docs/user/intro/mkdocs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,27 +171,6 @@ To integrate the :ref:`flyout-menu:Addons flyout menu` version menu into your si
extra_javascript:
- javascript/readthedocs.js
Adjust the flyout menu font size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Add a ``readthedocs.css`` to your build,
so that the font in the :ref:`flyout-menu:Addons flyout menu` matches the theme better.

.. code-block:: css
:caption: readthedocs.css:
:root {
/* Reduce Read the Docs' flyout font a little bit */
--readthedocs-flyout-font-size: 0.7rem;
/* Reduce Read the Docs' notification font a little bit */
--readthedocs-notification-font-size: 0.8rem;
/* This customization is not yet perfect because we can't change the `line-height` yet. */
/* See https://github.com/readthedocs/addons/issues/197 */
--readthedocs-search-font-size: 0.7rem;
}
Example repository and demo
---------------------------

Expand Down

0 comments on commit 71d5320

Please sign in to comment.