From 54967bcb2505be1eae8acf36fedd54a8bd4ca21b Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sat, 12 Oct 2024 22:39:54 +0100 Subject: [PATCH] Reorganize css sections --- .../generator/template/darkfish/css/rdoc.css | 214 +++++++++--------- 1 file changed, 107 insertions(+), 107 deletions(-) diff --git a/lib/rdoc/generator/template/darkfish/css/rdoc.css b/lib/rdoc/generator/template/darkfish/css/rdoc.css index 1ce240c222..7b97881372 100644 --- a/lib/rdoc/generator/template/darkfish/css/rdoc.css +++ b/lib/rdoc/generator/template/darkfish/css/rdoc.css @@ -311,19 +311,121 @@ main h6 { } } -/* Emphasis */ -strong, -em { - color: var(--highlight-color); - background-color: rgba(255, 111, 97, 0.1); /* Light red background for emphasis */ +/* Search */ +#search-section { + padding: 1em; + background-color: var(--background-color); + border-bottom: 1px solid var(--border-color); +} + +#search-field-wrapper { + position: relative; + display: flex; + align-items: center; +} + +#search-field { + width: 100%; + padding: 0.5em 1em 0.5em 2.5em; + border: 1px solid var(--border-color); + border-radius: 20px; + font-size: 14px; + outline: none; + transition: border-color 0.3s ease; + color: var(--text-color); } +#search-field:focus { + border-color: var(--highlight-color); +} + +#search-field::placeholder { + color: var(--text-color); +} + +#search-field-wrapper::before { + content: "\1F50D"; + position: absolute; + left: 0.75em; + top: 50%; + transform: translateY(-50%); + font-size: 14px; + color: var(--text-color); + opacity: 0.6; +} + +/* Search Results */ +#search-results { + font-family: var(--font-primary); + font-weight: 300; +} + +#search-results .search-match { + font-family: var(--font-heading); + font-weight: normal; +} + +#search-results .search-selected { + background: var(--code-block-background-color); + border-bottom: 1px solid transparent; +} + +#search-results li { + list-style: none; + border-bottom: 1px solid var(--border-color); + margin-bottom: 0.5em; +} + +#search-results li:last-child { + border-bottom: none; + margin-bottom: 0; +} + +#search-results li p { + padding: 0; + margin: 0.5em; +} + +#search-results .search-namespace { + font-weight: bold; +} + +#search-results li em { + background-color: rgba(224, 108, 117, 0.1); + font-style: normal; +} + +#search-results pre { + margin: 0.5em; + font-family: var(--font-code); +} + +/* Syntax Highlighting - Gruvbox Light Scheme */ + +.ruby-constant { color: #AF3A03; } /* Dark Orange */ +.ruby-keyword { color: #9D0006; } /* Dark Red */ +.ruby-ivar { color: #B57614; } /* Brown */ +.ruby-operator { color: #427B58; } /* Dark Teal */ +.ruby-identifier { color: #076678; } /* Deep Teal */ +.ruby-node { color: #8F3F71; } /* Plum */ +.ruby-comment { color: #928374; font-style: italic; } /* Gray */ +.ruby-regexp { color: #8F3F71; } /* Plum */ +.ruby-value { color: #AF3A03; } /* Dark Orange */ +.ruby-string { color: #79740E; } /* Olive */ + +/* Emphasis */ em { text-decoration-color: rgba(52, 48, 64, 0.25); text-decoration-line: underline; text-decoration-style: dotted; } +strong, +em { + color: var(--highlight-color); + background-color: rgba(255, 111, 97, 0.1); /* Light red background for emphasis */ +} + /* Paragraphs */ main p { line-height: 1.5em; @@ -386,49 +488,6 @@ main header h3 { font-size: 120%; } -/* Search */ -#search-section { - padding: 1em; - background-color: var(--background-color); - border-bottom: 1px solid var(--border-color); -} - -#search-field-wrapper { - position: relative; - display: flex; - align-items: center; -} - -#search-field { - width: 100%; - padding: 0.5em 1em 0.5em 2.5em; - border: 1px solid var(--border-color); - border-radius: 20px; - font-size: 14px; - outline: none; - transition: border-color 0.3s ease; - color: var(--text-color); -} - -#search-field:focus { - border-color: var(--highlight-color); -} - -#search-field::placeholder { - color: var(--text-color); -} - -#search-field-wrapper::before { - content: "\1F50D"; - position: absolute; - left: 0.75em; - top: 50%; - transform: translateY(-50%); - font-size: 14px; - color: var(--text-color); - opacity: 0.6; -} - /* Utility Classes */ .hide { display: none !important; } .initially-hidden { display: none; } @@ -445,19 +504,6 @@ main header h3 { /* Print-specific styles */ } -/* Syntax Highlighting - Gruvbox Light Scheme */ - -.ruby-constant { color: #AF3A03; } /* Dark Orange */ -.ruby-keyword { color: #9D0006; } /* Dark Red */ -.ruby-ivar { color: #B57614; } /* Brown */ -.ruby-operator { color: #427B58; } /* Dark Teal */ -.ruby-identifier { color: #076678; } /* Deep Teal */ -.ruby-node { color: #8F3F71; } /* Plum */ -.ruby-comment { color: #928374; font-style: italic; } /* Gray */ -.ruby-regexp { color: #8F3F71; } /* Plum */ -.ruby-value { color: #AF3A03; } /* Dark Orange */ -.ruby-string { color: #79740E; } /* Olive */ - /* Table of Contents */ .table-of-contents ul { margin: 1em; @@ -566,52 +612,6 @@ main .attribute-access-type { text-transform: uppercase; } -/* Search Results */ -#search-results { - font-family: var(--font-primary); - font-weight: 300; -} - -#search-results .search-match { - font-family: var(--font-heading); - font-weight: normal; -} - -#search-results .search-selected { - background: var(--code-block-background-color); - border-bottom: 1px solid transparent; -} - -#search-results li { - list-style: none; - border-bottom: 1px solid var(--border-color); - margin-bottom: 0.5em; -} - -#search-results li:last-child { - border-bottom: none; - margin-bottom: 0; -} - -#search-results li p { - padding: 0; - margin: 0.5em; -} - -#search-results .search-namespace { - font-weight: bold; -} - -#search-results li em { - background-color: rgba(224, 108, 117, 0.1); - font-style: normal; -} - -#search-results pre { - margin: 0.5em; - font-family: var(--font-code); -} - /* Responsive Adjustments */ @media (max-width: 480px) { nav {