From a5ff94219470985df306f74ed294d774ec0b0f83 Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Tue, 11 Feb 2025 13:25:59 -0500 Subject: [PATCH] refactor: move api styles to new file --- _includes/head.html | 1 + css/general.css | 46 ++------------------------------------- css/pages/api.css | 53 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 44 deletions(-) create mode 100644 css/pages/api.css diff --git a/_includes/head.html b/_includes/head.html index f9e8eb95a7..661a57f585 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -14,6 +14,7 @@ + diff --git a/css/general.css b/css/general.css index c5003e53bc..9e3bf39bb1 100644 --- a/css/general.css +++ b/css/general.css @@ -20,9 +20,7 @@ h1 { line-height: 36px; } -#api-doc h1 { - font-weight: normal; -} + h1, h2, h3 { margin: 5px 0; @@ -65,42 +63,6 @@ span.block-section { display: block; } -#api-doc section { - padding-left: 20px; -} - -#api-doc > h3 { - padding-top: 10px; - padding-bottom: 5px; - font-weight: bold; - font-size: 24px; - color: var(--menu-grey) -} - -#api-doc h2 { - font-weight: bold; - font-size: 29px; - margin: 40px 0 20px; -} - -#api-doc section h3 { - padding-top: 10px; - padding-bottom: 5px; - font-weight: bold; - font-size: 18px; -} - -#api-doc h4 { - font-size: 16px; - font-weight: bold; -} - -#api-doc h5 { - font-size: 14px; - font-weight: bold; - color: var(--menu-grey) -} - /* scroll */ *::-webkit-scrollbar { @@ -135,7 +97,7 @@ a { padding-top: 40px; } -#api-doc *:target, #page-doc *:target { +#page-doc *:target { margin-top: -120px; padding-top: 120px; z-index: -1; @@ -426,10 +388,6 @@ h2 a { overflow: scroll; } - #api-doc section { - padding-left: 0; - } - code { word-break: break-all; } diff --git a/css/pages/api.css b/css/pages/api.css new file mode 100644 index 0000000000..8d08533e0c --- /dev/null +++ b/css/pages/api.css @@ -0,0 +1,53 @@ +#api-doc *:target { + margin-top: -120px; + padding-top: 120px; + z-index: -1; +} + +#api-doc section { + padding-left: 20px; +} + +@media all and (max-width: 1110px) { + #api-doc section { + padding-left: 0; + } +} + +/* ---- Titles ---- */ + +#api-doc h1 { + font-weight: normal; +} + +#api-doc>h3 { + padding-top: 10px; + padding-bottom: 5px; + font-weight: bold; + font-size: 24px; + color: var(--menu-grey) +} + +#api-doc h2 { + font-weight: bold; + font-size: 29px; + margin: 40px 0 20px; +} + +#api-doc section h3 { + padding-top: 10px; + padding-bottom: 5px; + font-weight: bold; + font-size: 18px; +} + +#api-doc h4 { + font-size: 16px; + font-weight: bold; +} + +#api-doc h5 { + font-size: 14px; + font-weight: bold; + color: var(--menu-grey) +} \ No newline at end of file