From 64bb3b6098574348d38ea4a99c10c26fe84aae7e Mon Sep 17 00:00:00 2001 From: medmunds Date: Thu, 5 Apr 2018 18:03:59 -0700 Subject: [PATCH] Docs: freeze left column of ESP feature matrix (Make the wide table a little more readable.) --- docs/_static/anymail-theme.css | 20 ++++++++++++++++++++ docs/esps/index.rst | 2 ++ 2 files changed, 22 insertions(+) diff --git a/docs/_static/anymail-theme.css b/docs/_static/anymail-theme.css index 215cf2a..a84e62b 100644 --- a/docs/_static/anymail-theme.css +++ b/docs/_static/anymail-theme.css @@ -19,3 +19,23 @@ -webkit-user-select: none; -ms-user-select: none; } + + +/* Sticky table first column (used for ESP feature matrix) */ +table.sticky-left td:first-of-type, +table.sticky-left th:first-of-type { + position: -webkit-sticky; /* Safari */ + position: sticky; + left: 0; + background-color: #fcfcfc; /* override transparent from .wy-table td */ +} +table.sticky-left td:first-of-type[colspan] > p, +table.sticky-left th:first-of-type[colspan] > p { + /* Hack: the full-width section headers can't stick left; + since those always wrap a rubric

(in the specific table that uses this), + just make the

sticky within the . */ + display: inline-block; + position: -webkit-sticky; /* Safari */ + position: sticky; + left: 17px; /* (.wy-table $table-padding-size) + (docutils border="1" in html) */ +} diff --git a/docs/esps/index.rst b/docs/esps/index.rst index 3e979ce..abb908a 100644 --- a/docs/esps/index.rst +++ b/docs/esps/index.rst @@ -28,6 +28,8 @@ The table below summarizes the Anymail features supported for each ESP. .. currentmodule:: anymail.message +.. rst-class:: sticky-left + ============================================ =========== ========== =========== ========== ========== ============ =========== Email Service Provider |Mailgun| |Mailjet| |Mandrill| |Postmark| |SendGrid| |SendinBlue| |SparkPost| ============================================ =========== ========== =========== ========== ========== ============ ===========